Initial working version

This commit is contained in:
3wc 2021-11-16 00:20:36 +02:00
commit 173845eae0
2 changed files with 40 additions and 0 deletions

7
.env.sample Normal file
View File

@ -0,0 +1,7 @@
TYPE=jupyter-lab
DOMAIN=jupyter-lab.example.com
## Domain aliases
#EXTRA_DOMAINS=', `www.jupyter-lab.example.com`'
LETS_ENCRYPT_ENV=production

33
compose.yml Normal file
View File

@ -0,0 +1,33 @@
---
version: "3.8"
services:
app:
image: jupyter/datascience-notebook:r-4.1.1
networks:
- proxy
environment:
- JUPYTER_ENABLE_LAB=yes
deploy:
restart_policy:
condition: on-failure
labels:
- "traefik.enable=true"
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=8888"
- "traefik.http.routers.${STACK_NAME}.rule=Host(`${DOMAIN}`${EXTRA_DOMAINS})"
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
## Redirect from EXTRA_DOMAINS to DOMAIN
#- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}-redirect"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLForceHost=true"
#- "traefik.http.middlewares.${STACK_NAME}-redirect.headers.SSLHost=${DOMAIN}"
# healthcheck:
# test: ["CMD", "curl", "-f", "http://localhost"]
# interval: 30s
# timeout: 10s
# retries: 10
# start_period: 1m
networks:
proxy:
external: true