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.
Tag | Description | Image |
---|---|---|
e.g. 1.4.1 | Stable release | ghcr.io/heckenmann/docker-swarm-dashboard:1.4.1 |
latest | Latest stable release | ghcr.io/heckenmann/docker-swarm-dashboard:latest |
master | Current unstable master-build (not well tested) | ghcr.io/heckenmann/docker-swarm-dashboard:master |
Docker Swarm Dashboard supports environment variables for configuration
DSD_HTTP_PORT
: HTTP port within the container. Usually does not need to be changed. Default is 8080.DSD_HANDLE_LOGS
: Set to false
to prevent fetching and displaying logs.DSD_DASHBOARD_LAYOUT
: Default dashboard layout. Either row
(default) or column
.DSD_HIDE_SERVICE_STATES
: Comma-separated list of states to not show in the main dashboard.LOCALE
: Timestamp format based on a BCP 47 language tag.TZ
: IANA Time zone to display timestamps in.DSD_VERSION_CHECK_ENABLED
: When set to true
, the system will check for updates and notify in the UI if a new version is available. If set to false
, the version check will be skipped. Default is false
.DSD_WELCOME_MESSAGE
: If set, this message will be displayed to the user in a modal dialog when the web application is opened in the browser.docker pull ghcr.io/heckenmann/docker-swarm-dashboard:master
---
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
docker build -t ghcr.io/heckenmann/docker-swarm-dashboard:local .
# from app-src
yarn run start-api-mock
# from app-src
yarn run start-dev-server
When you run the UI with the api-mock-server, you have to open the ui with "base"-param (API-URL): http://localhost:3000#base="http%3A%2F%2Flocalhost%3A3001%2F"
# from app-src
yarn run cy:run