feat: add Docker configuration for containerized deployment
This commit is contained in:
parent
f29dcad16e
commit
80fe7a99f0
4 changed files with 173 additions and 0 deletions
40
docker-compose.yml
Normal file
40
docker-compose.yml
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
version: '3.8'
|
||||
|
||||
services:
|
||||
gis-classification:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: gis-classification
|
||||
ports:
|
||||
- "8000:8000"
|
||||
volumes:
|
||||
# Mount data directory for input files
|
||||
- ./data:/app/data
|
||||
# Mount output directory for results
|
||||
- ./output:/app/output
|
||||
# Mount static files (frontend)
|
||||
- ./static:/app/static
|
||||
environment:
|
||||
- PYTHONUNBUFFERED=1
|
||||
# Optional: Set max upload size (in bytes)
|
||||
- MAX_UPLOAD_SIZE=104857600
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 40s
|
||||
|
||||
# Optional: Add nginx reverse proxy for production
|
||||
# nginx:
|
||||
# image: nginx:alpine
|
||||
# container_name: gis-nginx
|
||||
# ports:
|
||||
# - "80:80"
|
||||
# volumes:
|
||||
# - ./nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
# depends_on:
|
||||
# - gis-classification
|
||||
# restart: unless-stopped
|
||||
Loading…
Add table
Add a link
Reference in a new issue