networks: backend: external: true services: mariadb: image: lscr.io/linuxserver/mariadb:latest security_opt: - apparmor:unconfined container_name: mariadb environment: - PUID=1000 - PGID=1000 - TZ=Europe/Amsterdam - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} - MYSQL_USER=${MYSQL_USER} - MYSQL_PASSWORD=${MYSQL_PASSWORD} volumes: - /docker/appdata/mariadb/config:/config ports: - 3306:3306 networks: - backend restart: unless-stopped phpmyadmin: image: phpmyadmin security_opt: - apparmor:unconfined restart: unless-stopped environment: - PMA_HOST=mariadb - PMA_PORT=3306 networks: - backend labels: - traefik.enable=true - traefik.http.routers.phpmyadmin.entrypoints=websecure - traefik.http.routers.phpmyadmin.rule=Host(`admin.example.com`) - traefik.http.routers.phpmyadmin.tls=true - traefik.http.routers.phpmyadmin.tls.certresolver=production - traefik.http.routers.phpmyadmin.middlewares=authentik@file - traefik.http.routers.phpmyadmin.service=phpmyadmin - traefik.http.services.phpmyadmin.loadBalancer.server.port=80