diff --git a/README.md b/README.md index 7db0eaa..9f9a54c 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,54 @@ > https://docs.traefik.io/ > https://traefik.swarm.autonomic.zone + +## Local + +```bash +$ docker-compose up +``` + +Traefik dashboard: + +> http://traefik.localhost + +Test application: + +> http://whoami.localhost + +Also available via (testing routing of proxy): + +```bash +$ curl -H Host:whoami.localhost http://127.0.0.1 +``` + +## Production + +Our [drone.autonomic.zone](https://drone.autonomic.zone/autonomic-cooperative/traefik/) configuration automatically deploys. + +Otherwise, you can need to follow 3 steps. + +1. Create the remote docker context locally + +```bash +$ cp .envrc.sample .envrc +$ direnv allow # ensure password store works +$ make config +$ make context +$ docker context use swarm.autonomic.zone +``` + +2. Deploy the application to the remote docker context. + +```bash +$ docker stack deploy \ + --compose-file docker-compose.yml \ + -c docker-compose.production.yml \ + traefik +``` + +3. Switch back to your local context. + +``` +$ docker context use default +```