ozone Docker & Self-Hosted Deployment

GitHub

Web interface for labeling content in atproto / Bluesky

544 stars TypeScript TypeScript 3 files ยท ~5,647 tokens #atproto#bluesky#moderation#nextjs
RAW Compose
1. Pull Image (GHCR) docker pull ghcr.io/bluesky-social/ozone
2. Docker Run (1-Click Launch) docker run -d --name ozone --restart always ghcr.io/bluesky-social/ozone:0.1
3. Podman Run podman run -d --name ozone --restart always ghcr.io/bluesky-social/ozone:0.1
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://ghcr.io/bluesky-social/ozone:0.1
5. ORAS Pull (OCI Artifact) oras pull ghcr.io/bluesky-social/ozone:0.1
6. Compose Deployment docker compose up -d
service/compose.yaml
Download .yml
# @NOTE: this compose file is intended to accompany the guide found in HOSTING.md
version: '3.9'
services:
  caddy:
    container_name: caddy
    image: caddy:2
    network_mode: host
    depends_on:
      - ozone
    restart: unless-stopped
    volumes:
      - type: bind
        source: /ozone/caddy/data
        target: /data
      - type: bind
        source: /ozone/caddy/etc/caddy
        target: /etc/caddy
    labels:
      - 'com.centurylinklabs.watchtower.enable=true'
  ozone:
    container_name: ozone
    image: ghcr.io/bluesky-social/ozone:0.1
    network_mode: host
    restart: unless-stopped
    healthcheck:
      test:
        - CMD
        - node
        - -e
        - "fetch('http://127.0.0.1:' + (process.env.OZONE_PORT || '3000') + '/xrpc/_health', { signal: AbortSignal.timeout(4000) }).then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"
      interval: 10s
      timeout: 5s
      start_period: 60s
      retries: 12
    depends_on:
      postgres:
        condition: service_healthy
    env_file:
      - /ozone/ozone.env
    labels:
      - 'com.centurylinklabs.watchtower.enable=true'
  ozone-daemon:
    container_name: ozone-daemon
    image: ghcr.io/bluesky-social/ozone:0.1
    network_mode: host
    restart: unless-stopped
    depends_on:
      ozone:
        condition: service_healthy
    env_file:
      - /ozone/ozone.env
    command: ["node", "./service/daemon.js"]
    profiles:
      - daemon
    labels:
      - 'com.centurylinklabs.watchtower.enable=true'
  postgres:
    container_name: postgres
    image: postgres:14.11-bookworm
    command: postgres -c listen_addresses=localhost
    network_mode: host
    restart: unless-stopped
    healthcheck:
      test: pg_isready -h localhost -U $$POSTGRES_USER
      interval: 2s
      timeout: 5s
      retries: 10
    volumes:
      - type: bind
        source: /ozone/postgres
        target: /var/lib/postgresql/data
    env_file:
      - /ozone/postgres.env
  watchtower:
    container_name: watchtower
    # we're using a fork of watchtower, as containrrr/watchtower hasn't been
    # updated in 2 years and is incompatible with latest docker on debian:
    image: nickfedor/watchtower:latest
    network_mode: host
    volumes:
      - type: bind
        source: /var/run/docker.sock
        target: /var/run/docker.sock
    restart: unless-stopped
    environment:
      WATCHTOWER_CLEANUP: true
      WATCHTOWER_SCHEDULE: '@midnight'
      WATCHTOWER_LABEL_ENABLE: true