Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ This mod gives SWAG the ability to auto-detect running containers via labels and
- `swag_port=80` - *optional* - overrides *internal* exposed port (if no preset conf and this label not set, auto-proxy will default to first detected exposed port)
- `swag_proto=http` - *optional* - overrides internal proto (defaults to http)
- `swag_url=containername.domain.com` - *optional* - overrides *server_name* (defaults to `containername.*`)
- `swag_auth=authelia` - *optional* - enables auth methods (options are `authelia`, `authentik`, `ldap` and `http` for basic http auth)
- `swag_auth=authelia` - *optional* - enables auth methods (options are `authelia`, `authentik`, `ldap`, `tinyauth` and `http` for basic http auth)
- `swag_auth_bypass=/api,/othersubfolder` - *optional* - bypasses auth for selected subfolders. Comma separated, no spaces.
- `swag_server_custom_directive=custom_directive;` - *optional* - injects the label value as is into the server block of the generated conf. Must be a valid nginx directive, ending with a semi colon.
- `swag_preset_conf=confname` - *optional* - allows defining a preset conf to use if the container name does not match one (if the conf name is `radarr.subdomain.conf.sample`, set this value to `radarr`). If the container name matches an existing conf, this var will be ignored.
Expand Down
6 changes: 6 additions & 0 deletions root/app/auto-proxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ for CONTAINER in ${AUTO_GEN}; do
elif [ "${swag_auth}" == "authentik" ]; then
sed -i "s|#include /config/nginx/authentik|include /config/nginx/authentik|g" "/etc/nginx/http.d/auto-proxy-${CONTAINER}.subdomain.conf"
echo "**** Enabling Authentik for ${CONTAINER} ****"
elif [ "${swag_auth}" == "tinyauth" ]; then
sed -i "s|#include /config/nginx/tinyauth|include /config/nginx/tinyauth|g" "/etc/nginx/http.d/auto-proxy-${CONTAINER}.subdomain.conf"
echo "**** Enabling Tinyauth for ${CONTAINER} ****"
elif [ "${swag_auth}" == "http" ]; then
sed -i "s|#auth_basic|auth_basic|g" "/etc/nginx/http.d/auto-proxy-${CONTAINER}.subdomain.conf"
echo "**** Enabling basic http auth for ${CONTAINER} ****"
Expand Down Expand Up @@ -167,6 +170,9 @@ DUDE
elif [ "${swag_auth}" == "authentik" ]; then
sed -i "s|#include /config/nginx/authentik|include /config/nginx/authentik|g" "/etc/nginx/http.d/auto-proxy-${CONTAINER}.subdomain.conf"
echo "**** Enabling Authentik for ${CONTAINER} ****"
elif [ "${swag_auth}" == "tinyauth" ]; then
sed -i "s|#include /config/nginx/tinyauth|include /config/nginx/tinyauth|g" "/etc/nginx/http.d/auto-proxy-${CONTAINER}.subdomain.conf"
echo "**** Enabling Tinyauth for ${CONTAINER} ****"
elif [ "${swag_auth}" == "http" ]; then
sed -i "s|#auth_basic|auth_basic|g" "/etc/nginx/http.d/auto-proxy-${CONTAINER}.subdomain.conf"
echo "**** Enabling basic http auth for ${CONTAINER} ****"
Expand Down