Deployment Manifest for WordCannon Stack using docker-compose.
Install Docker for Mac
$ curl -fsSL get.docker.com -o get-docker.sh
$ sh get-docker.sh
Install Docker for Windows
The docker-stack.yml
file exposes the following environment variables:
Which language the words come from. Default english
. See: list of supported languages
An integer n
meaning n most common
words in the dictionary. Default 10000
An integer n
whereby if n
vowels appear in the word, some special backend behavior is triggered. We suspect there may be a bug in this area as it appears to lead to crashes.
- On the host you want to deploy to (could be your local workstation) initialize Docker Swarm:
docker swarm init
- Clone the repo
git clone https://github.com/WordCannon/deploy.git
cd deploy
docker stack deploy -c docker-stack.yml wordcannon
You should see output like this:
Creating network wordcannon_default
Creating service wordcannon_app
Creating service wordcannon_web
The the web container binds to port 80 on the host by default.
Visit http://localhost
You can change this by modifying the number 80
in the 80:8080
part of the docker-stack.yml
file.
Backend:
docker service logs --follow wordcannon_app
Frontend:
docker service logs --follow wordcannon_web
If the UI starts showing dots ...
instead of words, the backend may need to be restarted due to a bug. You can also see this in the backend logs Running the following command will force a redeploy, which will restart the backend container:
docker service update --force wordcannon_app
If you make a change to docker-stack.yml
you can redeploy it using the same command you used to bring up the stack:
docker stack deploy -c docker-stack.yml wordcannon
This will only redeploy services which had changes to their associated configuration the the yaml.
docker stack rm wordcannon
##