--- version: '3.6' networks: web: name: web backend: name: backend services: traefik: container_name: 'traefik' image: traefik:v2.1 labels: traefik.enable: 'true' traefik.http.routers.traefik.entrypoints: 'http' traefik.http.routers.traefik.rule: "Host(`app.example.com`)" traefik.http.routers.traefik.middlewares: 'redirect@file' traefik.http.routers.traefik-secure.entrypoints: 'https' traefik.http.routers.traefik-secure.rule: "Host(`app.example.com`)" traefik.http.routers.traefik-secure.middlewares: 'traefik-auth@file' traefik.http.routers.traefik-secure.tls: 'true' volumes: - source: '/data/docker/traefik_data/traefik.toml' target: '/traefik.toml' type: 'bind' read_only: 'yes' - source: '/data/docker/traefik_data/dynamic_conf.toml' target: '/dynamic_conf.toml' type: 'bind' - source: '/data/docker/certbot/cert.pem' target: '/cert.pem' type: 'bind' read_only: 'yes' - source: '/data/docker/certbot/key.pem' target: '/key.pem' type: 'bind' read_only: 'yes' - source: '/run/docker.sock' target: '/run/docker.sock' type: 'bind' read_only: 'yes' networks: - 'web' ports: - "443:443" - "8080:8080" expose: - "8080" restart: "unless-stopped" environment: - PUID=2000 - PGID=2000 portainer: container_name: 'portainer' image: portainer/portainer environment: - PUID=2000 - PGID=2000 command: '-H unix:///run/docker.sock' labels: traefik.enable: 'true' traefik.http.routers.portainer.rule: "Host(`portainer.app.example.com`)" traefik.http.routers.portainer.tls: 'true' traefik.http.services.portainer.loadbalancer.server.port: '9000' volumes: - source: "/data/docker/portainer_data" target: '/data' type: 'bind' - source: '/run/docker.sock' target: '/run/docker.sock' type: 'bind' read_only: 'yes' networks: - 'web' ports: - "10001:9000" restart: "unless-stopped" # MariaDB database for Kanboard kanboard-mariadb: container_name: "kanboard-mariadb" image: linuxserver/mariadb environment: PUID: "2000" PGID: "2000" MYSQL_ROOT_PASSWORD: "MYSECRETPASSWORD" TZ: 'Europe/London' MYSQL_DATABASE: 'kanboard' MYSQL_USER: 'kanboard' MYSQL_PASSWORD: "MYSECRETPASSWORD" volumes: - source: "/data/docker/kanboard-mariadb" target: '/var/lib/mysql' type: 'bind' networks: - backend ports: - "3306:3306" restart: "unless-stopped" # Kanboard task management kanboard: container_name: 'kanboard' image: kanboard/kanboard:latest environment: PUID: "2000" PGID: "2000" DATABASE_URL: "mysql://kanboard:MYSECRETPASSWORD@kanboard-mariadb/kanboard" labels: traefik.enable: 'true' traefik.http.routers.kanboard.entrypoints: 'http' traefik.http.routers.kanboard.rule: "Host(`kanboard.app.example.com`)" traefik.http.routers.kanboard.middlewares: 'redirect@file' traefik.http.routers.kanboard-secure.entrypoints: 'https' traefik.http.routers.kanboard-secure.rule: "Host(`kanboard.app.example.com`)" traefik.http.routers.kanboard.tls: 'true' traefik.http.services.kanboard.loadbalancer.server.port: '80' volumes: - source: "/data/docker/kanboard/data" target: '/var/www/app/data' type: 'bind' - source: "/data/docker/kanboard/plugins" target: '/var/www/app/plugins' type: 'bind' - source: '/data/docker/certbot/cert.pem' target: '/etc/nginx/ssl/kanboard.crt' type: 'bind' read_only: 'yes' - source: '/data/docker/certbot/key.pem' target: '/etc/nginx/ssl/kanboard.key' type: 'bind' read_only: 'yes' networks: - web - backend ports: - "10101:80" - "10102:443" depends_on: - kanboard-mariadb restart: "unless-stopped" vikunja-backend: container_name: 'vikunja-backend' image: vikunja/api environment: VIKUNJA_DATABASE_HOST: 'vikunja-db' VIKUNJA_DATABASE_PASSWORD: "MYSECRETPASSWORD" VIKUNJA_DATABASE_TYPE: 'mysql' VIKUNJA_DATABASE_USER: 'vikunja' VIKUNJA_DATABASE_DATABASE: 'vikunja' VIKUNJA_REDIS_ENABLED: 1 VIKUNJA_REDIS_HOST: 'vikunja-redis:6379' VIKUNJA_CACHE_ENABLED: 1 VIKUNJA_CACHE_TYPE: redis PUID: "2000" PGID: "2000" volumes: - source: "/data/docker/vikunja-backend" target: '/app/vikunja/files' type: 'bind' depends_on: - vikunja-db - vikunja-redis restart: "unless-stopped" labels: traefik.enable: 'true' traefik.http.routers.vikunja-backend.rule: "Host(`vikunja.app.example.com`) && PathPrefix(`/api/v1`)" traefik.http.routers.vikunja-backend.entrypoints: 'https' traefik.http.services.vikunja-backend.loadbalancer.server.port: '3456' ports: - "3456:3456" networks: - 'web' - 'backend' vikunja-frontend: container_name: 'vikunja-frontend' image: vikunja/frontend environment: PUID: "2000" PGID: "2000" labels: traefik.enable: 'true' traefik.http.routers.vikunja-frontend.rule: "Host(`vikunja.app.example.com`) && PathPrefix(`/`)" traefik.http.routers.vikunja-frontend.tls: 'true' traefik.http.routers.vikunja-frontend.entrypoints: 'https' traefik.http.services.vikunja-frontend.loadbalancer.server.port: '80' ports: - "10110:80" - "10111:443" networks: - 'web' - 'backend' depends_on: - vikunja-backend restart: "unless-stopped" vikunja-db: container_name: 'vikunja-db' image: linuxserver/mariadb environment: MYSQL_ROOT_PASSWORD: "MYSECRETPASSWORD" MYSQL_USER: 'vikunja' MYSQL_PASSWORD: "MYSECRETPASSWORD" MYSQL_DATABASE: 'vikunja' TZ: 'Europe/London' PUID: "2000" PGID: "2000" volumes: - source: "/data/docker/vikunja-mariadb" target: '/var/lib/mysql' type: 'bind' restart: "unless-stopped" networks: - 'backend' vikunja-redis: container_name: 'vikunja-redis' image: redis environment: PUID: "2000" PGID: "2000" networks: - 'backend' restart: "unless-stopped"