Skip to content

An application to showcase Docker Swarm and its capabilities.

License

Notifications You must be signed in to change notification settings

kryptoblack/docker-swarm-demo

Repository files navigation

Docker Swarm Demo

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.

Build

$ docker build -t kryptoblack/docker-swarm-demo:v1 --build-arg VERSION={v1|v2|v3} .

Note: --build-arg VERSION=[VALUE] is necessary

Compose

Startup

$ docker compose -f docker-compose.yml up -d

For Development

$ docker compose -f docker-compose.yml -f docker-compose.override.yml up -d

Shutdown

$ docker compose -f docker-compose.yml up -d

For Development

$ 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.

Swarm

Prerequisites

  1. You need to have docker in swarm mode
    1. You do not need worker nodes
    2. Make sure you configure the firewall appropriately according to the documentation

Deploy

This command works for creating the services and updating them.

$ docker stack deploy -c [COMPOSE-FILE NAME] [STACK NAME]

Example

$ docker stack deploy -c docker-compose.yml demo

About

An application to showcase Docker Swarm and its capabilities.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages