services:
  l484-onprem:
    build:
      context: .
      dockerfile: Dockerfile
    container_name: l484-onprem
    restart: unless-stopped
    ports:
      - "2354:2354"
    environment:
      NODE_ENV: production
      HOST: 0.0.0.0
      PORT: 2354
      APP_MODE: admin
      MEMBERSHIP_ENCRYPTION_KEY: ${MEMBERSHIP_ENCRYPTION_KEY:?Set a unique 64-character hex key}
      ACCESS_HMAC_KEY: ${ACCESS_HMAC_KEY:?Set a unique access HMAC key}
      ACCESS_CONTROLLER_TOKEN: ${ACCESS_CONTROLLER_TOKEN:?Set a unique door-controller token}
      MASTER_ADMIN_PUBKEY: ${MASTER_ADMIN_PUBKEY:?Set the master admin npub}
      HOME_ASSISTANT_UNLOCK_WEBHOOK_URL: ${HOME_ASSISTANT_UNLOCK_WEBHOOK_URL:-}
      HOME_ASSISTANT_UNLOCK_TIMEOUT_MS: ${HOME_ASSISTANT_UNLOCK_TIMEOUT_MS:-2500}
      BTCPAY_SERVER_URL: ${BTCPAY_SERVER_URL:-}
      BTCPAY_STORE_ID: ${BTCPAY_STORE_ID:-}
      BTCPAY_API_KEY: ${BTCPAY_API_KEY:-}
      BTCPAY_WEBHOOK_SECRET: ${BTCPAY_WEBHOOK_SECRET:-}
      VAPID_PUBLIC_KEY: ${VAPID_PUBLIC_KEY:-}
      VAPID_PRIVATE_KEY: ${VAPID_PRIVATE_KEY:-}
      VAPID_SUBJECT: ${VAPID_SUBJECT:-mailto:admin@l484.com}
    volumes:
      - l484-onprem-data:/app/server/data

volumes:
  l484-onprem-data:
