Skip to content

Commit 9a8fed5

Browse files
committed
docs(resources): clarify defaultPath launch override
1 parent a957f14 commit 9a8fed5

4 files changed

Lines changed: 10 additions & 1 deletion

File tree

dockerfiles/Code/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ images continue to share one package set and the Dockerfile remains small.
8686
The start script launches:
8787

8888
```bash
89-
code-server --auth none --bind-addr 127.0.0.1:8889 --ignore-last-opened "${AUPLC_CODE_WORKDIR:-/home/jovyan}"
89+
code-server --auth none --bind-addr 127.0.0.1:8889 --ignore-last-opened "${AUPLC_CODE_WORKDIR:-$(pwd)}"
9090
nginx -c /tmp/auplc-code-server-nginx.conf -g 'daemon off;'
9191
```
9292

dockerfiles/Code/start-code-server.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export NPM_CONFIG_PREFIX="${NPM_CONFIG_PREFIX:-${HOME:-/home/jovyan}/.local}"
1010
public_port="${PORT:-8888}"
1111
code_server_port="${AUPLC_CODE_SERVER_PORT:-8889}"
1212
service_prefix="${JUPYTERHUB_SERVICE_PREFIX:-/}"
13+
# Without a Hub-provided launch override, open code-server in the image WORKDIR.
1314
workdir="${AUPLC_CODE_WORKDIR:-$(pwd)}"
1415
extensions_list="${AUPLC_CODE_EXTENSIONS_LIST:-/opt/auplc/extensions/extensions.txt}"
1516
local_extensions_dir="${AUPLC_CODE_LOCAL_EXTENSIONS_DIR:-/opt/auplc/extensions/local}"

runtime/hub/core/spawner/kubernetes.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,10 @@ def _resolve_target_path(self, resource_type: str, custom_repo_path: str | None
451451

452452
resource_metadata = self._hub_config.get_resource_metadata(resource_type) if self._hub_config else None
453453
default_path = str(getattr(resource_metadata, "defaultPath", "") or "").strip()
454+
455+
# defaultPath is a Hub launch-dir override, not the image WORKDIR.
456+
# If it is omitted, preserve the image/application default instead of
457+
# guessing a path; this keeps non-standard images in their own WORKDIR.
454458
return default_path or None
455459

456460
def _apply_target_path_mapping(self, resource_type: str, target_path: str | None) -> None:

runtime/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,10 @@ custom:
325325

326326
# Course Metadata (for spawn UI)
327327
# Defines display information for each course
328+
# defaultPath is an optional Hub launch-directory override, not the image
329+
# WORKDIR. Custom Repo launches always open the cloned repository first. If
330+
# defaultPath is omitted or null, Hub does not force a landing path and the
331+
# image/application default normally follows the image WORKDIR.
328332
metadata:
329333
cpu:
330334
group: "CUSTOM REPOS"

0 commit comments

Comments
 (0)