Take a pass at the README

This commit is contained in:
Luke Murphy 2020-04-30 12:21:28 +02:00
parent 739b2d1dda
commit 9efc3d9dc8
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 51 additions and 0 deletions

View File

@ -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
```