Clear up cruft now

This commit is contained in:
Luke Murphy 2020-04-30 20:30:22 +02:00
parent 365d15f344
commit d7b686dc4e
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
2 changed files with 2 additions and 61 deletions

View File

@ -1,31 +0,0 @@
COMPOSE_FILE := docker-compose.yml
CONFIG := $$HOME/.docker
NETWORK := proxy
STACK := traefik
SWARM_URL := tcp://swarm.autonomic.zone:2376
default: deploy
deploy:
@docker stack deploy -c $(COMPOSE_FILE) $(STACK)
down:
@docker stack rm $(STACK)
network:
@docker network create --driver=overlay $(NETWORK)
logs:
@docker service logs -f $(STACK)_$(STACK)
config:
mkdir -vp $(CONFIG) && \
pass show docker/swarm.autonomic.zone/ca.pem > $(CONFIG)/ca.pem && \
pass show docker/swarm.autonomic.zone/cert.pem > $(CONFIG)/cert.pem && \
pass show docker/swarm.autonomic.zone/key.pem > $(CONFIG)/key.pem
context:
@docker context create swarm.autonomic.zone --docker \
"host=$(SWARM_URL),ca=$(CONFIG)/ca.pem,cert=$(CONFIG)/cert.pem,key=$(CONFIG)/key.pem"
.PHONY: deploy down network logs context

View File

@ -30,33 +30,5 @@ $ 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.
To do it manually, you 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 \
-c docker-compose.yml \
-c docker-compose.production.yml \
traefik
```
You can track logs via `docker service logs traefik_traefik`
3. Switch back to your local context.
```
$ docker context use default
```
1. Our [drone.autonomic.zone](https://drone.autonomic.zone/autonomic-cooperative/traefik/) configuration automatically deploys.
1. For a manual deploy guide, see [this documentation](https://git.autonomic.zone/autonomic-cooperative/organising/wiki/working-with-docker-swarm).