Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example demonstrating how to run jupyterhub with docker-compose #126

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

alexleach
Copy link

As the title suggests, add a new example directory with configuration files and a README, demonstrating and describing how to run jupyterhub with docker-compose.

Runs two containers:-

  1. traefik (used as proxy to the hub and user notebook servers)
  2. jupyterhub

Can also close jupyterhub/traefik-proxy#158

@welcome
Copy link

welcome bot commented May 13, 2023

Thanks for submitting your first pull request! You are awesome! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Copy link
Member

@manics manics left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Please could you add a test for this example?

This repository went through a period of no maintenance leading to quite a few issues and complaints, so it would be helpful if there was an end-to-end test.

# The jupyterhub/jupyterhub instance is quite bulky... A stripped down version
# can be built from the python:3.x-slim images.
#FROM jupyterhub/jupyterhub
FROM python:3.11-slim
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to build on top of the standard JupyterHub image, as in the other example?

FROM jupyterhub/jupyterhub:$JUPYTERHUB_VERSION

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, no problem

# Shared volume for the file provider's dynamic config
- traefik-dynamic-config:/var/run/traefik/

# jupyterhub's DockerSpawner needs read access to the docker socket.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised it only needs read access 🤷‍♂️

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I don't think services should be modifying their own configuration file.

e.g. all config files in (at least my) /etc folder are only modifiable by root, but services are (normally / always?) run by a non-root user, so no service on my host PC can modify its own config file. Instead, services get write access to various subfolders in /var (e.g. run, cache, db, etc.).

@alexleach
Copy link
Author

Thanks! Please could you add a test for this example?

Sure, sounds like a good idea. I'm having to learn about github actions, but that seems like an increasingly common tool, so I'm happy to familiarise myself with it 🙂

I'll try and get something working (without too many further commits), and will update this PR when I do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants