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 name: deploy to swarm.autonomic.zone
steps: steps:
- name: deployment - name: deployment
image: decentral1se/drone-stack:19.03.8-override-compose image: decentral1se/drone-stack:19.03.8
settings: settings:
compose: docker-compose.yml compose: docker-compose.prod.yml
host: tcp://swarm.autonomic.zone:2376 host: tcp://swarm.autonomic.zone:2376
override_compose: docker-compose.production.yml
stack_name: traefik stack_name: traefik
tlsverify: true tlsverify: true
environment: 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) [![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://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: services:
traefik: traefik:
container_name: traefik image: "traefik:v2.2"
ports: ports:
- "80:80" - "80:80"
- "8080:8080" - "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "letsencrypt:/etc/letsencrypt"
command: command:
- "--api=true" - "--api=true"
- "--api.insecure=true" - "--api.insecure=true"
- "--providers.docker=true" - "--providers.docker=true"
- "--providers.docker.exposedbydefault=false" - "--providers.docker.exposedbydefault=false"
- "--entrypoints.web.address=:80" - "--entrypoints.web.address=:80"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
labels: labels:
- "traefik.enable=true" - "traefik.enable=true"
- "traefik.http.routers.traefik.rule=Host(`traefik.localhost`)" - "traefik.http.routers.traefik.rule=Host(`traefik.localhost`)"
- "traefik.http.routers.traefik.entrypoints=web" - "traefik.http.routers.traefik.entrypoints=web"
- "traefik.http.routers.traefik.service=api@internal" - "traefik.http.routers.traefik.service=api@internal"
whoami: volumes:
image: containous/whoami letsencrypt:
labels:
- "traefik.enable=true"
- "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)"

View File

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

View File

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