An application to showcase Docker Swarm and its capabilities. It is built with nginx that also have a custom rate limiter that is implemented using redis.
$ docker build -t kryptoblack/docker-swarm-demo:v1 --build-arg VERSION={v1|v2|v3} .
Note: --build-arg VERSION=[VALUE] is necessary
$ docker compose -f docker-compose.yml up -d
$ docker compose -f docker-compose.yml -f docker-compose.override.yml up -d
$ docker compose -f docker-compose.yml up -d
$ docker compose -f docker-compose.yml -f docker-compose.override.yml down
Note: if you do not need to edit .html, .js, .css, or .conf files, you can ommit both of the -f flags from the above command.
- You need to have docker in swarm mode
- You do not need worker nodes
- Make sure you configure the firewall appropriately according to the documentation
This command works for creating the services and updating them.
$ docker stack deploy -c [COMPOSE-FILE NAME] [STACK NAME]
$ docker stack deploy -c docker-compose.yml demo