networks:
  proxy:
    external: true


services:

  pdfcraft:
    image: ghcr.io/pdfcrafttool/pdfcraft:latest
    container_name: pdfcraft
    hostname: pdfcraft
    restart: unless-stopped
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
    networks:
      - proxy

  bentopdf:
    image: ghcr.io/alam00000/bentopdf-simple:latest
    container_name: bentopdf
    hostname: bentopdf
    restart: unless-stopped
    networks:
      - proxy
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 10s

  stirling-pdf:
    image: frooodle/s-pdf:latest
    container_name: stirling-pdf
    hostname: stirling-pdf
    restart: unless-stopped
    volumes:
      - ${CONFIG_DIR}/stirling-pdf/configs:/configs
      - ${CONFIG_DIR}/stirling-pdf/logs:/logs
    environment:
      DOCKER_ENABLE_SECURITY: false   # passer à true si tu actives Authentik devant
      INSTALL_BOOK_AND_ADVANCED_HTML_OPS: false
      LANGS: fr_FR
      PUID: ${PUID}
      PGID: ${PGID}
      TZ: ${TZ}
    networks:
      - proxy
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/api/v1/info/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 15s

  erugo:
    image: wardy784/erugo:latest
    container_name: erugo
    hostname: erugo
    restart: unless-stopped
    volumes:
      - ${CONFIG_DIR}/erugo:/var/www/html/storage
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
      - TZ=${TZ}
    networks:
      - proxy

  it-tools:
    image: corentinth/it-tools:latest
    container_name: it-tools
    hostname: it-tools
    restart: unless-stopped
    networks:
      - proxy

  cyberchef:
    image: mpepping/cyberchef:latest
    container_name: cyberchef
    hostname: cyberchef
    restart: unless-stopped
    networks:
      - proxy

  openspeedtest:
    image: openspeedtest/latest
    container_name: openspeedtest
    hostname: openspeedtest
    restart: unless-stopped
    networks:
      - proxy

  excalidraw:
    image: excalidraw/excalidraw:latest
    container_name: excalidraw
    hostname: excalidraw
    restart: unless-stopped
    networks:
      - proxy

  pingvin-share:
    image: stonith404/pingvin-share:latest
    container_name: pingvin-share
    hostname: pingvin-share
    restart: unless-stopped
    volumes:
      - ${CONFIG_DIR}/pingvin-share/data:/opt/app/backend/data
      - ${CONFIG_DIR}/pingvin-share/uploads:/opt/app/uploads
    environment:
      TZ: ${TZ}
    networks:
      - proxy

########################
## Stack Paperless-ngx
########################

  paperless-cache:
    image: docker.io/library/redis:latest
    container_name: paperless-cache
    hostname: paperless-cache
    restart: unless-stopped
    volumes:
      - ${CONFIG_DIR}/paperless/redis:/data:rw
    environment:
      - TZ=${TZ}
    networks:
      - proxy

  paperless-db:
    image: docker.io/library/postgres:latest
    container_name: paperless-db
    hostname: paperless-db
    restart: unless-stopped
    volumes:
      - ${CONFIG_DIR}/paperless/postgresql:/var/lib/postgresql
    environment:
      - TZ=${TZ}
      - POSTGRES_DB=paperless
      - POSTGRES_USER=paperless
      - POSTGRES_PASSWORD=DW0e6fyWRNRqx9X&hHS1bR41g73a
    networks:
      - proxy

  paperless-ngx:
    image: ghcr.io/paperless-ngx/paperless-ngx:latest
    restart: unless-stopped
    container_name: paperless-ngx
    depends_on:
      - paperless-db
      - paperless-cache
      - paperless-gotenberg
      - paperless-tika
    volumes:
      - ${CONFIG_DIR}/paperless:/usr/src/paperless/data
      - ${DATA_DIR}/paperless/media:/usr/src/paperless/media
      - ${DATA_DIR}/paperless/export:/usr/src/paperless/export
      - ${DATA_DIR}/paperless/consume:/usr/src/paperless/consume
    environment:
      - TZ=${TZ}
      - PAPERLESS_REDIS=redis://paperless-cache:6379
      - PAPERLESS_DBHOST=paperless-db
      - PAPERLESS_DBNAME=paperless
      - PAPERLESS_DBUSER=paperless
      - PAPERLESS_DBPASS=DW0e6fyWRNRqx9X&hHS1bR41g73a
      - USERMAP_UID=1000
      - USERMAP_GID=1000
      - PAPERLESS_TIME_ZONE=Europe/Paris
      - PAPERLESS_ADMIN_USER=julien
      - PAPERLESS_ADMIN_PASSWORD=f27cYeXPYm7zBBtLBxPEH#0^*XU0
      - PAPERLESS_URL=https://paperless.jujub.eu
      - PAPERLESS_CSRF_TRUSTED_ORIGINS=https://paperless.jujub.eu
      - PAPERLESS_OCR_LANGUAGE=fra+eng
      - PAPERLESS_TIKA_ENABLED=1
      - PAPERLESS_TIKA_GOTENBERG_ENDPOINT=http://paperless-gotenberg:3000
      - PAPERLESS_TIKA_ENDPOINT=http://paperless-tika:9998
    networks:
      - proxy

  paperless-gotenberg:
    image: docker.io/gotenberg/gotenberg:latest
    container_name: paperless-gotenberg
    hostname: paperless-gotenberg
    restart: unless-stopped
    command:
      - "gotenberg"
      - "--chromium-disable-javascript=true"
      - "--chromium-allow-list=file:///tmp/.*"
    environment:
      - TZ=${TZ}
    networks:
      - proxy

  paperless-tika:
    image: docker.io/apache/tika:latest
    container_name: paperless-tika
    hostname: paperless-tika
    restart: unless-stopped
    environment:
      - TZ=${TZ}
    networks:
      - proxy

########################
########################

  13ft:
    image: ghcr.io/wasi-master/13ft:latest
    container_name: 13ft
    hostname: 13ft
    restart: unless-stopped
    networks:
      - proxy

  convertx:
    image: ghcr.io/c4illin/convertx:latest
    container_name: convertx
    hostname: convertx
    restart: unless-stopped
    environment:
      - TZ=${TZ}
      - JWT_SECRET=pCq1i2UvNaLZl9ifoFWPwB3cbW0459tWZ0+mF2uPaRE=
      - ACCOUNT_REGISTRATION="false"
      - HTTP_ALLOWED="false"
      - ALLOW_UNAUTHENTICATED="false"
    volumes:
      - ${CONFIG_DIR}/convertx:/app/data
    networks:
      - proxy
