-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose-prod.yml
More file actions
48 lines (48 loc) · 898 Bytes
/
docker-compose-prod.yml
File metadata and controls
48 lines (48 loc) · 898 Bytes
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
services:
postgres:
image: postgres
environment:
POSTGRES_DB: todo-prod
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- "5432:5432"
networks:
- backend
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d todo-prod"]
interval: 5s
timeout: 5s
retries: 5
go-api:
build: ./backend
volumes:
- ./backend:/app
working_dir: /app
command: ["air"]
ports:
- "3000:3000"
depends_on:
postgres:
condition: service_healthy
env_file:
- .env.dev
networks:
- backend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
volumes:
- "./frontend:/app"
ports:
- "8080:8080"
networks:
- backend
depends_on:
- go-api
env_file:
- .env.dev
networks:
backend:
driver: bridge