Last active
October 24, 2018 22:15
-
-
Save neilbartley/0d7cbe1042cbdccfd012ad808938420b to your computer and use it in GitHub Desktop.
Calming App Jams with Træfik - commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created a server on DigitalOcean (anywhere will do). Just ensured it had docker installed. | |
# Setup DNS entries for proto[1234].neil.bar pointing at the server. | |
# Connected to the server. | |
# Server has ports locked down. Open up the ones we need. | |
ufw allow 80/tcp | |
ufw allow 443/tcp | |
# Wouldn't normally open this one up but its handy for this demo. | |
ufw allow 8080/tcp | |
# Initialise a Swarm | |
docker swarm init --advertise-addr 209.97.138.242 | |
# Clone the example repo | |
git clone https://github.com/neilbartley/traefik-swarm-example.git | |
cd traefik-swarm-example | |
# This is important, if the permissions aren't restrictive enough Traefik won't generate certificates. | |
chmod 600 traefik/acme.json | |
# Deploy the Traefik stack | |
docker stack deploy --compose-file traefik/docker-stack.yml traefik | |
docker service ls | |
# Deploy the prototype stacks | |
docker stack deploy --compose-file apps/proto1-stack.yml proto1 | |
docker stack deploy --compose-file apps/proto2-stack.yml proto2 | |
# Confirm the services are running | |
docker service ls | |
# Grab a list of the containers running | |
docker ps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment