How to use it with traefik?

Hi guys!

I have gotten this to work somehow but browser still says connection not secure and clicking the features I get
" 500 Internal Error wtf."

My docker-compose looks like this.

version: "3"
services:
  mariadb:
    image: linuxserver/mariadb:latest
    container_name: codimd_mariadb
    restart: always
    volumes:
      - ./data:/config
    environment:
      - MYSQL_ROOT_PASSWORD=secret
      - MYSQL_DATABASE=codimd
      - MYSQL_USER=codimd
      - MYSQL_PASSWORD=secret
      - PGID=1000
      - PUID=1000
      - TZ=Europe/London
    networks:
      - web

  codimd:
    image: linuxserver/codimd:latest
    container_name: codimd
    restart: always
    depends_on:
      - mariadb
    volumes:
      - ./codimd:/config
    environment:
      - DB_HOST=mariadb
      - DB_USER=codimd
      - DB_PASS=secret
      - DB_NAME=codimd
      - DB_PORT=3306
      - PGID=1000
      - PUID=1000
      - TZ=Europe/London
      - CMD_ALLOW_EMAIL_REGISTER=false
      - CMD_DOMAIN=codimd.mysite.xyz

    networks:
      - web
    labels:
      - traefik.enable=true
      - "traefik.frontend.rule=Host:codimd.mysite.xyz"
      - traefik.port=3000

networks:
  web:
    external: true

Any idea whats wrong? I am using traefik 1.7 version.

Hey, sorry for the late answer, seems like I didn’t subscribe to this category.

To use traefik, you should add "CMD_URL_ADDPORT=false" and "CMD_PROTOCOL_USESSL=true" along with CMD_DOMAIN.

Also you should check what error is shown in the logs of codimd using docker-compose logs codimd.

It seems like there is some bigger issue involved.

An example on using Traefik with CodiMD can be found in our little overview of CodiMD instances: https://community.hedgedoc.org/t/how-do-you-use-codimd/18/2?u=sheogorath