You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Note:** The `.env` file is a special file that Docker Compose uses
@@ -141,25 +139,30 @@ callback url to JupyterHub at runtime. You can do this by either:
141
139
142
140
## Build the JupyterHub Docker image
143
141
144
-
Configure JupyterHub
142
+
Configure JupyterHub and build it into a Docker image.
145
143
146
-
and build it into a Docker image.
144
+
1. Create a `userlist` file with a list of authorized users. The list should
145
+
contain GitHub usernames, and this file should designate at least one
146
+
`admin` user. For instance, this example file contains three users,
147
+
`jtyberg`, `jenny`, and `guido`, and one designated administrator,
148
+
`jtyberg`:
147
149
148
-
1. Create a `userlist` file with a list of authorized users. At a minimum, this file should contain a single admin user. The username should be a GitHub username. For example:
149
-
150
-
**file**
151
-
```
150
+
`userlist` file
151
+
```
152
152
jtyberg admin
153
-
```
153
+
jenny
154
+
guido
155
+
```
154
156
155
-
The admin user will have the ability to add more users in the JupyterHub admin console.
157
+
The admin user will have the ability to add more users through JupyterHub's
158
+
admin console.
156
159
157
-
1. Use [docker-compose](https://docs.docker.com/compose/reference/) to build the
158
-
JupyterHub Docker image on the active Docker machine host:
160
+
1. Use [docker-compose](https://docs.docker.com/compose/reference/) to build
161
+
the JupyterHub Docker image on the active Docker machine host:
Copy file name to clipboardExpand all lines: examples/letsencrypt/README.md
+28-8Lines changed: 28 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,23 @@
1
1
# Let's Encrypt
2
2
3
-
This example includes a Docker Compose configuration file that you can use to deploy [JupyterHub](https://github.com/jupyter/jupyterhub) with TLS certificate and key files generated by [Let's Encrypt](https://letsencrypt.org).
3
+
This example includes a Docker Compose configuration file that you can
4
+
use to deploy [JupyterHub](https://github.com/jupyter/jupyterhub) with
5
+
TLS certificate and key files generated by [Let's Encrypt](https://letsencrypt.org).
4
6
5
-
The `docker-compose.yml` configuration file in this example extends the JupyterHub service defined in the `docker-compose.yml` file in the root directory of this repository.
7
+
The `docker-compose.yml` configuration file in this example extends the
8
+
JupyterHub service defined in the `docker-compose.yml` file in the root
9
+
directory of this repository.
6
10
7
-
When you run the JupyterHub Docker container using the configuration file in this directory, Docker mounts an additional volume containing the Let's Encrypt TLS certificate and key files, and overrides the `SSL_CERT` and `SSL_KEY` environment variables to point to these files.
11
+
When you run the JupyterHub Docker container using the configuration
12
+
file in this directory, Docker mounts an additional volume containing
13
+
the Let's Encrypt TLS certificate and key files, and overrides the
14
+
`SSL_CERT` and `SSL_KEY` environment variables to point to these files.
8
15
9
16
## Create a secrets volume
10
17
11
-
This example stores the Let's Encrypt TLS certificate and key files in a Docker volume, and mounts the volume to the JupyterHub container at runtime.
18
+
This example stores the Let's Encrypt TLS certificate and key files in
19
+
a Docker volume, and mounts the volume to the JupyterHub container at
20
+
runtime.
12
21
13
22
Create a volume to store the certificate and key files.
Run the `letsencrypt.sh` script to create a TLS full-chain certificate and key.
33
+
Run the `letsencrypt.sh` script to create a TLS full-chain certificate
34
+
and key.
25
35
26
-
The script downloads and runs the `letsencrypt` Docker image to create a full-chain certificate and private key, and stores the files in a Docker volume. You must provide a valid, routable, fully-qualified domain name (you must own it), and you must activate the Docker machine host that the domain points to before you run this script. You must also provide a valid email address and the name of the volume you created above.
36
+
The script downloads and runs the `letsencrypt` Docker image to create a
37
+
full-chain certificate and private key, and stores the files in a Docker
38
+
volume. You must provide a valid, routable, fully-qualified domain name (you
39
+
must own it), and you must activate the Docker machine host that the domain
40
+
points to before you run this script. You must also provide a valid email
41
+
address and the name of the volume you created above.
27
42
28
-
_Notes:_ The script hard codes several `letsencrypt` options, one of which automatically agrees to the Let's Encrypt Terms of Service.
43
+
_Notes:_ The script hard codes several `letsencrypt` options, one of which
44
+
automatically agrees to the Let's Encrypt Terms of Service.
29
45
30
46
```
31
47
# Activate Docker machine where JupyterHub will run
To run the JupyterHub container using the Let's Encrypt certificate and key, set the `SECRETS_VOLUME` environment variable to the name of the Docker volume containing the certificate and key files, and run `docker-compose`**from the root directory** of this repository while specifying the `docker-compose.yml` configuration in this directory:
58
+
To run the JupyterHub container using the Let's Encrypt certificate and key,
59
+
set the `SECRETS_VOLUME` environment variable to the name of the Docker volume
60
+
containing the certificate and key files, and run `docker-compose`**from the
61
+
root directory** of this repository while specifying the `docker-compose.yml`
0 commit comments