-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (34 loc) · 904 Bytes
/
docker-compose.yml
File metadata and controls
37 lines (34 loc) · 904 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
version: '3.8'
services:
web:
build: .
container_name: finance-dashboard
ports:
- "8000:8000"
environment:
- DEBUG=True
- SECRET_KEY=django-insecure-development-key
- ALLOWED_HOSTS=localhost,127.0.0.1
volumes:
- .:/app
command: python manage.py runserver 0.0.0.0:8000
healthcheck:
test: ["CMD", "python", "-c", "import requests; requests.get('http://localhost:8000/', timeout=5)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
# Optional: PostgreSQL (for production upgrade)
# db:
# image: postgres:15
# container_name: finance-db
# environment:
# POSTGRES_DB: finance_db
# POSTGRES_USER: finance_user
# POSTGRES_PASSWORD: secure_password
# volumes:
# - postgres_data:/var/lib/postgresql/data
# ports:
# - "5432:5432"
# volumes:
# postgres_data: