Dashboard for Docker Swarm Cluster
Docker-Image Size: < 25 MB
Use a stable release in production, not the master-build! Don't expose this service to the world! The endpoints offer the configuration of your services.
If you like this project, please give a ⭐ on github. Feedback would be nice.
Special thanks to JetBrains for supporting this project with Open Source development licenses.
docker pull ghcr.io/heckenmann/docker-swarm-dashboard:master
docker build -t ghcr.io/heckenmann/docker-swarm-dashboard:local .
---
version: '3.5'
services:
docker-swarm-dashboard:
image: ghcr.io/heckenmann/docker-swarm-dashboard:master
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
ports:
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
DOCKER_API_VERSION: 1.35
This configuration sets a password for access. It is importand to configure ssl in traefik for better security.
In this example you can login with "docker / docker" on port 8080.
Have a look at https://doc.traefik.io/traefik/user-guides/docker-compose/acme-tls/
---
version: '3.5'
services:
docker-swarm-dashboard:
image: ghcr.io/heckenmann/docker-swarm-dashboard:master
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
labels:
- "traefik.enable=true"
- "traefik.http.routers.dsd.entrypoints=web"
- "traefik.http.routers.dsd.middlewares=basic-auth"
- "traefik.http.services.dsd.loadbalancer.server.port=8080"
- "traefik.http.routers.dsd.rule=PathPrefix(`/`)"
# Login with docker / docker
- "traefik.http.middlewares.basic-auth.basicauth.users=docker:$$2y$$10$$81nFbUw842iBd7MlngMR4.1VBI9j6Y.vTiamBAqtVNfs4qehzZB.e"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
environment:
DOCKER_API_VERSION: 1.35
traefik:
image: "traefik:v2.9"
deploy:
placement:
constraints:
- node.role == manager
command:
#- "--log.level=debug"
#- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.swarmMode=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:8080"
ports:
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"
From the directory with docker-compose.yml run:
docker stack deploy --compose-file docker-compose.yml docker-swarm-dashboard
docker service create --name logger chentex/random-logger:latest 50 200