greetings everyone - my team has been using portainer - love it.
Im currently having issue getting it to work localhost however.
i use docker stack deploy to launch a docker-compose file that is comprised of traefik and portainer
the containers deploy and you can see both services with single replicas going fine:
I
D NAME MODE REPLICAS IMAGE PORTS
vj2ga68axrrd admin_portainer replicated 1/1 portainer/portainer:latest
1jmx66kyn3a3 admin_reverse-proxy replicated 1/1 traefik:1.7-alpine *:80->80/tcp, *:8080->8080/tcp
but when I try to go visit them in a browser (https://dashboard.localhost)
nothing happens... I can ping dashboard.localhost and i get back valid response
but if I visit in several browsers nothing happens
do I need to forward some ports or something?
here is my stack file:
Im on osx mojave
version: '3.1'
services:
# REVERSE PROXY
reverse-proxy:
image: traefik:1.7-alpine
command:
- "--api"
- "--docker"
- "--docker.swarmMode"
- "--docker.watch"
- "--docker.domain=localhost"
- "--docker.endpoint=unix:///var/run/docker.sock"
- "--defaultentrypoints=http"
- "--entryPoints=Name:http Address::80"
- "--entryPoints=Name:traefik Address::8080"
- "--logLevel=DEBUG"
- "--traefikLog.filePath=/var/log/traefik/traefik.log"
- "--accessLog.filePath=/var/log/traefik/access.log"
# - "--web"
# - "--metrics"
# - "--metrics.prometheus"
# - "--metrics.prometheus.entryPoint=traefik"
# - "--metrics.prometheus.buckets=0.1,0.3,1.2,5.0"
- "--ping"
- "--ping.entryPoint=http"
deploy:
placement:
constraints:
- node.role == manager
labels:
- traefik.enable=true
- traefik.port=8080
- traefik.docker.network=traefik-net
- traefik.frontend.rule=Host:traefik.localhost
- traefik.backend.loadbalancer.swarm=false # This will use traefik built-in balancer
networks:
- traefik-net
ports:
- 80:80
- 8080:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik:/var/log/traefik
portainer:
image: portainer/portainer
command: -H unix:///var/run/docker.sock --admin-password-file '/run/secrets/portainer'
networks:
- traefik-net
deploy:
placement:
constraints:
- node.role == manager
labels:
- traefik.enable=true
- traefik.port=9000
- traefik.docker.network=traefik-net
- traefik.frontend.rule=Host:dashboard.localhost
- traefik.backend.loadbalancer.swarm=false
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./portainer:/data
secrets:
- portainer
# dashboard:
# image: prom/prometheus
# networks:
# - traefik-net
# deploy:
# labels:
# - traefik.enable=true
# - traefik.port=9090
# - traefik.docker.network=traefik-net
# - traefik.frontend.rule=Host:monitor.localhost
# volumes:
# - ./prometheus:/etc/prometheus
# grafana:
# image: grafana/grafana
# depends_on:
# - dashboard
# networks:
# - traefik-net
# deploy:
# labels:
# - traefik.enable=true
# - traefik.port=3000
# - traefik.docker.network=traefik-net
# - traefik.frontend.rule=Host:grafana.localhost
# volumes:
# - ./grafana:/var/lib/grafana
# Network
networks:
traefik-net:
external: true
# Secret
secrets:
portainer:
external: true