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: mysqladmin -p${MARIADB_ROOT_PASSWORD} ping -h localhost
      interval: 20s
      start_period: 10s
      timeout: 10s
      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/public/themes'
    depends_on:
      - mariadb
    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"