Skip to content

toby-griffiths/docker-traefik-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Traefik Proxy

Creates a reverse proxy based on Docker container labels.

Getting started

Download and execute the setup script…

$ wget -O - https://raw.githubusercontent.com/toby-griffiths/docker-traefik-proxy/main/setup | sh

See script output for details of how to label your containers for proxying.

Profit!

Personally I use this function to download the latest script, and cache locally, then run downloaded, or cached version…

traefik-proxy-setup () {
  filename=traefik-proxy-setup
  tmpFile="/tmp/$filename"
  dest="${HOME}/bin/$filename"

  _fetchLatestScript() {
    wget -O "$tmpFile" -o /dev/null https://raw.githubusercontent.com/toby-griffiths/docker-traefik-proxy/main/setup && \
      mv -f "$tmpFile" "$dest"
  }

  echo "Fetching latest version of setup script"
  _fetchLatestScript || echo "Unable to fetch latest version.  Using locally stored version."
  ! test -f "$dest" && echo "Setup script not downloaded.  Aborting" && return 1
  chmod +x "$dest"
  "$dest"
}

About

Creates a reverse proxy based on Docker container labels.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors