Redmine docker-compose config with Traefik & Let's Encrypt

This config is based on our previous post How to easily install Redmine using Docker Images and our Traefik configuration with Cloudflare wildcard certs (seeĀ Simple Traefik docker-compose setup with Lets Encrypt Cloudflare DNS-01 & TLS-ALPN-01 & HTTP-01 challenges)

Replace REDMINE_PASSWORD with a random password and change that password once you have access to the web UI.

services:
  mariadb:
    image: 'mariadb:latest'
    environment:
      - MYSQL_ROOT_PASSWORD=${MARIADB_ROOT_PASSWORD}
      - MYSQL_DATABASE=redmine
    volumes:
      - './mariadb_data:/var/lib/mysql'
    command: --default-storage-engine innodb
    restart: unless-stopped
    healthcheck:
      test: [ "CMD", "healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized" ]
      start_period: 1m
      start_interval: 10s
      interval: 1m
      timeout: 5s
      retries: 3
  redmine:
    image: 'redmine:latest'
    environment:
      - REDMINE_USERNAME=admin
      - REDMINE_PASSWORD=redmineadmin
      - [email protected]
      - REDMINE_DB_MYSQL=mariadb
      - REDMINE_DB_USERNAME=root
      - REDMINE_DB_PASSWORD=${MARIADB_ROOT_PASSWORD}
    volumes:
      - './redmine_data/config/configuration.yml:/usr/src/redmine/config/configuration.yml'
      - './redmine_data/config/database.yml:/usr/src/redmine/config/database.yml'
      - './redmine_data/files:/usr/src/redmine/files'
      - './redmine_themes:/usr/src/redmine/themes'
      - './redmine_git:/git'
    depends_on:
      mariadb:
        condition: service_healthy
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.redmine-mydomain.rule=Host(`redmine.mydomain.com`)"
      - "traefik.http.routers.redmine-mydomain.entrypoints=websecure"
      - "traefik.http.routers.redmine-mydomain.tls.certResolver=cloudflare-ec384"
      - "traefik.http.services.redmine-mydomain.loadbalancer.server.port=3000"