mirror of
https://github.com/sassanix/Warracker.git
synced 2025-12-31 10:39:35 -06:00
1. **Simplified nginx configuration:** - Changed from `root /data` back to `alias /data/uploads/` which is the correct way to map `/uploads/` to `/data/uploads/` - Removed potentially conflicting location blocks - Fixed the error handling to not redirect upload 404s to the index page 2. **Improved startup script:** - Added checking and reporting of directory permissions - Added explicit chmod during startup 3. **Simplified Flask route:** - Removed all the complex debugging code - Returned to a simple `send_from_directory` call 4. **Added a basic test file:** - Created ping.html to test basic nginx functionality
35 lines
890 B
YAML
35 lines
890 B
YAML
services:
|
|
warracker:
|
|
build: .
|
|
ports:
|
|
- "8005:80"
|
|
volumes:
|
|
- ./uploads:/data/uploads
|
|
environment:
|
|
- DB_HOST=warrackerdb
|
|
- DB_NAME=warranty_db
|
|
- DB_USER=warranty_user
|
|
- DB_PASSWORD=${DB_PASSWORD:-warranty_password}
|
|
depends_on:
|
|
warrackerdb:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
warrackerdb:
|
|
image: "postgres:15-alpine"
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
- ./backend/init.sql:/docker-entrypoint-initdb.d/init.sql
|
|
environment:
|
|
- POSTGRES_DB=warranty_db
|
|
- POSTGRES_USER=warranty_user
|
|
- POSTGRES_PASSWORD=${DB_PASSWORD:-warranty_password}
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U warranty_user -d warranty_db"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
volumes:
|
|
postgres_data: |