mirror of
https://github.com/sassanix/Warracker.git
synced 2026-01-01 11:09:40 -06:00
52 lines
1.5 KiB
YAML
52 lines
1.5 KiB
YAML
version: '3'
|
|
|
|
services:
|
|
warracker:
|
|
build: .
|
|
ports:
|
|
- "8005:80"
|
|
volumes:
|
|
- ./uploads:/data/uploads
|
|
- ./backend/migrations:/app/migrations
|
|
environment:
|
|
- DB_HOST=warrackerdb
|
|
- DB_NAME=warranty_db
|
|
- DB_USER=warranty_user
|
|
- DB_PASSWORD=${DB_PASSWORD:-warranty_password}
|
|
- DB_ADMIN_USER=warracker_admin
|
|
- DB_ADMIN_PASSWORD=${DB_ADMIN_PASSWORD:-change_this_password_in_production}
|
|
- SMTP_HOST=${SMTP_HOST:-localhost}
|
|
- SMTP_PORT=${SMTP_PORT:-1025}
|
|
- SMTP_USERNAME=${SMTP_USERNAME:-notifications@warracker.com}
|
|
- SMTP_PASSWORD=${SMTP_PASSWORD:-}
|
|
- PYTHONUNBUFFERED=1
|
|
depends_on:
|
|
warrackerdb:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
command: >
|
|
bash -c "
|
|
cd /app && ls -la /app/migrations &&
|
|
python /app/migrations/apply_migrations.py &&
|
|
python /app/fix_permissions.py &&
|
|
exec /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf
|
|
"
|
|
|
|
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: |