https://github.com/maltegrosse/traefik-static-file-api
Add via simple api call routes to static config file
https://github.com/maltegrosse/traefik-static-file-api
Last synced: about 2 months ago
JSON representation
Add via simple api call routes to static config file
- Host: GitHub
- URL: https://github.com/maltegrosse/traefik-static-file-api
- Owner: maltegrosse
- License: mit
- Created: 2024-05-31T09:57:03.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-31T15:03:07.000Z (about 2 years ago)
- Last Synced: 2025-03-11T14:48:40.875Z (over 1 year ago)
- Language: Go
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Traefik routes API static file
## Description
A simple api wrapper for the [static file traefik configuration](https://doc.traefik.io/traefik/providers/file/), to dynamically add http routes where a wildcard certificate is impossible due to missing dns challenge, but only one target service is needed
## Run
Get the latest container from `docker pull maltegrosse/traefik-static-file-api:latest`, setup with with following environment variables:
- `API_PORT` default: "8080"
- `FILENAME` default: "services.yml"
- `ROUTER` default: "http"
- `DOMAIN` default: ".example.com"
- `SERVICE` default: "svc@docker"
- `CERT_RESOLVER` default: "le"
- `ENTRY_POINT` default: "websecure"
Simple execute a post command to `localhost:8080`as a json including 'subdomain' key, e.g.
```
{"subdomain":"john"}
```
## Hints
- If using traefik inside a docker, always mount a folder including the config files into the container when using the watch functionality, otherwise no changes are detected
- There is no security mechanism for this service, so dont expose this service!
## License
- under **[MIT license](http://opensource.org/licenses/mit-license.php)**