-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (80 loc) · 1.99 KB
/
docker-compose.yml
File metadata and controls
85 lines (80 loc) · 1.99 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
83
84
85
services:
postgres:
image: postgres:16-alpine
environment:
- POSTGRES_DB=${POSTGRES_DB:-taskmanagement}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres}
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- taskmanagement-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-taskmanagement}"]
interval: 10s
retries: 10
start_period: 10s
timeout: 3s
restart: unless-stopped
caddy:
container_name: caddy-prox
image: caddy:2-alpine
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile
- caddy_data:/data
- caddy_config:/config
networks:
- taskmanagement-network
depends_on:
- auth-service
- api-service
auth-service:
build:
context: .
dockerfile: src/TaskManagement.Auth/Dockerfile
args:
- BUILD_CONFIGURATION=${BUILD_CONFIGURATION:-Release}
depends_on:
postgres:
condition: service_healthy
networks:
- taskmanagement-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
restart: unless-stopped
api-service:
build:
context: .
dockerfile: src/TaskManagement.Api/Dockerfile
args:
- BUILD_CONFIGURATION=${BUILD_CONFIGURATION:-Release}
depends_on:
postgres:
condition: service_healthy
auth-service:
condition: service_healthy
networks:
- taskmanagement-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 10s
timeout: 5s
retries: 3
start_period: 30s
restart: unless-stopped
networks:
taskmanagement-network:
driver: bridge
volumes:
postgres-data:
caddy_data:
caddy_config:
driver: local