maybe good

This commit is contained in:
HotSwapp
2025-08-08 15:55:15 -05:00
parent ab6f163c15
commit b257a06787
80 changed files with 19739 additions and 0 deletions

59
docker-compose.yml Normal file
View File

@@ -0,0 +1,59 @@
services:
delphi-db:
build: .
container_name: delphi-database
ports:
- "${EXTERNAL_PORT:-6920}:8000"
environment:
- DATABASE_URL=${DATABASE_URL:-sqlite:///data/delphi_database.db}
- SECRET_KEY=${SECRET_KEY}
- DEBUG=${DEBUG:-False}
- ACCESS_TOKEN_EXPIRE_MINUTES=${ACCESS_TOKEN_EXPIRE_MINUTES:-30}
- CREATE_ADMIN_USER=${CREATE_ADMIN_USER:-false}
- ADMIN_USERNAME=${ADMIN_USERNAME:-admin}
- ADMIN_EMAIL=${ADMIN_EMAIL:-admin@delphicg.local}
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
- ADMIN_FULLNAME=${ADMIN_FULLNAME:-System Administrator}
- WORKERS=${WORKERS:-4}
- WORKER_TIMEOUT=${WORKER_TIMEOUT:-120}
- LOG_LEVEL=${LOG_LEVEL:-INFO}
volumes:
# Database and persistent data
- delphi_data:/app/data
# File uploads
- delphi_uploads:/app/uploads
# Database backups
- delphi_backups:/app/backups
# Optional: Mount local directory for development
# - ./data:/app/data
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Optional: Nginx reverse proxy for production
nginx:
image: nginx:alpine
container_name: delphi-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./nginx/ssl:/etc/nginx/ssl:ro
- delphi_uploads:/var/www/uploads:ro
depends_on:
- delphi-db
restart: unless-stopped
profiles: ["production"]
volumes:
delphi_data:
driver: local
delphi_uploads:
driver: local
delphi_backups:
driver: local