# documentation: https://github.com/basecamp/once-campfire
# slogan: Super simple group chat, without a subscription.
# category: messaging
# tags: campfire,chat,communication,rails,once,basecamp,37signals
# logo: svgs/once-campfire.png
# port: 80

services:
  campfire:
    image: ghcr.io/basecamp/once-campfire:${TAG:-main}
    restart: unless-stopped
    volumes:
      - campfire-storage:/rails/storage
    environment:
      - SERVICE_URL_CAMPFIRE_80
      - SECRET_KEY_BASE=${SERVICE_BASE64_64_CAMPFIRE}    # required, set this to a secure random value
      - VAPID_PUBLIC_KEY=${VAPID_PUBLIC_KEY}             # optional, for notifications
      - VAPID_PRIVATE_KEY=${VAPID_PRIVATE_KEY}           # optional, for notifications
      - DISABLE_SSL=${DISABLE_SSL:-true}                 # optional, disable SSL
      - SSL_DOMAIN=${SSL_DOMAIN:-false}                  # optional, for SSL
      - SKIP_TELEMETRY=${SKIP_TELEMETRY:-true}           # optional, set to disable telemetry
      - SENTRY_DSN=${SENTRY_DSN}                         # optional, for error reporting
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost/up"]
      interval: 10s
      timeout: 5s
      retries: 5
