diff --git a/README.md b/README.md index a7bf3e2..5710e28 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,24 @@ This is a helper for [Traefik](https://traefik.io/) on Kubernetes. It allows you ## Todo - [ ] Use the Traefik api to list all services + +## Windows Alias + +Ensure you have ran `Set-ExecutionPolicy Unrestricted` in PowerShell as an administrator. + +Create the directory `~/Documents/WindowsPowerShell` and create a file called `traefik.kubernetes.ps1` in that directory. Add the following code to the file. + +```bash +function Traefik-Helper { + $argsAsString = $args -join ' ' + + $command = "projectlocation/traefik-helper-kubernetes/.venv/Scripts/python.exe projectlocation/traefik-helper-kubernetes/app.py $argsAsString" + + Invoke-Expression $command +} + +# Set the alias +Set-Alias -Name "traefik" -Value "Traefik-Helper" +``` + +This will allow you to run the `traefik` command in PowerShell.