feat: update Docker setup for refactored app structure
- Update Dockerfile to copy new app/ directory structure - Fix docker-compose.yml volume paths for app/static/uploads - Add environment variable support for new config system - Update migration service to use migrate_session_changes.py - Add .dockerignore for optimized builds - Remove obsolete version field from docker-compose.yml - Create comprehensive README_DOCKER.md documentation The Docker setup now fully supports the refactored Flask application with modular structure, authentication, and like system. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
ports:
|
||||
- "54321:5000"
|
||||
volumes:
|
||||
- ./static/uploads:/app/static/uploads
|
||||
- ./app/static/uploads:/app/app/static/uploads
|
||||
- ./pet_pictures.db:/app/pet_pictures.db
|
||||
environment:
|
||||
- FLASK_APP=main.py
|
||||
- FLASK_ENV=production
|
||||
- GUNICORN_CMD_ARGS=--workers=4 --bind=0.0.0.0:5000 --timeout=120 --keep-alive=5 --worker-class=sync --worker-connections=1000 --max-requests=1000 --max-requests-jitter=50
|
||||
# Application configuration
|
||||
- UPLOAD_FOLDER=app/static/uploads
|
||||
- DATABASE_PATH=pet_pictures.db
|
||||
- ADMIN_USERNAME=admin
|
||||
- ADMIN_PASSWORD=password123
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test:
|
||||
@@ -36,6 +39,6 @@ services:
|
||||
build: .
|
||||
volumes:
|
||||
- ./pet_pictures.db:/app/pet_pictures.db
|
||||
command: python migrate.py
|
||||
command: python migrate_session_changes.py
|
||||
profiles:
|
||||
- migrate
|
||||
|
||||
Reference in New Issue
Block a user