-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
103 lines (83 loc) · 2.66 KB
/
docker-compose.dev.yml
File metadata and controls
103 lines (83 loc) · 2.66 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
98
99
100
101
102
103
# ============================================================================
# UCM - Docker Compose Development Configuration
# ============================================================================
# Development setup with hot-reload, debugging, and verbose logging
#
# Usage:
# docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
# ============================================================================
services:
ucm:
build:
context: .
dockerfile: Dockerfile
# Mount source code for hot-reload
volumes:
- ./backend:/opt/ucm/backend:rw
- ./frontend:/opt/ucm/frontend:rw
- ucm-data:/opt/ucm/data
# Don't mount these (keep container versions)
# - ./backend/__pycache__
# - ./backend/.pytest_cache
# Development environment
environment:
# Debug mode
- UCM_DEBUG=true
- UCM_LOG_LEVEL=DEBUG
# Flask debug mode (hot-reload)
- FLASK_DEBUG=true
# Disable caching for development
- UCM_CACHE_ENABLED=false
# Disable backups for development
- UCM_BACKUP_ENABLED=false
# Verbose SQL logging
- SQL_DEBUG=false # Set true if needed (very verbose!)
# Test SMTP (use Mailhog or similar)
- UCM_SMTP_ENABLED=false
- UCM_SMTP_SERVER=mailhog
- UCM_SMTP_PORT=1025
- UCM_SMTP_TLS=false
# Override command to use Flask dev server with auto-reload
command: python3 -m flask run --host=0.0.0.0 --port=8443 --cert=data/https_cert.pem --key=data/https_key.pem --reload
# Expose additional ports for debugging
ports:
- "${UCM_HTTPS_PORT:-8443}:8443"
- "${UCM_HTTP_PORT:-8080}:8080"
- "5678:5678" # Python debugger (debugpy)
# Relaxed resource limits for development
deploy:
resources:
limits:
cpus: '2'
memory: 2G
# Development logging (more verbose)
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
labels:
- "com.ultimate-ca-manager.environment=development"
# Optional: Mailhog for testing email notifications
mailhog:
image: mailhog/mailhog:latest
container_name: ucm-mailhog
restart: unless-stopped
ports:
- "8025:8025" # Web UI
- "1025:1025" # SMTP
networks:
- ucm-network
labels:
- "com.ultimate-ca-manager.service=mailhog"
# Optional: Redis for testing caching
# redis:
# image: redis:alpine
# container_name: ucm-redis
# restart: unless-stopped
#
# ports:
# - "6379:6379"
#
# networks:
# - ucm-network