mirror of
https://github.com/jupyterhub/the-littlest-jupyterhub.git
synced 2025-12-18 21:54:05 +08:00
Replace chp with traefik-proxy
This commit is contained in:
@@ -1,27 +0,0 @@
|
||||
# Template file for Configurable HTTP Proxy systemd service
|
||||
# Uses simple string.format() for 'templating'
|
||||
[Unit]
|
||||
# Wait for network stack to be fully up before starting CHP
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=nobody
|
||||
Restart=always
|
||||
# chp process should have no write access anywhere on disk
|
||||
ProtectHome=tmpfs
|
||||
ProtectSystem=strict
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectKernelTunables=yes
|
||||
ProtectKernelModules=yes
|
||||
EnvironmentFile={install_prefix}/state/configurable-http-proxy.secret
|
||||
ExecStart={install_prefix}/hub/node_modules/.bin/configurable-http-proxy \
|
||||
--ip 127.0.0.1 \
|
||||
--port 15003 \
|
||||
--api-ip 127.0.0.1 \
|
||||
--api-port 15002 \
|
||||
--error-target http://127.0.0.1:15001/hub/error
|
||||
|
||||
[Install]
|
||||
# Start service when system boots
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,9 +1,9 @@
|
||||
# Template file for JupyterHub systemd service
|
||||
# Uses simple string.format() for 'templating'
|
||||
[Unit]
|
||||
# CHP must have successfully started *before* we launch JupyterHub
|
||||
Requires=configurable-http-proxy.service
|
||||
After=configurable-http-proxy.service
|
||||
# Traefik must have successfully started *before* we launch JupyterHub
|
||||
Requires=traefik.service
|
||||
After=traefik.service
|
||||
|
||||
[Service]
|
||||
User=root
|
||||
@@ -17,7 +17,6 @@ PrivateDevices=yes
|
||||
ProtectKernelTunables=yes
|
||||
ProtectKernelModules=yes
|
||||
# Source CONFIGPROXY_AUTH_TOKEN from here!
|
||||
EnvironmentFile={install_prefix}/state/configurable-http-proxy.secret
|
||||
Environment=TLJH_INSTALL_PREFIX={install_prefix}
|
||||
ExecStart={python_interpreter_path} -m jupyterhub.app -f {jupyterhub_config_path}
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@ After=network.target
|
||||
[Service]
|
||||
User=root
|
||||
Restart=always
|
||||
# process only needs to write state/acme.json file, no other files
|
||||
ProtectHome=tmpfs
|
||||
ProtectSystem=strict
|
||||
PrivateTmp=yes
|
||||
PrivateDevices=yes
|
||||
ProtectKernelTunables=yes
|
||||
ProtectKernelModules=yes
|
||||
ReadWritePaths={install_prefix}/state/rules.toml
|
||||
ReadWritePaths={install_prefix}/state/acme.json
|
||||
WorkingDirectory={install_prefix}/state
|
||||
ExecStart={install_prefix}/hub/bin/traefik \
|
||||
|
||||
Reference in New Issue
Block a user