-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
61 lines (61 loc) · 1.05 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
services:
api:
build: .
depends_on:
db:
condition: service_healthy
healthcheck:
test: [ "CMD", "curl", "http://localhost:8080" ]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
develop:
watch:
- action: rebuild
path: ./
target: /go
ports:
- "8080:8081"
environment:
- PORT=8081
env_file:
- .env.api
volumes:
- mydata:/data
networks:
- myapp-network
db:
image: postgres
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
ports:
- "5432:5432"
env_file:
- .env.db
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- myapp-network
nginx:
image: nginx
ports:
- "80:80"
networks:
- myapp-network
depends_on:
- api
adminer:
image: adminer
profiles:
- dev
ports:
- "9000:8080"
volumes:
mydata:
postgres_data:
networks:
myapp-network: