Files
traefik/docker-compose.yaml
kovagoadi ff6ec619c5
Some checks are pending
Remote Deployment Pipeline / Run docker-compose remotely (Dev) (pull_request) Blocked by required conditions
Remote Deployment Pipeline / Prepare deployment vars (pull_request) Successful in 3s
Remote Deployment Pipeline / Create remote directory (pull_request) Successful in 8s
Remote Deployment Pipeline / Cleanup MR environment (pull_request) Has been skipped
Remote Deployment Pipeline / Sync repository files (pull_request) Successful in 15s
Remote Deployment Pipeline / Run docker-compose remotely (Prod) (pull_request) Has been skipped
Add environment blocks
2025-11-11 10:59:57 +01:00

46 lines
1.1 KiB
YAML

services:
traefik:
image: "traefik:v3.4"
# container_name: "traefik"
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
- testnetwork
command:
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--providers.docker.network=testnetwork"
- "--providers.docker.constraints=Label(`env`, `${ENV}`)"
- "--entryPoints.test.address=:80"
ports:
- "${PORT}:80"
- "8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
whoami:
image: "traefik/whoami"
restart: unless-stopped
networks:
- testnetwork
labels:
- "env=${ENV}"
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.docker.localhost`)"
- "traefik.http.routers.whoami.entrypoints=test"
test:
image: nginx
restart: unless-stopped
networks:
- testnetwork
ports:
- "80"
labels:
- "env=${ENV}"
- "traefik.enable=true"
- "traefik.http.routers.test.rule=Host(`test.docker.localhost`)"
- "traefik.http.routers.test.entrypoints=test"
networks:
testnetwork: