46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: arkie-library-db
|
|
environment:
|
|
POSTGRES_USER: ark
|
|
POSTGRES_PASSWORD: ark
|
|
POSTGRES_DB: arkdb
|
|
ports:
|
|
# Host port 5433 avoids conflicts with any existing local PostgreSQL on 5432.
|
|
- "5433:5432"
|
|
volumes:
|
|
- arkie_postgres_data:/var/lib/postgresql/data
|
|
- ./migrations/001_init.sql:/docker-entrypoint-initdb.d/001_init.sql:ro
|
|
- ./migrations/002_wallet_auth.sql:/docker-entrypoint-initdb.d/002_wallet_auth.sql:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ark -d arkdb"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
api:
|
|
build: .
|
|
container_name: arkie-library-api
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
environment:
|
|
HTTP_ADDR: ":8080"
|
|
DATABASE_URL: "postgres://ark:ark@db:5432/arkdb?sslmode=disable"
|
|
JWT_SECRET: "local-dev-change-me"
|
|
CORS_ORIGINS: "${CORS_ORIGINS:-http://localhost:5173,http://localhost:3000}"
|
|
UPLOAD_DIR: "/app/uploads"
|
|
SEED_ADMIN: "${SEED_ADMIN:-true}"
|
|
ADMIN_EMAIL: "${ADMIN_EMAIL:-admin@ark.local}"
|
|
ADMIN_PASSWORD: "${ADMIN_PASSWORD:-admin123}"
|
|
RUN_WALLET_AUTH_SCHEMA: "true"
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- arkie_uploads:/app/uploads
|
|
|
|
volumes:
|
|
arkie_postgres_data:
|
|
arkie_uploads:
|