Files
boc/quixzoom-token-system/docker-compose.yml
T

57 lines
1.4 KiB
YAML
Raw Normal View History

version: '3.8'
services:
# PostgreSQL med PostGIS
postgres:
image: postgres:15-alpine
environment:
POSTGRES_DB: quixzoom
POSTGRES_USER: quixzoom
POSTGRES_PASSWORD: quixzoom_dev
volumes:
- postgres_data:/var/lib/postgresql/data
- ./schema.sql:/docker-entrypoint-initdb.d/01-schema.sql
- ./seed.sql:/docker-entrypoint-initdb.d/02-seed.sql
ports:
- "5434:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U quixzoom"]
interval: 5s
timeout: 5s
retries: 5
# QZ Token API
token-api:
build:
context: ./api
dockerfile: Dockerfile
environment:
DATABASE_URL: postgresql://quixzoom:quixzoom_dev@postgres:5432/quixzoom
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY}
STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET}
PORT: 8080
ports:
- "8087:8080"
depends_on:
postgres:
condition: service_healthy
volumes:
- ./api:/app
command: npm start
# Cron-jobb för veckovis payout (måndagar 09:00)
payout-cron:
build:
context: ./cron
dockerfile: Dockerfile
environment:
DATABASE_URL: postgresql://quixzoom:quixzoom_dev@postgres:5432/quixzoom
API_BASE: http://token-api:8080
depends_on:
- token-api
# Kör varje måndag 09:00 UTC
# I produktion: använd riktig cron eller Kubernetes CronJob
volumes:
postgres_data: