services:
  walletpress:
    build: .
    ports:
      - "8010:8010"
    volumes:
      - walletpress_data:/data
    environment:
      WP_ADMIN_KEY: "${WP_ADMIN_KEY:?WP_ADMIN_KEY is required}"
      WP_VAULT_PASSWORD: "${WP_VAULT_PASSWORD:?WP_VAULT_PASSWORD is required}"
      WP_HOST: "0.0.0.0"
      WP_PORT: "8010"
      WP_DATA_DIR: "/data"
      WP_RATE_LIMIT: "60"
      WP_CORS_ORIGINS: "http://localhost:8010"
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8010/health')"]
      interval: 30s
      timeout: 5s
      retries: 3
      start_period: 10s

volumes:
  walletpress_data:
