-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
82 lines (75 loc) ยท 1.57 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
version: "3"
services:
nginx:
build:
context: ./nginx
args:
SERVER_IP: ${SERVER_IP}
CERTS_: ${CERTS_}
CERTS_KEY_: ${CERTS_KEY_}
ports:
- "80:80"
- "443:443"
container_name: nginx_container
depends_on:
- game
- backend
volumes:
- ./data/ssl:/etc/nginx/ssl/
- ./FE:/usr/share/nginx/html/FE
- profile-image-volume:/usr/share/nginx/profile
networks:
- pong_net
game:
build: ./GAME
container_name: game_container
volumes:
- ./GAME:/code
env_file:
- ./.env
networks:
- pong_net
backend:
build: ./BE
container_name: backend_container
depends_on:
- postgresql
volumes:
- ./BE:/code
- profile-image-volume:/code/profile
env_file:
- ./.env
environment:
POSTGRES_HOST: ${POSTGRES_DOCKER_HOST}
DJANGO_SETTINGS_MODULE: ${BE_DJANGO_SETTINGS_MODULE}
networks:
- pong_net
postgresql:
image: postgres:alpine
container_name: db_container
ports:
- "5432:5432"
volumes:
- db-volume:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
networks:
- pong_net
volumes:
db-volume:
driver: local
driver_opts:
type: none
device: ${PWD}/data/postgresql
o: bind
profile-image-volume:
driver: local
driver_opts:
type: none
device: ${PWD}/data/profile
o: bind
networks:
pong_net:
driver: bridge