-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
76 lines (72 loc) · 1.7 KB
/
docker-compose.yml
File metadata and controls
76 lines (72 loc) · 1.7 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
version: '3.8'
services:
# Main application service
app:
build:
context: .
dockerfile: Dockerfile
target: production
container_name: task-management-app
ports:
- "8000:8000"
environment:
- APP_NAME=Task Management System
- APP_VERSION=1.0.0
- DEBUG=False
- ENVIRONMENT=production
- DATABASE_URL=sqlite:///./data/task_management.db
- API_V1_STR=/api/v1
- HOST=0.0.0.0
- PORT=8000
volumes:
- app_data:/app/data
- app_logs:/app/logs
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import requests; requests.get('http://localhost:8000/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- task_management_network
# Development service with hot reload
app-dev:
build:
context: .
dockerfile: Dockerfile
target: production
container_name: task-management-app-dev
ports:
- "8001:8000"
environment:
- APP_NAME=Task Management System (Dev)
- APP_VERSION=1.0.0
- DEBUG=True
- ENVIRONMENT=development
- DATABASE_URL=sqlite:///./data/task_management_dev.db
- API_V1_STR=/api/v1
- HOST=0.0.0.0
- PORT=8000
volumes:
- .:/app
- app_data_dev:/app/data
- app_logs_dev:/app/logs
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
restart: unless-stopped
networks:
- task_management_network
profiles:
- dev
volumes:
app_data:
driver: local
app_logs:
driver: local
app_data_dev:
driver: local
app_logs_dev:
driver: local
networks:
task_management_network:
driver: bridge