services:
  bookstack:
    image: lscr.io/linuxserver/bookstack:latest
    container_name: bookstack
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - APP_URL=http://100.82.197.124:6875
      - DB_HOST=bookstack-db
      - DB_PORT=3306
      - DB_USER=bookstack
      - DB_PASS="REDACTED_PASSWORD"
      - DB_DATABASE=bookstack
      - APP_KEY=base64:OyXRjle+VXdiPS2BBADYCrHSS/rCAo/VE9m2fW97YW8=
    volumes:
      - /opt/bookstack/data:/config
    ports:
      - "100.82.197.124:6875:80"
    depends_on:
      - bookstack-db
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:80/status"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 30s

  bookstack-db:
    image: lscr.io/linuxserver/mariadb:latest
    container_name: bookstack-db
    restart: unless-stopped
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Los_Angeles
      - MYSQL_ROOT_PASSWORD="REDACTED_PASSWORD"
      - MYSQL_DATABASE=bookstack
      - MYSQL_USER=bookstack
      - MYSQL_PASSWORD="REDACTED_PASSWORD"
    volumes:
      - /opt/bookstack/db:/config
