-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
92 lines (87 loc) · 2.86 KB
/
docker-compose.dev.yml
File metadata and controls
92 lines (87 loc) · 2.86 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
# ============================================
# PropManager Development Docker Compose Override
# Hot reload, exposed ports, mounted code
# ============================================
# Usage: docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build
# ============================================
services:
# ============================================
# PostgreSQL - Expose port for local tools
# ============================================
db:
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: devpassword
# ============================================
# Redis - Expose port for local tools
# ============================================
redis:
ports:
- "6379:6379"
# ============================================
# Django Development Server with Hot Reload
# ============================================
web:
build:
target: development
container_name: propmanager-web-dev
volumes:
# Mount source code for hot reload
- .:/app
# Exclude directories that should not be mounted
- /app/__pycache__
- /app/.git
- /app/staticfiles
- /app/node_modules
# Use named volume for static files
- dev_static:/app/staticfiles
environment:
- DJANGO_SETTINGS_MODULE=config.settings.development
- DATABASE_URL=postgres://propmanager:devpassword@db:5432/propmanager
- REDIS_URL=redis://redis:6379/0
- DEBUG=True
- DEV_OTP_CODE=123456
- SECRET_KEY=dev-secret-key-not-for-production-use-only
env_file: [] # Don't require .env.docker in development
ports:
- "8000:8000"
command: ["python", "manage.py", "runserver", "0.0.0.0:8000"]
# Disable health check in dev for faster startup
healthcheck:
disable: true
# Run as root in dev to avoid permission issues with mounted volumes
user: root
# ============================================
# Django-Q2 Worker (Development)
# ============================================
worker:
build:
target: development
container_name: propmanager-worker-dev
volumes:
- .:/app
- /app/__pycache__
- /app/.git
environment:
- DJANGO_SETTINGS_MODULE=config.settings.development
- DATABASE_URL=postgres://propmanager:devpassword@db:5432/propmanager
- REDIS_URL=redis://redis:6379/0
- SECRET_KEY=dev-secret-key-not-for-production-use-only
env_file: []
command: ["python", "manage.py", "qcluster"]
user: root
# Override depends_on - don't wait for web health check in dev
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
web:
condition: service_started
# ============================================
# Development Volumes
# ============================================
volumes:
dev_static:
name: propmanager-dev-static