- docker-compose: DATA_DIR env var controls data volume mount (defaults to ./data for local, /var/www/html/gmal-scope-builder/data on server) - deploy.sh: resolve DATA_DIR from .env, default to persistent web dir - deploy.sh: rm only frontend files from WEB_DIR, preserve data/ subdir - .env.example: document DATA_DIR variable Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
35 lines
1,016 B
YAML
35 lines
1,016 B
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: scope_builder
|
|
POSTGRES_USER: scope_user
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-scope_pass_2024}
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U scope_user -d scope_builder"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 5
|
|
|
|
backend:
|
|
build: ./backend
|
|
restart: unless-stopped
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: postgresql+asyncpg://scope_user:${POSTGRES_PASSWORD:-scope_pass_2024}@db:5432/scope_builder
|
|
DATABASE_URL_SYNC: postgresql://scope_user:${POSTGRES_PASSWORD:-scope_pass_2024}@db:5432/scope_builder
|
|
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
|
|
AZURE_TENANT_ID: ${AZURE_TENANT_ID}
|
|
AZURE_CLIENT_ID: ${AZURE_CLIENT_ID}
|
|
ports:
|
|
- "127.0.0.1:8002:8000"
|
|
volumes:
|
|
- ${DATA_DIR:-./data}:/app/data
|
|
|
|
volumes:
|
|
pgdata:
|