-
Notifications
You must be signed in to change notification settings - Fork 0
/
local_docker-stack.yml
213 lines (204 loc) · 5.18 KB
/
local_docker-stack.yml
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
services:
nginx:
image: dummy_fastapi_flask_blog_app-nginx:latest
ports:
- 80:80
- 443:443
depends_on:
- fastapi
- flask_front
networks:
- app-network
deploy:
replicas: 1
volumes:
- ./nginx/local_conf:/etc/nginx/conf.d
- static_volume:/home/dummy-operator/flask/staticfiles
flask_front:
image: dummy_fastapi_flask_blog_app-flask_front:latest
command: gunicorn --bind 0.0.0.0:8001 flask_app.manage:app
environment:
- ADMIN_EMAIL=/run/secrets/ADMIN_EMAIL
- ADMIN_LOGIN=/run/secrets/ADMIN_LOGIN
- ADMIN_PASSWORD=/run/secrets/ADMIN_PASSWORD
- BETTERSTACK_SOURCE_TOKEN=/run/secrets/BETTERSTACK_SOURCE_TOKEN
- CELERY_BROKER_URL=/run/secrets/CELERY_BROKER_URL
- CELERY_RESULT_BACKEND
- HCAPTCHA_SITE_KEY
- HCAPTCHA_SITE_SECRET=/run/secrets/HCAPTCHA_SITE_SECRET
- POSTGRES_HOST
- POSTGRES_PASSWORD=/run/secrets/POSTGRES_PASSWORD
- POSTGRES_PORT
- POSTGRES_PRODUCTION_DB_NAME
- POSTGRES_TEST_DB_NAME
- POSTGRES_USER
- SCOPE
- SECRET_KEY=/run/secrets/SECRET_KEY
- SENDGRID_API_KEY=/run/secrets/SENDGRID_API_KEY
- TEST_USER_PWD
secrets:
- ADMIN_EMAIL
- ADMIN_LOGIN
- ADMIN_PASSWORD
- BETTERSTACK_SOURCE_TOKEN
- CELERY_BROKER_URL
- HCAPTCHA_SITE_SECRET
- POSTGRES_PASSWORD
- SECRET_KEY
- SENDGRID_API_KEY
networks:
- app-network
deploy:
replicas: 1
depends_on:
- fastapi
volumes:
- static_volume:/home/dummy-operator/flask/staticfiles
fastapi:
image: dummy_fastapi_flask_blog_app-fastapi:latest
environment:
- ADMIN_EMAIL=/run/secrets/ADMIN_EMAIL
- ADMIN_LOGIN=/run/secrets/ADMIN_LOGIN
- ADMIN_PASSWORD=/run/secrets/ADMIN_PASSWORD
- BETTERSTACK_SOURCE_TOKEN=/run/secrets/BETTERSTACK_SOURCE_TOKEN
- CELERY_BROKER_URL=/run/secrets/CELERY_BROKER_URL
- CELERY_RESULT_BACKEND
- POSTGRES_HOST
- POSTGRES_PASSWORD=/run/secrets/POSTGRES_PASSWORD
- POSTGRES_PORT
- POSTGRES_PRODUCTION_DB_NAME
- POSTGRES_TEST_DB_NAME
- POSTGRES_USER
- SCOPE
- SECRET_KEY=/run/secrets/SECRET_KEY
- TEST_USER_PWD
secrets:
- ADMIN_EMAIL
- ADMIN_LOGIN
- ADMIN_PASSWORD
- BETTERSTACK_SOURCE_TOKEN
- CELERY_BROKER_URL
- POSTGRES_PASSWORD
- SECRET_KEY
networks:
- app-network
deploy:
replicas: 1
depends_on:
- db
restart: always
db:
image: postgres:15.0-alpine
environment:
- ADMIN_EMAIL=/run/secrets/ADMIN_EMAIL
- ADMIN_LOGIN=/run/secrets/ADMIN_LOGIN
- ADMIN_PASSWORD=/run/secrets/ADMIN_PASSWORD
- POSTGRES_HOST
- POSTGRES_PASSWORD=/run/secrets/POSTGRES_PASSWORD
- POSTGRES_PORT
- POSTGRES_PRODUCTION_DB_NAME
- POSTGRES_TEST_DB_NAME
- POSTGRES_USER
- SCOPE
secrets:
- ADMIN_EMAIL
- ADMIN_LOGIN
- ADMIN_PASSWORD
- POSTGRES_PASSWORD
networks:
- app-network
volumes:
- postgres_data:/var/lib/postgresql/data/
redis:
image: dummy_fastapi_flask_blog_app-redis:latest
volumes:
- redis_data:/data
depends_on:
- db
- rabbitmq
networks:
- app-network
deploy:
replicas: 1
rabbitmq:
image: dummy_fastapi_flask_blog_app-rabbitmq:latest
environment:
- ERLANG_COOKIE_NAME=/run/secrets/ERLANG_COOKIE_NAME
- NODENAME
- RABBITMQ_DEFAULT_PASS=/run/secrets/RABBITMQ_DEFAULT_PASS
- RABBITMQ_DEFAULT_USER
- RABBITMQ_DEFAULT_VHOST
- RABBITMQ_DEFAULT_PERMISSIONS_REGEX=^.*$$
secrets:
- ERLANG_COOKIE_NAME
- RABBITMQ_DEFAULT_PASS
depends_on:
- flask_front
volumes:
- rabbitmq_data:/var/lib/rabbitmq/
networks:
- app-network
deploy:
replicas: 1
celery:
image: dummy_fastapi_flask_blog_app-celery:latest
environment:
- CELERY_BROKER_URL=/run/secrets/CELERY_BROKER_URL
- CELERY_RESULT_BACKEND
- PDF_FOLDER_PATH
- PDF_FILE_NAME
- POSTGRES_HOST
- POSTGRES_PASSWORD=/run/secrets/POSTGRES_PASSWORD
- POSTGRES_PORT
- POSTGRES_PRODUCTION_DB_NAME
- POSTGRES_TEST_DB_NAME
- POSTGRES_USER
- SENDGRID_API_KEY=/run/secrets/SENDGRID_API_KEY
- TIMEZONE
secrets:
- CELERY_BROKER_URL
- POSTGRES_PASSWORD
- SENDGRID_API_KEY
volumes:
- static_volume:/home/dummy-operator/staticfiles
depends_on:
- redis
- rabbitmq
- flask_front
networks:
- app-network
deploy:
replicas: 2
volumes:
postgres_data:
static_volume:
rabbitmq_data:
redis_data:
networks:
app-network:
driver: overlay
secrets:
ADMIN_EMAIL:
external: true
ADMIN_LOGIN:
external: true
ADMIN_PASSWORD:
external: true
BETTERSTACK_SOURCE_TOKEN:
external: true
BETTERSTACK_TEAM_TOKEN:
external: true
CELERY_BROKER_URL:
external: true
ERLANG_COOKIE_NAME:
external: true
HCAPTCHA_SITE_SECRET:
external: true
POSTGRES_PASSWORD:
external: true
RABBITMQ_DEFAULT_PASS:
external: true
SECRET_KEY:
external: true
SENDGRID_API_KEY:
external: true