-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
146 lines (132 loc) · 2.82 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
version: '3.5'
services:
nginx:
container_name: "nginx_proxy"
restart: on-failure
env_file:
- .env
build:
context: ./nginx
dockerfile: ./Dockerfile
ports:
#- "88:88"
- "443:443"
networks:
trans_net:
ipv4_address: 192.130.0.5
volumes:
- django_static_vol:/ext
django:
container_name: "django_backend"
restart: on-failure
depends_on:
- postgres
env_file:
- .env
build:
context: ./webpage
dockerfile: ./Dockerfile
ports:
- "3000:3000"
networks:
trans_net:
ipv4_address: 192.130.0.3
volumes:
- django_static_vol:/app/ext
- django_game_vol:/app/game
- django_home_vol:/app/Home
- django_gateway_vol:/app/NetworkGateway
postgres:
container_name: "postgres_db"
image: postgres:alpine3.18
restart: always
env_file:
- .env
environment:
- PGDATA=/var/lib/postgres/data
# ports: DO_NOT_REMOVE -> Pour exposition public (potentiel)
# - 5432:5432
volumes:
- postgres_volume:/var/lib/postgres
networks:
trans_net:
ipv4_address: 192.130.0.2
redis:
container_name: "redis_cache"
build:
context: ./redis
dockerfile: ./Dockerfile
restart: always
env_file:
- .env
#volumes:
# - ./redis/conf/redis.conf:/usr/local/etc/redis/redis.conf
networks:
trans_net:
ipv4_address: 192.130.0.4
# nginx:
# container_name: "nginx_proxy"
# image: nginx:latest
# restart: always
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf
# - ./nginx/conf.d:etc/nginx/conf.d
# - django_static_vol:/app/static
# depends_on:
# - django
# networks:
# - trans_net
networks:
trans_net:
name: trans_net
driver: bridge
ipam:
config:
- subnet: 192.130.0.0/24
gateway: 192.130.0.1
volumes:
# nginx_certs_vol:
# driver: local
# driver_opts:
# o: bind
# type: none
# device: "${PWD}/nginx/ssl"
postgres_volume:
driver: local
driver_opts:
o: bind
type: none
device: "${PWD}/postgres/volume"
django_static_vol:
driver: local
driver_opts:
o: bind
type: none
device: "${PWD}/webpage/ext"
django_game_vol:
driver: local
driver_opts:
o: bind
type: none
device: "${PWD}/webpage/game"
django_home_vol:
driver: local
driver_opts:
o: bind
type: none
device: "${PWD}/webpage/Home"
django_gateway_vol:
driver: local
driver_opts:
o: bind
type: none
device: "${PWD}/webpage/NetworkGateway"
# django_static_vol:
# driver: local
# driver_opts:
# o: bind
# type: none
# device: "${PWD}/webpage/static"