Files
terra-view/docker-compose.yml
Claude 05c63367c8 Containerize backend with Docker Compose
Added Docker support for easy deployment:
- Dockerfile: Python 3.11 slim image with FastAPI app
- docker-compose.yml: Service definition with volume mounting for data persistence
- .dockerignore: Exclude unnecessary files from Docker build
- database.py: Updated to store SQLite DB in ./data directory for volume persistence
- .gitignore: Added entries for database files and data directory
- README.md: Comprehensive documentation with Docker and local setup instructions

The application can now be run with: docker compose up -d
Database persists in ./data directory mounted as a volume
2025-11-20 18:46:46 +00:00

24 lines
446 B
YAML

version: '3.8'
services:
seismo-backend:
build: .
container_name: seismo-fleet-manager
ports:
- "8000:8000"
volumes:
# Persist SQLite database
- ./data:/app/data
environment:
- PYTHONUNBUFFERED=1
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
data: