-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
82 lines (75 loc) · 2.03 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.8'
services:
frontend:
image: ft_transcendence/frontend
container_name: ft_transcendence_frontend
build:
context: app/frontend/
dockerfile: Dockerfile
ports:
- ${FRONTEND_PORT}:443
networks:
- ft_transcendence_network
volumes:
- ./app/frontend/public:/home/ft_transcendence/public
entrypoint: bash /home/ft_transcendence/entrypoint.sh
environment:
BACKEND_URL: ${BACKEND_URL}:${BACKEND_PORT}
WSS_BACKEND_URL: ${WSS_BACKEND_URL}:${BACKEND_PORT}
backend:
image: ft_transcendence/backend
container_name: ft_transcendence_backend
build:
context: app/backend/
dockerfile: Dockerfile
ports:
- ${BACKEND_PORT}:443
networks:
- ft_transcendence_network
volumes:
- ./app/backend/src:/home/ft_transcendence/src
entrypoint: bash /home/ft_transcendence/entrypoint.sh
environment:
DB_HOST: ${DB_HOST}
DB_PORT: ${DB_PORT}
DB_USER: ${DB_USER}
DB_PASSWORD: ${DB_PASSWORD}
DB_NAME: ${DB_NAME}
FRONTEND_URL: ${FRONTEND_URL}:${FRONTEND_PORT}
FRONTEND_IP: ${FRONTEND_IP}
BACKEND_API_URL: ${BACKEND_URL}:${BACKEND_PORT}
MEDIA_URL: ${BACKEND_URL}:${BACKEND_PORT}/${MEDIA_DIR}/
REDIS_HOST: ${REDIS_HOST}
REDIS_PORT: ${REDIS_PORT}
depends_on:
db:
condition: service_healthy
db:
image: postgres:16
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
container_name: ft_transcendence_db
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: ${DB_NAME}
PGUSER: ${DB_USER}
ports:
- ${DB_PORT}:5432
networks:
- ft_transcendence_network
volumes:
- ./app/db/data:/var/lib/postgresql/data/
redis:
image: redis:alpine
container_name: ft_transcendence_redis
expose:
- ${REDIS_PORT}
networks:
- ft_transcendence_network
networks:
ft_transcendence_network:
driver: bridge