forked from ritberg/ft_transcendence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
186 lines (177 loc) · 3.8 KB
/
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
services:
user:
container_name: user
build:
context: ./user
dockerfile: Dockerfile
args:
USER_SERVICE_NAME: ${USER_SERVICE_NAME}
DJANGO_SUPERUSER_USERNAME: ${DJANGO_SUPERUSER_USERNAME}
DJANGO_SUPERUSER_EMAIL: ${DJANGO_SUPERUSER_EMAIL}
DJANGO_SUPERUSER_PASSWORD: ${DJANGO_SUPERUSER_PASSWORD}
env_file:
- .env
expose:
- "8003"
volumes:
- user:/home/transcendance/${USER_SERVICE_NAME}
- media_volume:/home/transcendance/user_auth_system/media
tty: true
networks:
- transcendance
init: true
depends_on:
- db_transcendence
- redis
restart: on-failure
stat:
container_name: stat
build:
context: ./stat
dockerfile: Dockerfile
args:
STAT_SERVICE_NAME: ${STAT_SERVICE_NAME}
DJANGO_SUPERUSER_USERNAME: ${DJANGO_SUPERUSER_USERNAME}
DJANGO_SUPERUSER_EMAIL: ${DJANGO_SUPERUSER_EMAIL}
DJANGO_SUPERUSER_PASSWORD: ${DJANGO_SUPERUSER_PASSWORD}
env_file:
- .env
expose:
- "8005"
volumes:
- user:/home/transcendance/${USER_SERVICE_NAME}
tty: true
networks:
- transcendance
init: true
depends_on:
- user
- db_transcendence
restart: on-failure
chat:
container_name: chat
build:
context: ./chat
dockerfile: Dockerfile
args:
CHAT_SERVICE_NAME: ${CHAT_SERVICE_NAME}
env_file:
- .env
expose:
- "8004"
volumes:
- user:/home/transcendance/${USER_SERVICE_NAME}
tty: true
networks:
- transcendance
init: true
depends_on:
- user
- db_transcendence
- redis
restart: on-failure
online:
container_name: online
depends_on:
- db_transcendence
- user
- redis
build:
context: ./online
dockerfile: Dockerfile
args:
SERVICE_NAME: ${ONLINE_SERVICE_NAME}
env_file:
- .env
expose:
- "8001"
volumes:
- user:/home/transcendance/${USER_SERVICE_NAME}
tty: true
networks:
- transcendance
init: true
restart: on-failure
bot:
container_name: bot
depends_on:
- redis
build:
context: ./bot
dockerfile: Dockerfile
args:
SERVICE_NAME: ${BOT_SERVICE_NAME}
env_file:
- .env
expose:
- "8002"
tty: true
networks:
- transcendance
init: true
restart: on-failure
nginx:
container_name: nginx
depends_on:
- online
- bot
- user
- chat
- stat
build:
context: ./nginx
dockerfile: Dockerfile
ports:
- "443:443"
- "80:80"
volumes:
- media_volume:/home/transcendance/user_auth_system/media
networks:
- transcendance
env_file: .env
# tty: true
restart: on-failure
db_transcendence:
container_name: db_transcendence
build:
context: ./db_transcendence/docker
dockerfile: Dockerfile
environment:
POSTGRES_DB: ${DB_TRANSCENDENCE_NAME}
POSTGRES_USER: ${DB_TRANSCENDENCE_USER}
POSTGRES_PASSWORD: ${DB_TRANSCENDENCE_PASSWORD}
PGPORT: ${DB_TRANSCENDENCE_PORT}
volumes:
- db_transcendence:/var/lib/postgresql/data/
expose:
- "5434"
tty: true
networks:
- transcendance
init: true
restart: on-failure
redis:
container_name: redis
image: redis:alpine
expose:
- "6379"
networks:
- transcendance
restart: on-failure
volumes:
user:
db_transcendence:
driver: local
driver_opts:
type: "none"
o: "bind"
device: "${PWD}/db_transcendence/db_transcendence"
media_volume:
driver: local
driver_opts:
type: "none"
o: "bind"
device: "${PWD}/db_transcendence/profile_pictures"
networks:
transcendance:
driver: bridge