Try to slim down config

This commit is contained in:
Luke Murphy 2020-05-10 23:22:45 +02:00
parent 633d61e946
commit efff580100
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
5 changed files with 9 additions and 47 deletions

View File

@ -3,11 +3,10 @@ kind: pipeline
name: deploy to swarm.autonomic.zone
steps:
- name: deployment
image: decentral1se/drone-stack:19.03.8-override-compose
image: decentral1se/drone-stack:19.03.8
settings:
compose: docker-compose.yml
compose: docker-compose.prod.yml
host: tcp://swarm.autonomic.zone:2376
override_compose: docker-compose.production.yml
stack_name: traefik
tlsverify: true
environment:

View File

@ -3,33 +3,3 @@
[![Build Status](https://drone.autonomic.zone/api/badges/autonomic-cooperative/traefik/status.svg)](https://drone.autonomic.zone/autonomic-cooperative/traefik)
> https://docs.traefik.io/
> https://traefik.swarm.autonomic.zone
## Development
```bash
$ git clone https://git.autonomic.zone/autonomic-cooperative/traefik && cd traefik
$ python3 -m venv .venv && source .venv/bin/activate
$ pip install -r requirements.txt
$ 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
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).

View File

@ -3,26 +3,24 @@ version: "3.8"
services:
traefik:
container_name: traefik
image: "traefik:v2.2"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "letsencrypt:/etc/letsencrypt"
command:
- "--api=true"
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.rule=Host(`traefik.localhost`)"
- "traefik.http.routers.traefik.entrypoints=web"
- "traefik.http.routers.traefik.service=api@internal"
whoami:
image: containous/whoami
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)"
volumes:
letsencrypt:

View File

@ -3,6 +3,7 @@ version: "3.8"
services:
traefik:
image: "traefik:v2.2"
ports:
- "80:80"
- "443:443"

View File

@ -1,6 +0,0 @@
---
version: "3.8"
services:
traefik:
image: "traefik:v2.2"