35 lines
976 B
YAML
35 lines
976 B
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
ports:
|
|
- "8000:8000"
|
|
volumes:
|
|
# Mount source code for hot-reloading during development
|
|
- ./src:/app/src:ro
|
|
# Persist database to local directory
|
|
- ./data:/data
|
|
environment:
|
|
# Set environment to development for hot-reloading and debug features
|
|
- ENVIRONMENT=development
|
|
# Optional: Override admin credentials for development
|
|
- ADMIN_USERNAME=admin
|
|
- ADMIN_PASSWORD=password
|
|
# Optional: Use Redis for token storage (uncomment redis service below)
|
|
# - REDIS_URI=redis://redis:6379/0
|
|
command: ["--host", "0.0.0.0", "--port", "8000", "--reload"]
|
|
restart: unless-stopped
|
|
|
|
# Uncomment to enable Redis token storage
|
|
# redis:
|
|
# image: redis:7-alpine
|
|
# ports:
|
|
# - "6379:6379"
|
|
# volumes:
|
|
# - redis-data:/data
|
|
# restart: unless-stopped
|
|
# Uncomment if using Redis
|
|
# volumes:
|
|
# redis-data:
|