version: '2.2'
services:
  wekandb:
    image: mongo:6
    restart: always
    command: mongod --logpath /dev/null --oplogSize 128 --quiet
    networks:
      - wekan-tier
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /srv/wekan/other/db:/data/db

  wekan:
    image: ghcr.io/wekan/wekan:latest
    restart: always
    env_file:
      - /etc/ixvd/secrets/env/wekan.env
    environment:
      ROOT_URL: "https://boards.ixvd.net"
      WRITABLE_PATH: "/data"
      MONGO_URL: "mongodb://wekandb:27017/wekan"
      MAIL_FROM: "Wekan Notifications <boards@ixvd.net>"
      WITH_API: "true"
      RICHER_CARD_COMMENT_EDITOR: "false"
      CARD_OPENED_WEBHOOK_ENABLED: "false"
      BIGEVENTS_PATTERN: "NONE"
      BROWSER_POLICY_ENABLED: "true"
      OIDC_REDIRECTION_ENABLED: "true"
      OAUTH2_ENABLED: "true"
      OAUTH2_LOGIN_STYLE: "redirect"
    depends_on:
      - wekandb
    networks:
      - wekan-tier
      - proxy
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - wekan-data:/data:rw

volumes:
  wekan-data:
    driver: local
    driver_opts:
      type: none
      device: /srv/wekan/data
      o: bind

networks:
  wekan-tier: