Compose-Examples/examples/traefik/README.md

29 lines
2.3 KiB
Markdown
Raw Permalink Normal View History

2023-02-23 00:02:20 +00:00
# References
2023-02-15 21:45:31 +00:00
- https://github.com/traefik/traefik
- https://docs.ibracorp.io/traefik/master/docker-compose
2023-02-15 21:45:31 +00:00
- https://blog.lrvt.de/nginx-proxy-manager-versus-traefik/
- https://blog.lrvt.de/configuring-fail2ban-with-traefik/
- https://github.com/l4rm4nd/F2BFilters
2023-02-24 21:55:33 +00:00
# Notes
2023-07-20 15:00:46 +00:00
Spawning up a Traefik reverse proxy can be done in various ways.
2023-07-20 15:04:29 +00:00
There are options to outsource the Traefik configuration into static and dynamic YAML configuration files. Alternatively, the configuration parameters can be defined directly as command definitions, which are applied during runtime of the Traefik container. We've provided both options as Docker Compose examples.
2023-07-20 15:00:46 +00:00
2023-07-20 15:04:29 +00:00
Please remember to configure logrotation on your Docker host server if you've enabled Traefik access logs. See `logrotate_example.txt` as example. The logs will increase in size and may cause disk space issues, if not handled properly.
2023-07-20 15:00:46 +00:00
### Spawning up Traefik with outsourced configuration files
2023-02-24 21:57:12 +00:00
1. Put the provided `traefik.yml` (static) and `fileConfig.yml` (dynamic) configuration files to your volume bind mount (here `/mnt/docker-volumes/traefik`).
2023-09-23 09:37:38 +00:00
2. Add your Cloudflare API token as environment variable to the `docker-compose.yml` file and define your Cloudflare email address in the `traefik.yml` file. May adjust to your preferred certresolver. The example given is for Cloudflare.
2023-07-20 15:00:46 +00:00
3. Adjust the static and dynamic configuration files to your needs. Especially replace the `example.com` strings with your domain name in the `traefik.yml` static configuration file. Also adjust the authelia and basic auth definitions in the `fileConfig.yml` dynamic configuration file with secure values and your domain names.
2023-02-24 21:55:33 +00:00
2023-07-20 15:00:46 +00:00
### Spawning up Traefik with configuration command definitions
1. Use the `docker-compose-command-config.yml` example as a reference point.
2. Put the provided `fileConfig.yml` (dynamic) configuration file to your volume bind mount (here `/mnt/docker-volumes/traefik`).
3. Add your Cloudflare API token as environment variable in the compose file. Define your Cloudflare email address in the command definitions of the compose file. May adjust to your preferred certresolver. The example given is for Cloudflare.
4. Adjust the dynamic configuration file `fileConfig.yml` to your needs. Especially adjust the authelia and basic auth definitions with secure values and your domain names.