-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.staging.yaml
153 lines (145 loc) · 3.7 KB
/
compose.staging.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
services:
staging-home-portal-postgres-16:
container_name: hp-postgres-16
image: postgres:16.2-alpine3.18
environment:
POSTGRES_USER: postgres
env_file:
- .env.staging
volumes:
- staging-postgres-data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD", "pg_isready", "-U", "postgres" ]
interval: 5s
timeout: 5s
retries: 5
restart: always
networks:
- staging-home-portal-network
deploy:
resources:
limits:
cpus: '1.0'
memory: 1028M
staging-home-portal-pgadmin-8:
container_name: hp-pgadmin-8
image: dpage/pgadmin4:8.5
restart: always
env_file:
- .env.staging
environment:
- SCRIPT_NAME=/pgadmin
networks:
- staging-home-portal-network
volumes:
- staging-pgadmin-data:/var/lib/pgadmin
deploy:
resources:
limits:
cpus: "1.0"
memory: 1028M
staging-home-portal-admin:
container_name: hp-admin
build:
context: .
dockerfile: docker/admin/Dockerfile
env_file:
- .env.staging
depends_on:
staging-home-portal-postgres-16:
condition: service_healthy
restart: always
networks:
- staging-home-portal-network
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
command: "/bin/bash -c 'python manage.py migrate && uvicorn hub.admin.asgi:application --host 0.0.0.0 --port 80 --workers 1'"
staging-home-portal-api:
container_name: hp-api
build:
context: .
dockerfile: docker/backend/Dockerfile
env_file:
- .env.staging
depends_on:
staging-home-portal-postgres-16:
condition: service_healthy
restart: always
networks:
- staging-home-portal-network
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
staging-home-portal-site:
container_name: hp-site
build:
context: .
dockerfile: docker/site/Dockerfile
env_file:
- .env.staging
restart: always
expose:
- 80
- 9999
ports:
- "80:80"
- "9999:9999"
networks:
- staging-home-portal-network
volumes:
- ./site/Caddyfile:/etc/caddy/Caddyfile
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
staging-shopping-django-administration:
container_name: shopping-django-admin
image: ghcr.io/evanlab02/shoppingappadmin:0.16.2
env_file:
- .env.staging
environment:
SHOPPING_DEFAULT_SETTINGS_MODULE: shoppingapp.settings.settings
command: /bin/bash -c "python manage.py migrate && python manage.py runserver"
depends_on:
staging-home-portal-postgres-16:
condition: service_healthy
networks:
- staging-home-portal-network
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
staging-shopping-django-app:
container_name: shopping-django-app
image: ghcr.io/evanlab02/shoppingappbe:0.16.2
environment:
SHOPPING_DEFAULT_SETTINGS_MODULE: shoppingapp.settings.settings
env_file:
- .env.staging
command: "gunicorn -b 0.0.0.0:80 -w 1 --log-config shoppingapp/logging.config --capture-output --log-level info --worker-class uvicorn_worker.UvicornWorker 'shoppingapp.config.asgi:app'"
depends_on:
staging-home-portal-postgres-16:
condition: service_healthy
networks:
- staging-home-portal-network
restart: always
deploy:
resources:
limits:
cpus: '1.0'
memory: 512M
volumes:
staging-postgres-data:
external: false
staging-pgadmin-data:
external: false
networks:
staging-home-portal-network:
driver: bridge