-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
114 lines (105 loc) · 2.23 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
services:
nginx_frontend:
container_name: nginx_frontend
build:
context: ./srcs/frontend
expose:
- "80"
volumes:
- ./srcs/frontend/src:/var/www/html
networks:
- transcendence_net
restart: always
depends_on:
django:
condition: service_healthy
nginx:
container_name: nginx
build:
context: ./srcs/backend/nginx
ports:
- "8080:8080"
volumes:
- ssl_volume:/etc/nginx/ssl
restart: always
env_file: srcs/.env
depends_on:
- django
- nginx_frontend
networks:
- transcendence_net
redis:
container_name: redis
build:
context: ./srcs/backend/redis
restart: on-failure
networks:
- transcendence_net
expose:
- "6379"
env_file: srcs/.env
volumes:
- redis_volume:/data
postgres:
container_name: postgres
image: bitnami/postgresql:16.2.0-debian-12-r8
env_file: srcs/.env
volumes:
- ${DATABASE_CONTAINER_PATH}/db_volume:/var/lib/postgresql/data
expose:
- "5432"
networks:
- transcendence_net
restart: unless-stopped
django:
container_name: django
build:
context: ./srcs/backend/django
env_file: srcs/.env
depends_on:
- postgres
- redis
- blockchain
volumes:
- ./srcs/backend/django/apps:/app
- blockchain_volume:/blockchain_shared
expose:
- "8000"
networks:
- transcendence_net
restart: on-failure
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health/"]
interval: 30s
timeout: 10s
retries: 5
blockchain:
container_name: blockchain
build:
context: ./srcs/backend/blockchain
env_file: srcs/.env
volumes:
- blockchain_volume:/app/blockchain_shared
expose:
- "8545"
networks:
- transcendence_net
restart: unless-stopped
volumes:
ssl_volume:
driver: local
name: ssl_volume
redis_volume:
driver: local
name: redis_volume
blockchain_volume:
driver: local
name: blockchain_volume
networks:
transcendence_net:
name: transcendence_net
driver: bridge
ipam:
config:
- subnet: 172.23.0.0/16
gateway: 172.23.0.1