diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a8e61e9..2141e42 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -61,9 +61,10 @@ jobs: run: | git clone https://github.com/DIRACGrid/diracx.git /tmp/diracx git clone https://github.com/DIRACGrid/DIRAC.git /tmp/DIRAC + git clone https://github.com/DIRACGrid/diracx-web.git /tmp/diracx-web - name: Start demo run: | - ./run_demo.sh --exit-when-done /tmp/diracx /tmp/DIRAC + ./run_demo.sh --exit-when-done /tmp/diracx /tmp/DIRAC /tmp/diracx-web - name: Debugging information run: | export KUBECONFIG=$PWD/.demo/kube.conf diff --git a/README.md b/README.md index 3946e8c..c246d91 100644 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ Depending on the installation you perform, some tasks may be necessary or not. T | developer.ipAlias | string | `nil` | The IP that the demo is running at | | developer.localCSPath | string | `"/local_cs_store"` | If set, mount the CS stored localy instead of initializing a default one | | developer.mountedPythonModulesToInstall | list | `[]` | List of packages which are mounted into developer.sourcePath and should be installed with pip install SOURCEPATH/... | -| developer.nodeImage | string | `"node:16-alpine"` | Image to use for the webapp if nodeModuleToInstall is set | +| developer.nodeImage | string | `"node:alpine"` | Image to use for the webapp if nodeModuleToInstall is set | | developer.nodeModuleToInstall | string | `nil` | List of node modules to install | | developer.offline | bool | `false` | Make it possible to launch the demo without having an internet connection | | developer.sourcePath | string | `"/diracx_source"` | Path from which to mount source of DIRACX | diff --git a/diracx/templates/web-deployment.yaml b/diracx/templates/web-deployment.yaml index f0ac25d..9fc555e 100644 --- a/diracx/templates/web-deployment.yaml +++ b/diracx/templates/web-deployment.yaml @@ -54,7 +54,6 @@ spec: - mountPath: "{{ .Values.developer.sourcePath }}/{{ .Values.developer.nodeModuleToInstall }}" name: "diracx-web-code-mount" subPath: "{{ .Values.developer.nodeModuleToInstall }}" - readOnly: true - mountPath: "{{ $nodeModulePath }}/node_modules" name: "diracx-web-scratch-node-modules" - mountPath: "{{ $nodeModulePath }}/.next" @@ -85,13 +84,15 @@ spec: port: http {{- if $nodeDevInstall }} command: ["npm", "run", "dev", "--prefix", "{{ $nodeModulePath }}", "--", "-p", "{{ .Values.diracxWeb.service.port }}"] + env: + - name: NEXT_TELEMETRY_DISABLED + value: "1" {{- end }} volumeMounts: {{- if $nodeDevInstall }} - mountPath: "{{ .Values.developer.sourcePath }}/{{ .Values.developer.nodeModuleToInstall }}" name: "diracx-web-code-mount" subPath: "{{ .Values.developer.nodeModuleToInstall }}" - readOnly: true - mountPath: "{{ $nodeModulePath }}/node_modules" name: "diracx-web-scratch-node-modules" - mountPath: "{{ $nodeModulePath }}/.next" diff --git a/diracx/values.yaml b/diracx/values.yaml index 9623abb..af9dc00 100644 --- a/diracx/values.yaml +++ b/diracx/values.yaml @@ -97,7 +97,7 @@ developer: # -- List of node modules to install nodeModuleToInstall: null # -- Image to use for the webapp if nodeModuleToInstall is set - nodeImage: node:16-alpine + nodeImage: node:alpine # -- Enable collection of coverage reports (intended for CI usage only) enableCoverage: false # -- Enable automatic reloading inside uvicorn when the sources change diff --git a/run_demo.sh b/run_demo.sh index 0dfbe6c..1fc47ed 100755 --- a/run_demo.sh +++ b/run_demo.sh @@ -250,6 +250,8 @@ if [ ${#python_pkg_names[@]} -gt 0 ]; then fi if [ "${node_pkg_name}" != "" ]; then printf "%b Found Node package directories for: %s\n" ${UNICORN_EMOJI} "${node_pkg_name}" + # Ensure node_modules and .next exist, else create them, as volumes will be mounted there + mkdir -p "${node_pkg_name}"/node_modules "${node_pkg_name}"/.next fi trap "cleanup" EXIT