Skip to content

Instantly share code, notes, and snippets.

@Manouchehri
Forked from cboettig/Caddyfile
Created December 15, 2016 03:13
Show Gist options
  • Select an option

  • Save Manouchehri/4ffbdc34efc09b9b6376ac962b5a0bbc to your computer and use it in GitHub Desktop.

Select an option

Save Manouchehri/4ffbdc34efc09b9b6376ac962b5a0bbc to your computer and use it in GitHub Desktop.
Caddyserver proxy for Jupyter
https://example.com {
proxy / jupyter:8888 {
proxy_header X-Real-IP {remote}
proxy_header Host {host}
}
proxy {{.PathMatches "~* /(api/kernels/[^/]+/(channels|iopub|shell|stdin)|terminals/websocket)/?"}} jupyter:8888 {
proxy_header X-Real-IP {remote}
proxy_header Host {host}
websocket
}
}
jupyter:
image: jupyter/minimal-notebook
environment:
- PASSWORD=${PASSWORD}
caddy:
image: joshix/caddy
links:
- jupyter
volumes:
- .:/var/www/html
- $HOME/.caddy/:/.caddy
ports:
- 80:80
- 443:443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment