-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
61 lines (56 loc) · 1.11 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
version: "3.1"
services:
hackernews-dev:
build:
context: ./backend
target: dev
command: make run
depends_on:
postgres:
condition: service_healthy
env_file:
- ./.env
volumes:
- ./backend/:/go/src/backend
ports:
- "8080:8080"
networks:
- docker-network
hackernews-frontend-dev:
build:
context: ./frontend
target: dev
command: make dev
depends_on:
postgres:
condition: service_healthy
env_file:
- ./.env
volumes:
- ./frontend/:/node/src/frontend
ports:
- "8000:8000"
networks:
- docker-network
postgres:
container_name: "postgres"
image: "postgres:latest"
volumes:
- hackernews-postgres-dev:/var/lib/postgresql/data
env_file:
- ./.env
ports:
- "5432:5432"
networks:
- docker-network
healthcheck:
test: ["CMD-SHELL", "pg_isready", "-d", "hackernews"]
interval: 10s
timeout: 60s
retries: 5
start_period: 80s
networks:
docker-network:
driver: bridge
volumes:
hackernews-postgres-dev: