Manage your services with a reverse-proxy : Traefik

Sylvain Combraque
Developer at les-tilleuls.coop
API Platform contributor
Træfik helper

@Darkweak

@Darkweak_dev

Les-tilleuls.coop
Self-managed since 2011
40 people, 1000% in 6 years
jobs@les-tilleuls.coop









"Why don't you use apache or nginx ?"
Apache, Nginx
Service deletion
Configuration file deletion
A long time ago in a galaxy (not) far, far away

SSL cert deletion
Service creation
Configuration file creation
SSL cert creation
Traefik
Emile Vauge
Written in GO
Works fine with Docker
Easy to use
French Quality

Docker

Lightweight virtual machine
Written in GO
Stop configure your own development machine
Compose

Docker layout
Manage multiple containers
One file
Better than use only commands

API Platform
Kévin Dunglas
API first application
Symfony
ReactJS, Vuejs, Angular
native docker-compose support
French Quality too


localhost
localhost:81
localhost:8080
client
admin
api


In dev mode
Edit your /etc/hosts file

client
admin
api
[www.]domain.com
admin.domain.com
api.domain.com
If you want to deploy 3 instances of whoami service
zsh
docker-compose --scale whoami=3
>


Job is done
But...


zsh
sudo certbot --nginx \
-d example.com \
-d www.example.com
>
zsh
sudo certbot renew
>
zsh
letsencrypt-auto
>
zsh
letsencrypt-auto --authenticator standalone \
--installer apache -d example.com \
--pre-hook "service apache2 stop" \
--post hook "service apache2 start" \
--renew-by-default
>
credits to : Grafikart

Those days are over !


Just one file to configure
traefik.toml




It works like a charm

Use providers instead ?
It also works with
Azure
Cloudflare
GoDaddy
OVH
And more than 40 others...
zsh
docker stack deploy
>
Create a docker swarm stack
Wanna try Træfik ?


Thank you for your attention !

Questions
traefik
By darkweak
traefik
- 487