-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
97 lines (92 loc) · 2.43 KB
/
docker-compose.yml
File metadata and controls
97 lines (92 loc) · 2.43 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
86
87
88
89
90
91
92
93
94
95
96
97
services:
postgres:
image: postgres:15-alpine
container_name: projectmanagement_postgres
restart: unless-stopped
environment:
POSTGRES_DB: projectmanagement_dev
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
networks:
- app_network
redis:
image: redis:7-alpine
container_name: projectmanagement_redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- app_network
backend:
build:
context: .
dockerfile: Dockerfile
image: thanhhvxqt/project_management-backend:latest
container_name: thanhhvxqt_project_management-backend
restart: unless-stopped
ports:
- "5000:80"
- "5001:443"
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80
- ConnectionStrings__DefaultConnection=Host=postgres;Port=5432;Database=projectmanagement_dev;Username=postgres;Password=postgres
- ConnectionStrings__Redis=redis:6379
- Jwt__Key=YourSuperSecretKeyThatIsAtLeast32CharactersLong!@#$$%^&*()
- Jwt__Issuer=TrelloCloneApi
- Jwt__Audience=TrelloCloneClient
- ClientUrl=http://localhost:3000
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
volumes:
- ./src/Web/wwwroot/uploads:/app/wwwroot/uploads
healthcheck:
test: ["CMD-SHELL", "wget -q -O /dev/null --timeout=5 http://127.0.0.1:80/health || exit 1"]
start_period: 120s
interval: 30s
timeout: 10s
retries: 5
networks:
- app_network
frontend:
build:
context: ./src/Web/frontend
dockerfile: Dockerfile
image: thanhhvxqt/project_management-frontend:latest
container_name: thanhhvxqt_project_management-frontend
restart: unless-stopped
ports:
- "3000:80"
depends_on:
backend:
condition: service_healthy
networks:
- app_network
volumes:
postgres_data:
driver: local
redis_data:
driver: local
networks:
app_network:
driver: bridge