forked from Excel-MEC/excelplay-backend-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prod.docker-compose.yml
203 lines (188 loc) · 4.51 KB
/
prod.docker-compose.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
version: "3"
services:
nginx:
image: nginx:latest
container_name: excelplay-backend-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ../cert/:/var/www/html
- ../cert/dhparam/:/etc/ssl/certs/
- certbot-etc:/etc/letsencrypt
- certbot-var:/var/lib/letsencrypt
restart: unless-stopped
depends_on:
- kryptos
- dalalbull
- dalalbullcelery
- dalalbulldaphne
- auth1
networks:
- kryptos_network
- dalalbull_network
kryptos:
container_name: excelplay-backend-kryptos
build:
context: ./excelplay-backend-kryptos/
dockerfile: prod.dockerfile
dns:
- 8.8.8.8
ports:
- "8080:8080"
restart: on-failure
depends_on:
- db
networks:
- kryptos_network
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- certbot-etc:/etc/letsencrypt
- certbot-var:/var/lib/letsencrypt
- ../cert/:/var/www/html
depends_on:
- nginx
command: certonly --webroot --webroot-path=/var/www/html --email [email protected] --agree-tos --no-eff --force-renewal -d api.play.excelmec.org
db:
image: postgres:latest
container_name: db
environment:
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PASSWORD}
- POSTGRES_DB=${DB_NAME}
- DATABASE_HOST=${DB_HOST}
ports:
- "5432:5432"
volumes:
- database_postgres:/var/lib/postgresql/data
restart: on-failure
networks:
- kryptos_network
# dalalbull:
# container_name: excelplay-backend-dalalbull
# build:
# context: ./excelplay-backend-dalalbull/
# dockerfile: prod.dockerfile
# dns:
# - 8.8.8.8
# ports:
# - "8080:8080"
# restart: on-failure
# networks:
# - kryptos_network
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
ports:
- "5050:80"
networks:
- kryptos_network
restart: unless-stopped
auth1:
build: ./excelplay-auth/excelplay_auth/.
depends_on:
- redis
- dbauth
command: bash excelplay-auth/docker_entrypoint.sh
volumes:
- .:/excelplay/excelplay_auth
ports:
- "8000:8000"
networks:
- dalalbull_network
dalalbull:
build: ./excelplay-dalalbull/excelplay_dalalbull/.
depends_on:
- redis
- dbdalalbull
command: bash excelplay-dalalbull/docker_entrypoint.sh
volumes:
- .:/excelplay/excelplay_dalalbull
ports:
- "8002:8002"
networks:
- dalalbull_network
dalalbulldaphne:
build: ./excelplay-dalalbull/excelplay_dalalbull/.
depends_on:
- dalalbull
- dbdalalbull
command: bash excelplay-dalalbull/rundaphne.sh
volumes:
- .:/excelplay/excelplay_dalalbull
ports:
- "8003:8003"
networks:
- dalalbull_network
dalalbullcelery:
build: ./excelplay-dalalbull/excelplay_dalalbull/.
depends_on:
- dalalbull
- dalalbulldaphne
- dbdalalbull
command: bash excelplay-dalalbull/runcelery.sh
volumes:
- .:/excelplay/excelplay_dalalbull
networks:
- dalalbull_network
redis:
container_name: "redis"
restart: unless-stopped
image: redis
command: redis-server
volumes:
- "redisdata:/data"
networks:
- dalalbull_network
dbauth:
container_name: "dbauth"
restart: unless-stopped
image: postgres:alpine
expose:
- "5432"
ports:
- "5433:5432"
environment:
- POSTGRES_USER=${DB_USER_AUTH}
- POSTGRES_PASSWORD=${DB_PASSWORD_AUTH}
- POSTGRES_DB=${DB_NAME_AUTH}
- DATABASE_HOST=${DB_HOST_AUTH}
networks:
- dalalbull_network
volumes:
- "pgdataauth:/var/lib/postgresql/data"
dbdalalbull:
container_name: "dbdalalbull"
restart: unless-stopped
image: postgres:alpine
expose:
- "5432"
ports:
- "5434:5432"
environment:
- POSTGRES_USER=${DB_USER_DBULL}
- POSTGRES_PASSWORD=${DB_PASSWORD_DBULL}
- POSTGRES_DB=${DB_NAME_DBULL}
- DATABASE_HOST=${DB_HOST_DBULL}
networks:
- dalalbull_network
volumes:
- "pgdatadbull:/var/lib/postgresql/data"
volumes:
certbot-etc:
certbot-var:
database_postgres:
redisdata:
pgdataauth:
pgdatadbull:
networks:
kryptos_network:
driver: bridge
dalalbull_network:
driver: bridge