2024-01-13 19:36:56 +00:00
|
|
|
# traefik-helper
|
|
|
|
|
2024-01-13 19:51:28 +00:00
|
|
|
This is a helper container for traefik. It can add, remove and update services.
|
|
|
|
|
2024-01-13 20:41:55 +00:00
|
|
|
## NOTICE
|
|
|
|
|
2024-01-15 23:09:08 +00:00
|
|
|
PLEASE PLEASE PLEASE MAKE SURE YOU HAVE A BACKUP OF YOUR CONFIG FILE BEFORE USING THIS CONTAINER. I AM NOT RESPONSIBLE FOR ANY DATA LOSS. </br>
|
|
|
|
This helper also assumes that you have SSL certificates setup for your services.
|
2024-01-13 20:41:55 +00:00
|
|
|
|
2024-01-13 19:51:28 +00:00
|
|
|
## Usage
|
|
|
|
|
2024-01-13 20:06:08 +00:00
|
|
|
### Add command alias
|
2024-01-13 19:51:28 +00:00
|
|
|
|
|
|
|
```bash
|
2024-01-13 20:06:08 +00:00
|
|
|
alias traefik-helper='docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v /home/traefik/data/config.yml:/app/config.yml -e CONTAINER_NAME=traefik fascinated/traefik-helper:latest python src/manage.py'
|
2024-01-13 19:55:54 +00:00
|
|
|
```
|
|
|
|
|
2024-01-13 21:51:29 +00:00
|
|
|
### List commands
|
2024-01-13 19:55:54 +00:00
|
|
|
|
|
|
|
```bash
|
2024-01-13 21:51:29 +00:00
|
|
|
traefik-helper
|
2024-01-13 20:07:08 +00:00
|
|
|
```
|
2024-01-13 21:19:57 +00:00
|
|
|
|
|
|
|
## Windows Alias
|
|
|
|
|
|
|
|
```bash
|
|
|
|
function Traefik-Helper {
|
|
|
|
$argsAsString = $args -join ' '
|
|
|
|
|
|
|
|
$sshCommand = "ssh root@ip -i C:\Users\you\.ssh\your_ssh_key docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v /home/traefik/data/config.yml:/app/config.yml -e CONTAINER_NAME=traefik fascinated/traefik-helper:latest python src/manage.py $argsAsString"
|
|
|
|
|
|
|
|
Invoke-Expression $sshCommand
|
|
|
|
}
|
|
|
|
|
|
|
|
# Set the alias
|
2024-01-15 23:09:41 +00:00
|
|
|
Set-Alias -Name "traefik-helper" -Value "Traefik-Helper"
|
2024-01-13 21:19:57 +00:00
|
|
|
```
|