Docker Swarm deployment for openSUSE Brazil services
The deployment must follow an order, as services depend on external configuration.
Create a volume named uptime-data
.
docker volume create --name uptime-data --opt type=none --opt device=/srv/data/uptime --opt o=bind
Create a network for Traefik and all services.
docker network create --driver overlay traefik
Create a config named cf-dns-api-token
that contains the CF API Token.
docker config create cf-dns-api-token cf-dns-api-token.txt
Create a config named traefik-users-file
that contains the user:password
for Traefik Web UI.
docker config create traefik-users-file traefik-users-file.txt
Use
htpasswd -n <user>
to create an encoded password.
Deploy Traefik first as other services may depend on it.
docker stack deploy -c traefik.yml traefik
Deploy CronJob as other services may depend on it.
docker stack deploy -c cronjob.yml cronjob
Deploy services.
docker stack deploy -c services.yml services