Hi, I'm having a particular problem about configuring traefik, where calling to "http://mydomain.com:8080/dashboard from browser returns a '404 not found'. Yet when I send a request through powershell command Invoke-WebRequest - Uri "http://mydomain.com:8080/"
it returns a 200 code with the following content:
Which, I assume it is working fine
Here's my docker-compose.yml file:
reverse-proxy:
image: traefik:latest
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--entrypoints.web.address=:80"
- "--entrypoints.websecure.address=:443"
- "--entrypoints.web.http.redirections.entrypoint.to=websecure"
- "--entrypoints.web.http.redirections.entrypoint.scheme=https"
- "--entrypoints.web.http.redirections.entrypoint.permanent=true" # redirect http to https
- "--certificatesresolvers.myresolver.acme.tlschallenge=true"
- "--certificatesresolvers.myresolver.acme.email=${EMAIL}"
- "--certificatesresolvers.myresolver.acme.storage=/letsencrypt/acme.json"
ports:
- "80:80"
- "443:443"
- "8080:8080"
networks:
- gignet
volumes:
- ./letsencrypt:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock
api:
image: rutkre/gigbuds:v1.0.8
restart: unless-stopped
environment:
- ASPNETCORE_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://+:8001
expose:
- "8001"
depends_on:
db:
condition: service_healthy
cache:
condition: service_healthy
labels:
- "traefik.enable=true"
- "traefik.http.routers.api.rule=Host(`${DOMAIN_NAME}`)"
- "traefik.http.routers.api.entrypoints=websecure"
- "traefik.http.routers.api.tls=true"
- "traefik.http.routers.api.tls.certresolver=myresolver"
- "traefik.http.services.api.loadbalancer.server.port=8001"
- "traefik.http.routers.api.priority=50"
volumes:
- /home/deploy/gigbuds/credentials/firebase-service-storage.json:/app/firebase-service-storage.json
- /home/deploy/gigbuds/credentials/firebase-service-notification.json:/app/firebase-service-notification.json
- /home/deploy/gigbuds/appsettings.json:/app/appsettings.json
networks:
- gignet
Any help is appreciate!