feat: add CERTIFICATE_DOMAIN_NAME env variable for cert generation

- Add CERTIFICATE_DOMAIN_NAME to compose.yml (defaults to localhost)
- Update 00_generate_ssl_cert.sh to use env variable
- Allows custom domain names for self-signed certificates
This commit is contained in:
stellarshenson
2026-01-05 15:09:32 +01:00
parent 0411f34749
commit acd62e92bf
2 changed files with 3 additions and 1 deletions

View File

@@ -61,6 +61,7 @@ services:
- DOCKER_NOTEBOOK_IMAGE=stellars/stellars-jupyterlab-ds:latest # jupyterlab image to spawn
- DOCKER_NETWORK_NAME=jupyterhub_network # spawned containers will join this network
- JUPYTERHUB_BASE_URL=/jupyterhub # default prefix
- CERTIFICATE_DOMAIN_NAME=localhost # domain name for self-signed certificate generation
- ENABLE_GPU_SUPPORT=2 # gpu status: 0 - disabled, 1 - enabled, 2 - auto-detect
- ENABLE_JUPYTERHUB_SSL=0 # if using traefik - you do need direct SSL config
- ENABLE_SERVICE_MLFLOW=1 # enable mlflow for experiment tracking

View File

@@ -6,8 +6,9 @@
# generate ssl keys if don't exist yet (happens first time the script is run)
# skip this step if no certificate dir
CERTS_DIR="/mnt/certs"
DOMAIN_NAME="${CERTIFICATE_DOMAIN_NAME:-localhost}"
if [[ -z $(find $CERTS_DIR -name '*.crt') ]]; then
/mkcert.sh "$CERTS_DIR" "localhost" "server" # parsms: certs_dir, common_name, file_prefix
/mkcert.sh "$CERTS_DIR" "$DOMAIN_NAME" "server" # params: certs_dir, common_name, file_prefix
fi