forked from coop-cloud/traefik
Compare commits
57 Commits
Author | SHA1 | Date |
---|---|---|
Christian Galo | 1837f4e8d1 | |
Christian Galo | 7bed258294 | |
Christian Galo | 5aea354ac4 | |
Christian Galo | b83ace2588 | |
Christian Galo | 01ed48f92d | |
Christian Galo | 48fbea8806 | |
Christian Galo | 8de070c41f | |
Christian Galo | 610fb21334 | |
Christian Galo | 402dbb2ec9 | |
Christian Galo | 22650d7d67 | |
Christian Galo | 4bfce6517b | |
Christian Galo | e0799b7de7 | |
Christian Galo | 2886b38a12 | |
Christian Galo | f2964816e5 | |
Christian Galo | 3108529953 | |
Christian Galo | 8d926529c5 | |
trav | fcff3a2d6a | |
decentral1se | 981d2a3808 | |
Philipp Rothmann | 29eb1058cd | |
decentral1se | df49a1f3b2 | |
3wc | 099dcfaed0 | |
decentral1se | 1d7542cd5f | |
decentral1se | 5e1604322e | |
decentral1se | 36707989d2 | |
decentral1se | 29f90fe409 | |
decentral1se | 8a48c5e507 | |
decentral1se | 612d0cc6cc | |
3wordchant | 36c7b740ab | |
3wc | 59b0f8d645 | |
3wc | 556c448c05 | |
3wc | 26fcaaea69 | |
3wc | 02ebb1412f | |
3wc | 8e91a5a3ee | |
decentral1se | 3048d09cd8 | |
decentral1se | 2c9e980809 | |
decentral1se | ec47f5c9dd | |
decentral1se | cf81dc543a | |
decentral1se | 48f03d8fcf | |
decentral1se | 8c6fe61e60 | |
mirsal | fc5aa70d27 | |
3wordchant | 9e123afb07 | |
3wc | baba7ff87d | |
3wc | e856591c97 | |
3wc | 8bcd8f054e | |
3wc | a9a513e8da | |
3wc | 46010aeb95 | |
Comrade Renovate Bot | 0421dd4747 | |
decentral1se | eb69ba9309 | |
decentral1se | 21cd25f3d6 | |
decentral1se | f9b3475086 | |
decentral1se | ef443bae50 | |
Comrade Renovate Bot | aacf00309e | |
decentral1se | f73e38d143 | |
decentral1se | 661bec4727 | |
decentral1se | 7258b129c4 | |
decentral1se | bbbdfc272d | |
Michael Williams | 2c81622d9a |
31
.drone.yml
31
.drone.yml
|
@ -1,31 +0,0 @@
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
name: deploy to swarm-test.autonomic.zone
|
|
||||||
steps:
|
|
||||||
- name: deployment
|
|
||||||
image: decentral1se/stack-ssh-deploy:latest
|
|
||||||
settings:
|
|
||||||
host: swarm-test.autonomic.zone
|
|
||||||
stack: traefik
|
|
||||||
deploy_key:
|
|
||||||
from_secret: drone_ssh_swarm_test
|
|
||||||
environment:
|
|
||||||
DOMAIN: traefik.swarm-test.autonomic.zone
|
|
||||||
STACK_NAME: traefik
|
|
||||||
LETS_ENCRYPT_ENV: production
|
|
||||||
LETS_ENCRYPT_EMAIL: helo@autonomic.zone
|
|
||||||
TRAEFIK_YML_VERSION: v3
|
|
||||||
FILE_PROVIDER_YML_VERSION: v2
|
|
||||||
trigger:
|
|
||||||
branch:
|
|
||||||
- master
|
|
||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
name: recipe release
|
|
||||||
steps:
|
|
||||||
- name: release a new version
|
|
||||||
image: decentral1se/drone-abra:latest
|
|
||||||
settings:
|
|
||||||
command: recipe traefik release
|
|
||||||
deploy_key:
|
|
||||||
from_secret: abra_bot_deploy_key
|
|
40
.env.sample
40
.env.sample
|
@ -1,40 +0,0 @@
|
||||||
TYPE=traefik
|
|
||||||
|
|
||||||
DOMAIN=traefik.example.com
|
|
||||||
LETS_ENCRYPT_ENV=production
|
|
||||||
|
|
||||||
LETS_ENCRYPT_EMAIL=certs@example.com
|
|
||||||
# DASHBOARD_ENABLED=true
|
|
||||||
# WARN, INFO etc.
|
|
||||||
LOG_LEVEL=WARN
|
|
||||||
|
|
||||||
## Enable Keycloak
|
|
||||||
#COMPOSE_FILE="compose.yml:compose.keycloak.yml"
|
|
||||||
#KEYCLOAK_MIDDLEWARE_ENABLED=1
|
|
||||||
|
|
||||||
## SMTP port 587
|
|
||||||
#COMPOSE_FILE="compose.yml:compose.smtp.yml"
|
|
||||||
#SMTP_ENABLED=1
|
|
||||||
|
|
||||||
## Gitea SSH
|
|
||||||
# COMPOSE_FILE="compose.yml:compose.gitea.yml"
|
|
||||||
# GITEA_SSH_ENABLED=1
|
|
||||||
|
|
||||||
## Foodsoft SMTP
|
|
||||||
# COMPOSE_FILE="compose.yml:compose.foodsoft.yml"
|
|
||||||
# FOODSOFT_SMTP_ENABLED=1
|
|
||||||
|
|
||||||
## Peertube RTMP
|
|
||||||
# COMPOSE_FILE="compose.yml:compose.peertube.yml"
|
|
||||||
# PEERTUBE_RTMP_ENABLED=1
|
|
||||||
|
|
||||||
## Secure Scuttlebutt MUXRPC
|
|
||||||
# COMPOSE_FILE="compose.yml:compose.ssb.yml"
|
|
||||||
# SSB_MUXRPC_ENABLED=1
|
|
||||||
|
|
||||||
## MSSQL
|
|
||||||
# COMPOSE_FILE="compose.yml:compose.mssql.yml"
|
|
||||||
# MSSQL_ENABLED=1
|
|
||||||
|
|
||||||
## Host-mode networking
|
|
||||||
#COMPOSE_FILE="compose.yml:compose.host.yml"
|
|
|
@ -1 +1 @@
|
||||||
.envrc
|
.env
|
||||||
|
|
36
README.md
36
README.md
|
@ -1,26 +1,24 @@
|
||||||
# Traefik
|
# Traefik
|
||||||
|
|
||||||
[![Build Status](https://drone.autonomic.zone/api/badges/coop-cloud/traefik/status.svg)](https://drone.autonomic.zone/coop-cloud/traefik)
|
Wiki Cafe's configuration for a traefik deployment. Originally slimmed down from an `abra` [recipe](https://git.coopcloud.tech/coop-cloud/traefik) by [Co-op Cloud](https://coopcloud.tech/).
|
||||||
|
|
||||||
> https://docs.traefik.io
|
|
||||||
|
|
||||||
<!-- metadata -->
|
## Deploying the app with Docker Swarm
|
||||||
* **Category**: Utilities
|
|
||||||
* **Status**: ?
|
|
||||||
* **Image**: [`traefik`](https://hub.docker.com/_/traefik), ❶💚, upstream
|
|
||||||
* **Healthcheck**: Yes
|
|
||||||
* **Backups**: No
|
|
||||||
* **Email**: N/A
|
|
||||||
* **Tests**: ❷💛
|
|
||||||
* **SSO**: ? (Keycloak)
|
|
||||||
<!-- endmetadata -->
|
|
||||||
|
|
||||||
## Basic usage
|
Set the environment variables from the .env file during the shell session.
|
||||||
|
|
||||||
1. Set up Docker Swarm and [`abra`]
|
```
|
||||||
2. `abra app new traefik`
|
set -a && source .env && set +a
|
||||||
3. `abra app YOURAPPDOMAIN config` - be sure to change `DOMAIN` to something that resolves to
|
```
|
||||||
your Docker swarm box
|
|
||||||
4. `abra app YOURAPPDOMAIN deploy`
|
|
||||||
|
|
||||||
[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra
|
Set the secrets.
|
||||||
|
|
||||||
|
```
|
||||||
|
printf "SECRET_HERE" | docker secret create SECRET_NAME -
|
||||||
|
```
|
||||||
|
|
||||||
|
Deploy using the `-c` flag to specify multiple compose files.
|
||||||
|
|
||||||
|
```
|
||||||
|
docker stack deploy traefik -c compose.yaml -c compose.googledomains.yaml
|
||||||
|
```
|
||||||
|
|
2
abra.sh
2
abra.sh
|
@ -1,2 +0,0 @@
|
||||||
export TRAEFIK_YML_VERSION=v8
|
|
||||||
export FILE_PROVIDER_YML_VERSION=v2
|
|
|
@ -1,7 +0,0 @@
|
||||||
version: "3.8"
|
|
||||||
services:
|
|
||||||
app:
|
|
||||||
environment:
|
|
||||||
- FOODSOFT_SMTP_ENABLED
|
|
||||||
ports:
|
|
||||||
- "2525:2525"
|
|
|
@ -1,7 +0,0 @@
|
||||||
version: "3.8"
|
|
||||||
services:
|
|
||||||
app:
|
|
||||||
environment:
|
|
||||||
- GITEA_SSH_ENABLED
|
|
||||||
ports:
|
|
||||||
- "2222:2222"
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
environment:
|
||||||
|
- GOOGLE_DOMAINS_ACCESS_TOKEN_FILE=/run/secrets/google_domains_access_token
|
||||||
|
secrets:
|
||||||
|
- google_domains_access_token
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
google_domains_access_token:
|
||||||
|
external: true
|
|
@ -1,18 +0,0 @@
|
||||||
---
|
|
||||||
version: "3.8"
|
|
||||||
|
|
||||||
services:
|
|
||||||
app:
|
|
||||||
deploy:
|
|
||||||
update_config:
|
|
||||||
order: stop-first
|
|
||||||
ports:
|
|
||||||
- target: 80
|
|
||||||
published: 80
|
|
||||||
mode: host
|
|
||||||
- target: 443
|
|
||||||
published: 443
|
|
||||||
mode: host
|
|
||||||
- target: 2222
|
|
||||||
published: 2222
|
|
||||||
mode: host
|
|
|
@ -1,10 +0,0 @@
|
||||||
---
|
|
||||||
version: "3.8"
|
|
||||||
|
|
||||||
services:
|
|
||||||
app:
|
|
||||||
deploy:
|
|
||||||
labels:
|
|
||||||
- "traefik.http.routers.traefik.middlewares=keycloak@file"
|
|
||||||
environment:
|
|
||||||
- KEYCLOAK_MIDDLEWARE_ENABLED
|
|
|
@ -1,7 +0,0 @@
|
||||||
version: "3.8"
|
|
||||||
services:
|
|
||||||
app:
|
|
||||||
environment:
|
|
||||||
- MSSQL_ENABLED
|
|
||||||
ports:
|
|
||||||
- "1433:1433"
|
|
|
@ -1,7 +0,0 @@
|
||||||
version: "3.8"
|
|
||||||
services:
|
|
||||||
app:
|
|
||||||
environment:
|
|
||||||
- PEERTUBE_RTMP_ENABLED
|
|
||||||
ports:
|
|
||||||
- "1935:1935"
|
|
|
@ -1,9 +0,0 @@
|
||||||
---
|
|
||||||
version: "3.8"
|
|
||||||
|
|
||||||
services:
|
|
||||||
app:
|
|
||||||
environment:
|
|
||||||
- SMTP_ENABLED
|
|
||||||
ports:
|
|
||||||
- "587:587"
|
|
|
@ -1,7 +0,0 @@
|
||||||
version: "3.8"
|
|
||||||
services:
|
|
||||||
app:
|
|
||||||
environment:
|
|
||||||
- SSB_MUXRPC_ENABLED
|
|
||||||
ports:
|
|
||||||
- "8008:8008"
|
|
|
@ -1,32 +1,32 @@
|
||||||
version: "3.8"
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: "traefik:v2.4.8"
|
image: "traefik:v2.10.4"
|
||||||
# Note(decentral1se): *please do not* add any additional ports here.
|
|
||||||
# Doing so could break new installs with port conflicts. Please use
|
|
||||||
# the usual `compose.$app.yml` approach for any additional ports
|
|
||||||
ports:
|
ports:
|
||||||
|
# HTTP
|
||||||
- "80:80"
|
- "80:80"
|
||||||
|
# HTTPS
|
||||||
- "443:443"
|
- "443:443"
|
||||||
volumes:
|
volumes:
|
||||||
- "/var/run/docker.sock:/var/run/docker.sock"
|
- "/var/run/docker.sock:/var/run/docker.sock"
|
||||||
- "letsencrypt:/etc/letsencrypt"
|
- "letsencrypt:/etc/letsencrypt"
|
||||||
configs:
|
configs:
|
||||||
- source: traefik_yml
|
- source: traefik_yaml
|
||||||
target: /etc/traefik/traefik.yml
|
target: /etc/traefik/traefik.yaml
|
||||||
- source: file_provider_yml
|
- source: file_provider_yaml
|
||||||
target: /etc/traefik/file-provider.yml
|
target: /etc/traefik/file-provider.yaml
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
environment:
|
environment:
|
||||||
- DASHBOARD_ENABLED
|
- DASHBOARD_ENABLED
|
||||||
- LOG_LEVEL
|
- LOG_LEVEL
|
||||||
|
- LETS_ENCRYPT_DNS_CHALLENGE_PROVIDER
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "traefik", "healthcheck"]
|
test: ["CMD", "traefik", "healthcheck"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 10
|
retries: 10
|
||||||
start_period: 1m
|
start_period: 1m
|
||||||
|
command: traefik
|
||||||
deploy:
|
deploy:
|
||||||
update_config:
|
update_config:
|
||||||
failure_action: rollback
|
failure_action: rollback
|
||||||
|
@ -37,21 +37,20 @@ services:
|
||||||
- "traefik.http.routers.traefik.rule=Host(`${DOMAIN}`)"
|
- "traefik.http.routers.traefik.rule=Host(`${DOMAIN}`)"
|
||||||
- "traefik.http.routers.traefik.entrypoints=web-secure"
|
- "traefik.http.routers.traefik.entrypoints=web-secure"
|
||||||
- "traefik.http.routers.traefik.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
- "traefik.http.routers.traefik.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||||
- "traefik.http.routers.traefik.tls.options=default@file"
|
|
||||||
- "traefik.http.routers.traefik.service=api@internal"
|
- "traefik.http.routers.traefik.service=api@internal"
|
||||||
- "traefik.http.routers.traefik.middlewares=security@file"
|
- "traefik.http.routers.traefik.middlewares=security@file"
|
||||||
- coop-cloud.${STACK_NAME}.app.version=v2.4.8-d7d63b0d
|
|
||||||
networks:
|
networks:
|
||||||
proxy:
|
proxy:
|
||||||
external: true
|
external: true
|
||||||
|
|
||||||
configs:
|
configs:
|
||||||
traefik_yml:
|
traefik_yaml:
|
||||||
name: ${STACK_NAME}_traefik_yml_${TRAEFIK_YML_VERSION}
|
file: traefik.yaml.tmpl
|
||||||
file: traefik.yml.tmpl
|
|
||||||
template_driver: golang
|
template_driver: golang
|
||||||
file_provider_yml:
|
file_provider_yaml:
|
||||||
name: ${STACK_NAME}_file_provider_yml_${FILE_PROVIDER_YML_VERSION}
|
file: file-provider.yaml.tmpl
|
||||||
file: file-provider.yml.tmpl
|
|
||||||
template_driver: golang
|
template_driver: golang
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
letsencrypt:
|
letsencrypt:
|
|
@ -1,14 +1,6 @@
|
||||||
---
|
---
|
||||||
http:
|
http:
|
||||||
middlewares:
|
middlewares:
|
||||||
{{ if eq (env "KEYCLOAK_MIDDLEWARE_ENABLED") "1" }}
|
|
||||||
keycloak:
|
|
||||||
forwardAuth:
|
|
||||||
address: "http://traefik-forward-auth:4181"
|
|
||||||
trustForwardHeader: true
|
|
||||||
authResponseHeaders:
|
|
||||||
- X-Forwarded-User
|
|
||||||
{{ end }}
|
|
||||||
security:
|
security:
|
||||||
headers:
|
headers:
|
||||||
frameDeny: true
|
frameDeny: true
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
||||||
"extends": [
|
|
||||||
"config:base"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -9,7 +9,7 @@ providers:
|
||||||
network: proxy
|
network: proxy
|
||||||
swarmMode: true
|
swarmMode: true
|
||||||
file:
|
file:
|
||||||
filename: /etc/traefik/file-provider.yml
|
filename: /etc/traefik/file-provider.yaml
|
||||||
|
|
||||||
api:
|
api:
|
||||||
dashboard: {{ env "DASHBOARD_ENABLED" }}
|
dashboard: {{ env "DASHBOARD_ENABLED" }}
|
||||||
|
@ -24,30 +24,6 @@ entrypoints:
|
||||||
to: web-secure
|
to: web-secure
|
||||||
web-secure:
|
web-secure:
|
||||||
address: ":443"
|
address: ":443"
|
||||||
{{ if eq (env "GITEA_SSH_ENABLED") "1" }}
|
|
||||||
gitea-ssh:
|
|
||||||
address: ":2222"
|
|
||||||
{{ end }}
|
|
||||||
{{ if eq (env "FOODSOFT_SMTP_ENABLED") "1" }}
|
|
||||||
foodsoft-smtp:
|
|
||||||
address: ":2525"
|
|
||||||
{{ end }}
|
|
||||||
{{ if eq (env "SMTP_ENABLED") "1" }}
|
|
||||||
smtp-submission:
|
|
||||||
address: ":587"
|
|
||||||
{{ end }}
|
|
||||||
{{ if eq (env "PEERTUBE_RTMP_ENABLED") "1" }}
|
|
||||||
peertube-rtmp:
|
|
||||||
address: ":1935"
|
|
||||||
{{ end }}
|
|
||||||
{{ if eq (env "SSB_MUXRPC_ENABLED") "1" }}
|
|
||||||
ssb-muxrpc:
|
|
||||||
address: ":8008"
|
|
||||||
{{ end }}
|
|
||||||
{{ if eq (env "MSSQL_ENABLED") "1" }}
|
|
||||||
mssql:
|
|
||||||
address: ":1433"
|
|
||||||
{{ end }}
|
|
||||||
|
|
||||||
ping:
|
ping:
|
||||||
entryPoint: web
|
entryPoint: web
|
||||||
|
@ -60,9 +36,19 @@ certificatesResolvers:
|
||||||
caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
|
caServer: "https://acme-staging-v02.api.letsencrypt.org/directory"
|
||||||
httpChallenge:
|
httpChallenge:
|
||||||
entryPoint: web
|
entryPoint: web
|
||||||
|
dnsChallenge:
|
||||||
|
provider: {{ (env "LETS_ENCRYPT_DNS_CHALLENGE_PROVIDER") }}
|
||||||
|
resolvers:
|
||||||
|
- "1.1.1.1:53"
|
||||||
|
- "8.8.8.8:53"
|
||||||
production:
|
production:
|
||||||
acme:
|
acme:
|
||||||
email: {{ env "LETS_ENCRYPT_EMAIL" }}
|
email: {{ env "LETS_ENCRYPT_EMAIL" }}
|
||||||
storage: /etc/letsencrypt/production-acme.json
|
storage: /etc/letsencrypt/production-acme.json
|
||||||
httpChallenge:
|
httpChallenge:
|
||||||
entryPoint: web
|
entryPoint: web
|
||||||
|
dnsChallenge:
|
||||||
|
provider: {{ (env "LETS_ENCRYPT_DNS_CHALLENGE_PROVIDER") }}
|
||||||
|
resolvers:
|
||||||
|
- "1.1.1.1:53"
|
||||||
|
- "8.8.8.8:53"
|
Loading…
Reference in New Issue