forked from 42-MyMisters/transcendence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
111 lines (103 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
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
version: "3.9"
networks:
nw-db:
driver: bridge
nw-nginx:
driver: bridge
services:
backend:
container_name: backend
build:
context: ./backend
dockerfile: ./Dockerfile
restart: always
volumes:
- type: bind
source: ./backend
target: /data
ports:
- "4000:4000"
networks:
nw-db: {}
nw-nginx: {}
env_file:
- ./config/.env
- ./config/.postgres.env
depends_on:
postgres:
condition: service_healthy
frontend:
container_name: frontend
build:
context: ./frontend
dockerfile: ./Dockerfile
restart: always
volumes:
- type: bind
source: ./frontend
target: /data
ports:
- "3000:3000"
env_file:
- ./config/.env
postgres:
container_name: postgres
image: postgres:latest
volumes:
- type: bind
source: ./db
target: /var/lib/postgresql/data/pgdata
restart: always
ports:
- "5444:5432"
networks:
nw-db:
aliases:
- postgres
env_file:
- ./config/.postgres.env
healthcheck:
test: pg_isready -d $POSTGRES_DB -h $POSTGRES_HOST -p $POSTGRES_CHECK_PORT -U $POSTGRES_USER
interval: 10s
timeout: 30s
retries: 5
start_period: 10s
pgadmin:
container_name: pgadmin
image: dpage/pgadmin4:latest
restart: always
ports:
- "8000:80"
env_file:
- ./config/.pgadmin.env
networks:
nw-db: {}
depends_on:
postgres:
condition: service_healthy
nginx:
container_name: nginx
build:
context: ./nginx
dockerfile: ./Dockerfile
restart: always
volumes:
- type: bind
source: ./backend/back/img
target: /img
networks:
nw-nginx:
aliases:
- nginx
ports:
- "443:443"
- "80:80"
env_file:
- ./config/.env
# volumes:
# v_react:
# driver: local
# driver_opts:
# type: none
# o: bind
# device: $PWD/srcs/react/