services:
  infra-cms:
    image: directus/directus:11
    ports:
      - "8059:8055"
    networks:
      - default
      - infra
    environment:
      KEY: "infra-cms-key"
      SECRET: "infra-cms-secret"
      ADMIN_EMAIL: "marc@mintel.me"
      ADMIN_PASSWORD: "Tim300493."
      DB_CLIENT: "sqlite3"
      DB_FILENAME: "/directus/database/data.db"
      WEBSOCKETS_ENABLED: "true"
      EMAIL_TRANSPORT: "smtp"
      EMAIL_SMTP_HOST: "smtp.eu.mailgun.org"
      EMAIL_SMTP_PORT: "587"
      EMAIL_SMTP_USER: "postmaster@mg.mintel.me"
      EMAIL_SMTP_PASSWORD: "4592fcb94599ee1a45b4ac2386fd0a64-102c75d8-ca2870e6"
      EMAIL_SMTP_SECURE: "false"
      EMAIL_FROM: "postmaster@mg.mintel.me"
    volumes:
      - ./database:/directus/database
      - ./uploads:/directus/uploads
      - ./schema:/directus/schema
      - ./extensions:/directus/extensions
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.infra-cms.rule=Host(`cms.localhost`)"
      - "traefik.http.services.infra-cms.loadbalancer.server.port=8055"
      - "traefik.docker.network=infra"

networks:
  default:
    name: mintel-infra-cms-internal
  infra:
    external: true
