# Shade Prekey Server — Dokploy / Docker Compose deployment
#
# Pulls the published image from Gitea's container registry. Change
# `my-project-shade` to something project-specific so you can run multiple
# Shade instances side-by-side (one per project).
#
# Usage:
#   docker compose up -d
#
# To build locally from source instead of pulling, uncomment the `build:`
# section and comment out `image:`.

services:
  shade-prekey:
    container_name: my-project-shade
    image: gt.zyon.no/stian/shade-prekey:latest
    # build:
    #   context: ../..
    #   dockerfile: packages/shade-server/Dockerfile
    restart: unless-stopped
    ports:
      - "3900:3900"
    volumes:
      - shade-data:/data
    environment:
      - PORT=3900
      - SHADE_PREKEY_DB_PATH=/data/shade-prekeys.db
      - SHADE_LOG_LEVEL=info
      - SHADE_STALE_DAYS=30
      - SHADE_CLEANUP_INTERVAL_HOURS=24
      # Optional: enable the live observer dashboard at /shade-observer/dashboard/
      # Token must be at least 16 characters. Use a real secret in production.
      # - SHADE_OBSERVER_TOKEN=change-me-must-be-at-least-16-chars
    healthcheck:
      test: ["CMD", "curl", "-fsS", "http://localhost:3900/health"]
      interval: 30s
      timeout: 5s
      start_period: 10s
      retries: 3

volumes:
  shade-data:
