forked from Excel-MEC/excelplay-backend-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
staging.docker-compose.yml
172 lines (159 loc) · 3.83 KB
/
staging.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
version: "3"
services:
nginx:
image: nginx:latest
container_name: excelplay-backend-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./staging.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
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 backend.play.excelmec.org
# 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
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:
- "5432: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:
redisdata:
pgdataauth:
pgdatadbull:
networks:
kryptos_network:
driver: bridge
dalalbull_network:
driver: bridge