-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
74 lines (69 loc) · 1.46 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
services:
postgres-db:
image: postgres:13.18-bookworm
env_file:
- ft_transcendence_backend/backend/.env
container_name: postgres
environment:
PGUSER: $${POSTGRES_USER}
volumes:
- db_data:/var/lib/postgresql/data
networks:
- app-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:bookworm
command: ["redis-server", "--maxmemory", "256mb", "--maxmemory-policy", "allkeys-lru"]
restart: always
expose:
- "6379"
networks:
- app-network
backend:
depends_on:
postgres-db:
condition: service_healthy
redis:
condition: service_started
restart: unless-stopped
env_file:
- ft_transcendence_backend/backend/.env
build:
context: ft_transcendence_backend
volumes:
- ./ft_transcendence_backend/media:/app/media
expose:
- "8000"
networks:
- app-network
frontend:
depends_on:
- backend
restart: on-failure
build:
context: ft_transcendence_frontend
expose:
- "4173"
networks:
- app-network
nginx:
image: nginx:stable-bookworm-perl
build:
context: nginx
restart: always
depends_on:
- frontend
ports:
- "8080:80"
- "8443:443"
networks:
- app-network
volumes:
db_data:
media:
networks:
app-network: