Spaces:
Sleeping
Sleeping
Refactor Docker setup: update docker-compose.yml to define app and db services, adjust ports, and configure environment variables; modify Dockerfile to use Python base image, install necessary dependencies, and set up application structure.
63f90ce
| version: '3.8' | |
| services: | |
| app: | |
| build: . | |
| ports: | |
| - "7860:7860" | |
| environment: | |
| - DATABASE_URL=postgresql://postgres:postgres@db:5432/audiobooks | |
| - STORAGE_PATH=/app/storage | |
| - PYTHONPATH=/app | |
| - LOG_LEVEL=INFO | |
| volumes: | |
| - app_storage:/app/storage | |
| - app_models:/app/models | |
| - app_logs:/app/logs | |
| depends_on: | |
| - db | |
| db: | |
| image: postgres:15-alpine | |
| environment: | |
| - POSTGRES_USER=postgres | |
| - POSTGRES_PASSWORD=postgres | |
| - POSTGRES_DB=audiobooks | |
| volumes: | |
| - postgres_data:/var/lib/postgresql/data | |
| ports: | |
| - "5432:5432" | |
| volumes: | |
| app_storage: | |
| app_models: | |
| app_logs: | |
| postgres_data: |