-
Notifications
You must be signed in to change notification settings - Fork 53
/
docker-compose.yml
50 lines (46 loc) · 1 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
version: "3"
services:
backend:
container_name: nhb-backend
image: nhb-backend
build:
context: ./backend
depends_on:
db:
condition: service_healthy
env_file: ./backend/.env
volumes:
- ./backend/migrations:/hasura-migrations
- ./backend/metadata:/hasura-metadata
ports:
- "8080:8080"
db:
container_name: nhb-db
image: postgres:13.0-alpine
ports:
- "5432:5432"
volumes:
- db_data:/var/lib/postgresql/data
env_file: ./backend/.env
healthcheck:
test: ["CMD-SHELL", "pg_isready --dbname=database --username=user"]
interval: 10s
timeout: 5s
retries: 5
frontend:
container_name: nhb-frontend
image: nhb-frontend
build:
context: ./frontend
ports:
- "3000:3000"
stdin_open: true
depends_on:
db:
condition: service_healthy
volumes:
- ./frontend:/usr/src/app
- /usr/src/app/node_modules
- /usr/src/app/.next
volumes:
db_data: