forked from WildCodeSchool/2309-wns-jaune-wild-code-hub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
82 lines (79 loc) · 1.89 KB
/
docker-compose.yml
File metadata and controls
82 lines (79 loc) · 1.89 KB
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
services:
backend:
build: ./backend
ports:
- 4000:4000
profiles: ["dev", "production", "test"]
volumes:
- ./backend/src:/app/src
environment:
- WDS_SOCKET_HOST=127.0.0.1
- CHOKIDAR_USEPOLLING=true
- WATCHPACK_POLLING=true
depends_on:
db-dev:
condition: service_healthy
command: sh -c 'npm run migrate && npm start'
env_file:
- ./backend/.env
frontend:
build: ./frontend
ports:
- 3000:3000
profiles: ["dev", "production", "test"]
volumes:
- ./frontend/src:/app/src
environment:
- WDS_SOCKET_HOST=127.0.0.1
- CHOKIDAR_USEPOLLING=true
- WATCHPACK_POLLING=true
- NEXT_PUBLIC_IMAGE_URL=http://localhost:8000
env_file:
- ./frontend/.env
db-dev:
profiles: ["dev", "production", "test"]
image: postgres:15
ports:
- 5432:5432
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}"]
interval: 5s
timeout: 5s
retries: 10
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
env_file:
- ./.env
volumes:
- wildcodehub-data:/var/lib/postgresql/data
adminer:
image: adminer
profiles: ["dev", "production", "test"]
depends_on:
- db-dev
restart: always
ports:
- 8081:8080
db_test:
image: postgres:15
profiles: ["test"]
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -d wildcodehub-test -U root"]
interval: 5s
timeout: 5s
retries: 10
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: wildcodehub-test
ports:
- 5435:5432
volumes:
- wildcodehub-data-test:/var/lib/postgresql/data
volumes:
wildcodehub-data:
wildcodehub-data-test: