fix(ui): fix configuration handling on the docker image
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 14 Feb 2024 21:14:50 +0000 (22:14 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 14 Feb 2024 21:14:50 +0000 (22:14 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
docker/Dockerfile
ui/web/README.md
ui/web/build-prepare.js [deleted file]
ui/web/package.json
ui/web/pnpm-lock.yaml

index 0ffd4bf28ef4d82b5db836008c8f7cc4587c733c..0e13a0dd2963d36af1e7fb3caf3a26c0975583c2 100644 (file)
@@ -25,6 +25,7 @@ RUN set -ex \
   && pnpm set progress=false \
   && pnpm config set depth 0 \
   && pnpm install --ignore-scripts --frozen-lockfile \
+  && cp src/assets/config-template.json public/config.json \
   && pnpm build
 
 FROM node:lts-alpine
index f2c21d13074db20a4238a3f88d15dc27bdb0311f..2d78ce3b0c6694819d343e40bdf0a78642c3f523 100644 (file)
@@ -39,27 +39,15 @@ Copy the configuration template [src/assets/config-template.json](src/assets/con
 
 ### Run
 
-#### Compiles for production
-
-```shell
-pnpm build
-```
-
-#### Compiles and preview locally for production
+#### Compiles for production and preview locally
 
 ```shell
 pnpm preview
 ```
 
-#### Compiles and run for production
-
-```shell
-pnpm start
-```
-
 #### Try it out
 
-For both options above you can then follow the link displayed in the terminal at the end of compilation. The Web UI looks like the following
+You can now follow the link displayed in the terminal. The Web UI looks like the following:
 
 ![webui](./src/assets/webui.png)
 
diff --git a/ui/web/build-prepare.js b/ui/web/build-prepare.js
deleted file mode 100644 (file)
index 5ac031c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-import shell from 'shelljs'
-
-shell.cp('src/assets/config-template.ts', 'src/assets/config.ts')
index 3d9d373c5558574341ac451293f38558dfe1bbeb..7135250aa94886cb7d9a66df27d0bb1bcd9f5357 100644 (file)
   "type": "module",
   "scripts": {
     "preinstall": "npx --yes only-allow pnpm",
+    "build": "vite build",
+    "preview": "pnpm build && vite preview",
     "start": "pnpm build && node start.js",
     "dev": "vite",
-    "preview": "vite preview",
-    "build": "vite build",
     "clean:dist": "npx rimraf dist",
     "clean:node_modules": "npx rimraf node_modules",
     "lint": "cross-env TIMING=1 eslint . --cache --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --ignore-path .gitignore",
@@ -60,7 +60,6 @@
     "jsdom": "^24.0.0",
     "prettier": "^3.2.5",
     "rimraf": "^5.0.5",
-    "shelljs": "^0.8.5",
     "typescript": "~5.3.3",
     "vite": "^5.1.2",
     "vitest": "^1.2.2"
index a07c15aadc45b58f700b8671ec709e29be57131f..d804960106a3e6a4309d63fdca4ee760c1ec9065 100644 (file)
@@ -88,9 +88,6 @@ devDependencies:
   rimraf:
     specifier: ^5.0.5
     version: 5.0.5
-  shelljs:
-    specifier: ^0.8.5
-    version: 0.8.5
   typescript:
     specifier: ~5.3.3
     version: 5.3.3
@@ -2770,11 +2767,6 @@ packages:
       side-channel: 1.0.5
     dev: true
 
-  /interpret@1.4.0:
-    resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==}
-    engines: {node: '>= 0.10'}
-    dev: true
-
   /is-array-buffer@3.0.4:
     resolution: {integrity: sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw==}
     engines: {node: '>= 0.4'}
@@ -3508,13 +3500,6 @@ packages:
     resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==}
     dev: true
 
-  /rechoir@0.6.2:
-    resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==}
-    engines: {node: '>= 0.10'}
-    dependencies:
-      resolve: 1.22.8
-    dev: true
-
   /regexp.prototype.flags@1.5.2:
     resolution: {integrity: sha512-NcDiDkTLuPR+++OCKB0nWafEmhg/Da8aUPLPMQbK+bxKKCm1/S5he+AqYa4PlMCVBalb4/yxIRub6qkEx5yJbw==}
     engines: {node: '>= 0.4'}
@@ -3708,16 +3693,6 @@ packages:
     engines: {node: '>=8'}
     dev: true
 
-  /shelljs@0.8.5:
-    resolution: {integrity: sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==}
-    engines: {node: '>=4'}
-    hasBin: true
-    dependencies:
-      glob: 7.2.3
-      interpret: 1.4.0
-      rechoir: 0.6.2
-    dev: true
-
   /side-channel@1.0.5:
     resolution: {integrity: sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==}
     engines: {node: '>= 0.4'}