-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
86 lines (83 loc) · 2.53 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
version: "3.5"
services:
backend:
build:
context: ./src/backend
dockerfile: Dockerfile
target: development
image: transcendence/backend
container_name: backend
volumes:
- ./src/backend/src:/transcendence/backend/src:ro
- ./src/backend/prisma:/transcendence/backend/prisma:ro
- ./src/backend/test:/transcendence/backend/test:ro
- ./src/backend/env/docker-compose.dev.env:/transcendence/backend/.env:ro
# - transcendence_backend_modules:/transcendence/backend/node_modules
command: npm run start:debug
networks:
transcendence_network:
aliases: [transcendence.backend]
depends_on:
postgres: { condition: service_healthy }
ports:
- 3000:3000
- 5555:5555 # prisma studio
- 9229:9229 # debug
env_file:
- ./src/backend/env/postgres.dev.env
environment:
TZ: "Europe/Paris"
OAUTH_42_CLIENT_ID: ${OAUTH_42_CLIENT_ID}
OAUTH_42_CLIENT_SECRET: ${OAUTH_42_CLIENT_SECRET}
JWT_SECRET: ${JWT_SECRET}
restart: on-failure
frontend:
build:
context: ./src/frontend
dockerfile: Dockerfile
target: development
image: transcendence/frontend
container_name: frontend
volumes:
- ./src/frontend/src:/transcendence/frontend/src:ro
# - transcendence_frontend_modules:/transcendence/frontend/node_modules
command: npm run start
ports:
- 4200:4200
networks:
transcendence_network:
aliases: [transcendence.frontend]
environment:
TZ: "Europe/Paris"
OAUTH_42_CLIENT_ID: ${OAUTH_42_CLIENT_ID}
restart: on-failure
postgres:
image: postgres:13.1
container_name: postgres
networks:
transcendence_network:
aliases: [transcendence.postgres]
env_file:
- ./src/backend/env/postgres.dev.env
environment:
TZ: "Europe/Paris"
restart: on-failure
ports:
- 5432:5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 5s
timeout: 5s
retries: 5
# TODO: add a volume for the database
networks:
transcendence_network:
driver: bridge
# volumes:
# ## Some modules have to be compiled for the right architecture (ex argon2),
# # hence we need to isolate them from the host
# ## If you have a dependency issue, run:
# # `docker-compose down && docker volume prune && docker-compose build`
# # (or install stuff manually using `docker-compose exec ...`)
# transcendence_backend_modules: {}
# transcendence_frontend_modules: {}