-
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
services:
backend:
container_name: transcendence_back
build:
context: ./backend
dockerfile: Dockerfile
volumes:
- ./backend:/usr/src/app
ports:
- "8000:8000"
networks:
- backend-network
depends_on:
db:
condition: service_healthy
restart: always
env_file:
- .env
frontend:
container_name: transcendence_front
build:
context: ./frontend
dockerfile: Dockerfile
volumes:
- ./frontend:/usr/src/app
ports:
- "8080:8080"
restart: always
depends_on:
- backend
env_file:
- .env
db:
container_name: transcendence_db
image: postgres:13
volumes:
- postgres_data:/var/lib/postgresql/data/
networks:
- backend-network
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_HOST: ${POSTGRES_HOST}
POSTGRES_PORT: ${POSTGRES_PORT}
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
cache:
image: redis:6
expose:
- 6379
networks:
- backend-network
command: redis-server --requirepass ${REDIS_PASSWORD}
volumes:
- cache_data:/data
networks:
backend-network:
driver: bridge
volumes:
postgres_data:
driver: local
cache_data:
driver: local