Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hollodotme/traefik-proxy-autostart
All configs to auto-start a global traefik instance in a docker-compose setup
https://github.com/hollodotme/traefik-proxy-autostart
autostart-script docker-compose launchd traefik
Last synced: 3 months ago
JSON representation
All configs to auto-start a global traefik instance in a docker-compose setup
- Host: GitHub
- URL: https://github.com/hollodotme/traefik-proxy-autostart
- Owner: hollodotme
- License: mit
- Created: 2019-04-22T07:14:41.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-11-15T14:34:58.000Z (3 months ago)
- Last Synced: 2024-11-15T15:40:39.709Z (3 months ago)
- Topics: autostart-script, docker-compose, launchd, traefik
- Language: Shell
- Homepage: https://hollo.me/devops/routing-to-multiple-docker-compose-development-setups-with-traefik.html
- Size: 41 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Autostart a global traefik reverse proxy
This repository contains all configs needed to auto-start a global traefik instance as a reverse-proxy in a docker-compose setup.
The use case is described in my blog post: https://hollo.me/devops/routing-to-multiple-docker-compose-development-setups-with-traefik.html
## Installation
1. Clone this repository to `~/traefik`
2. Create the external docker network "gateway"
```bash
docker network create \
--driver=bridge \
--attachable \
--internal=false \
gateway
```
3. Create the needed SSL-Certificates using [mkcert](https://github.com/FiloSottile/mkcert):
```bash
mkcert "*.example.com"
```
and change the config of certificates in the [certificates.toml](.docker/traefik/dynamic/certificates.toml), so that only your needed certificates are listed.
4. Add `127.0.0.1 subdomain1.example.com subdomain2.example.com ...` to your `/etc/hosts` file, so that the trafiic is routed to the traefik instance.
4. `cp ~/traefik/com.user.traefik.autostart.plist ~/Library/LaunchAgents/com.user.traefik.autostart.plist`
5. Load the service with `launchctl load ~/Library/LaunchAgents/com.user.traefik.autostart.plist`
6. Check the log file for errors: `tail -F ~/Library/Logs/traefik.autostart.log`
7. Visit http://127.0.0.1:8080/dashboard/#/ - You should see your traefik dashboard.If you're not my future self, adapt the paths to the user's home directory in the configs before running anything. 😬