Template
71 lines
2.2 KiB
YAML
71 lines
2.2 KiB
YAML
services:
|
|
idear_processor_networked:
|
|
image: idear_processor
|
|
restart: unless-stopped
|
|
environment:
|
|
- DOCKER_CONTAINER=1
|
|
ports:
|
|
- "${JUPYTER_PORT:-8889}:8888"
|
|
volumes:
|
|
- ./:/idear
|
|
#- ./data:/idear/data
|
|
#- ./figures:/idear/figures
|
|
#- ./notebooks:/idear/notebooks
|
|
#- ./scripts:/idear/scripts
|
|
- network_mount:/mnt/network_mount:rw
|
|
command: >
|
|
bash -c '
|
|
if [ -f WELCOME.ipynb ]; then
|
|
DEFAULT_URL="/lab/workspaces/default?tree=WELCOME.ipynb"
|
|
echo "✅ WELCOME.ipynb found - setting as landing page"
|
|
jupyter trust WELCOME.ipynb
|
|
else
|
|
DEFAULT_URL=""
|
|
echo "⚠️ WELCOME.ipynb not found - using default homepage"
|
|
fi &&
|
|
jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root \
|
|
--NotebookApp.token="${JUPYTER_TOKEN:-my-token}" --LabApp.default_url="$DEFAULT_URL" \
|
|
--ExtensionApp.default_url="$DEFAULT_URL"
|
|
'
|
|
profiles:
|
|
- networked
|
|
|
|
idear_processor:
|
|
image: idear_processor
|
|
restart: unless-stopped
|
|
environment:
|
|
- DOCKER_CONTAINER=1
|
|
- JUPYTER_TOKEN=my-token
|
|
ports:
|
|
- "${JUPYTER_PORT:-8889}:8888"
|
|
volumes:
|
|
- ./:/idear
|
|
command: >
|
|
bash -c '
|
|
if [ -f WELCOME.ipynb ]; then
|
|
DEFAULT_URL="/lab/workspaces/default?tree=WELCOME.ipynb"
|
|
echo "✅ WELCOME.ipynb found - setting as landing page"
|
|
jupyter trust WELCOME.ipynb
|
|
else
|
|
DEFAULT_URL=""
|
|
echo "⚠️ WELCOME.ipynb not found - using default homepage"
|
|
fi &&
|
|
jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root \
|
|
--NotebookApp.token="${JUPYTER_TOKEN:-my-token}" --LabApp.default_url="$DEFAULT_URL" \
|
|
--ExtensionApp.default_url="$DEFAULT_URL"
|
|
'
|
|
|
|
#command: >
|
|
# bash -c "
|
|
# jupyter lab --ip=0.0.0.0 --port=8888 --no-browser --allow-root --NotebookApp.token='${JUPYTER_TOKEN:-my-token}'
|
|
# "
|
|
profiles:
|
|
- local-only
|
|
|
|
volumes:
|
|
network_mount:
|
|
driver_opts:
|
|
type: cifs
|
|
o: "username=${CIFS_USER},password=${CIFS_PASS},vers=3.0"
|
|
device: "${NETWORK_MOUNT}"
|