version: "3" services: web: image: web environment: - MYSQL_HOST=db - MYSQL_DATABASE=docker - MYSQL_USER=docker - MYSQL_PASSWORD=docker networks: - formation_net - traefik_traefik_net deploy: labels: traefik.docker.network: "traefik_traefik_net" traefik.port: "80" traefik.frontend.rule: "Host:web.traefik" db: image: mariadb:10.7.1 environment: - MYSQL_ROOT_PASSWORD=docker - MYSQL_DATABASE=docker - MYSQL_USER=docker - MYSQL_PASSWORD=docker networks: - formation_net networks: traefik_traefik_net: external: true formation_net: driver: overlay