I am struggling with getting docker provider simple HTTP app working.
Traefik container log show "error" with message "port is missing".
Bellow are my configs:
Traefik compose file:
version: "3.7"
services:
traefik:
image: traefik:v2.0
ports:
- "80:80"
- "8080:8080"
- "443:443"
networks:
- web
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/traefik/traefik.yaml:/etc/traefik/traefik.yaml
- /opt/traefik/acme.json:/opt/traefik/acme.json
networks:
web:
external: true
traefik.yaml:
global:
sendAnonymousUsage: false
log:
level: "DEBUG"
providers:
docker:
swarmMode: true
watch: true
exposedByDefault: false
api:
dashboard: true
entryPoints:
web:
address: ":80"
web-secure:
address: ":443"
acme:
email: "xxx@yyy.zz"
storage: /opt/traefik/acme.json
onHostRule: true
httpChallenge:
entryPoint: web
app compose file:
version: "3.7"
services:
app_staging:
image: 192.168.64.148:5000/appimg:latest
environment:
- ASPNETCORE_ENVIRONMENT=Staging
- CONFIG_FILE=/run/secrets/staging.config
networks:
- web
secrets:
- staging.config
deploy:
labels:
- "traefik.enable=true"
- "traefik.port=80"
- "traefik.http.routers.app_test.rule=Host(`test.app.com`)"
- "traefik.docker.network=web"
update_config:
order: start-first
secrets:
staging.config:
file: ./staging.config
networks:
web:
external: true
name: web