Skip to content

Commit

Permalink
fix more linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianEllwood committed Dec 2, 2024
1 parent aea69d5 commit c4f4139
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 38 deletions.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Title the PR to complete the sentence: "Merging this PR will ..."

## What

Describe what you have changed and *why*
Describe what you have changed and _why_

## How to review

Expand All @@ -11,4 +11,4 @@ Describe what you have changed and *why*
3. Profit!

Provide [http://example.com](links) to relevant tickets, articles or other
resources.
resources.
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@ Jupyterlab is deployed by the Control Panel. When deployed the pod looks like th
The authentication is done using an OIDC call to Auth0, the call is written in lua.

N.B. There may in future be a better solution, however at time of implementation, lua was the nginx community recommended solution for this authentication flow.

## Usage locally

All interactions are performed via the `Makefile`.

| Makefile command | Description |
| ---------------- | ----------- |
| clean | stop & destroy containers |
| pull | pull the latest image (unused) |
| push | push the image to a docker repository (gha-only) |
| build | build the proxy image |
| up | start the proxy and jupyter in daemon mode |
| logs | see the logs |
| integration | just run the tests (for gha) |
| test | run the test process including start and cleanup |
| Makefile command | Description |
| ---------------- | ------------------------------------------------ |
| clean | stop & destroy containers |
| pull | pull the latest image (unused) |
| push | push the image to a docker repository (gha-only) |
| build | build the proxy image |
| up | start the proxy and jupyter in daemon mode |
| logs | see the logs |
| integration | just run the tests (for gha) |
| test | run the test process including start and cleanup |

### Running the Application Locally

Expand All @@ -33,7 +34,7 @@ directory.
Run `make build` then `make up` to start the proxy and Jupyter. Once up, you'll
find it at http://_<your_github_username>_-jupyter-lab.127-0-0-1.nip.io:8001/.

On the callback from Auth0, you'll need to remove the s from the https in the callback url,
On the callback from Auth0, you'll need to remove the s from the https in the callback url,
because this doesn't have http support.
(https is handled by kubernetes ingress in production.)

Expand All @@ -46,7 +47,7 @@ To restart and rebuild, `make clean build up`.
## Environment Variables

| Environment Variable | Description |
| -------------------- | -----------------------------------------------------|
| -------------------- | ---------------------------------------------------- |
| APP_HOST | The hostname of the proxied app (e.g. rstudio) |
| APP_PORT | Port on which the proxied app is listening (eg 8787) |
| USERNAME | GitHub username of the person whose instance this is |
Expand All @@ -73,6 +74,7 @@ The nginx-proxy-jupyter container is deployed via helm chart without using the M
It will need the above environment variables to be set; the startup script will complain if they are not.

Currently it's used in the following charts

- jupyter-lab
- jupyter-lab-all-spark
- jupyter-lab-datascience-notebook
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
services:
jupyter-lab:
image: jupyter/pyspark-notebook
ports: [8888:8888,8050:8050]
ports: [8888:8888, 8050:8050]
volumes: [./home:/home/test_user]

nginx-proxy:
Expand Down
5 changes: 3 additions & 2 deletions nginx-proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#checkov:skip=CKV_DOCKER_3: Migrate as is

FROM openresty/openresty:alpine-fat
RUN mkdir /var/log/nginx
RUN apk add --no-cache openssl-dev git gcc
RUN luarocks install lua-resty-openidc
COPY nginx.conf.template /config/nginx.conf.template
COPY scripts/start_proxy.sh /usr/bin/start_proxy.sh
RUN chmod +x /usr/bin/start_proxy.sh
COPY --chmod=0755 scripts/start_proxy.sh /usr/bin/start_proxy.sh
COPY custom_404.html /var/www/html

HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD ["/usr/local/bin/healthcheck.sh"]
Expand Down
40 changes: 19 additions & 21 deletions nginx-proxy/custom_404.html
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
<!DOCTYPE html>
<!doctype html>
<html>

<head>
<title>
404 Error
</title>
<head>
<title>404 Error</title>
<style>
h1 {
font-family: Arial, sans-serif;
color: black
}
h1 {
font-family: Arial, sans-serif;
color: black;
}

p1 {
font-family: Arial, sans-serif;
color: black
}
p1 {
font-family: Arial, sans-serif;
color: black;
}
</style>
</head>
</head>

<body>
<body>
<h1>Error 404: Not found</h1>
<p1>The requested URL was not found on this server. Please check the URL and try again.</p1>

</body>

</html>
<p1
>The requested URL was not found on this server. Please check the URL and
try again.</p1
>
</body>
</html>

0 comments on commit c4f4139

Please sign in to comment.