networks:
  traefik:
    external: true
  karakeep:
    driver: bridge

services:
  web:
    image: ghcr.io/karakeep-app/karakeep:release
    container_name: karakeep
    restart: unless-stopped
    volumes:
      - /pwspool/software/karakeep/data:/data
    env_file:
      - karakeep.env
    networks:
      - karakeep
      - traefik
    labels:
      - traefik.http.routers.karakeep.rule=Host(`kb.whitney.rip`)
      - traefik.http.routers.karakeep.tls=true
      - traefik.http.routers.karakeep.tls.certresolver=lets-encrypt
      - traefik.http.services.karakeep.loadbalancer.server.port=3000

  chrome:
    image: gcr.io/zenika-hub/alpine-chrome:latest
    container_name: karakeep-chrome
    restart: unless-stopped
    networks:
      - karakeep
    command:
      - --no-sandbox
      - --disable-gpu
      - --disable-dev-shm-usage
      - --remote-debugging-address=0.0.0.0
      - --remote-debugging-port=9222
      - --hide-scrollbars
    labels:
      - traefik.enable=false

  meilisearch:
    image: getmeili/meilisearch:latest
    container_name: karakeep-meili
    restart: unless-stopped
    env_file:
      - meili.env
    networks:
      - karakeep
    volumes:
      - meilisearch:/meili_data
    labels:
      - traefik.enable=false

volumes:
  meilisearch:
  data:
