|
4 | 4 |
|
5 | 5 | ## Prerequisites
|
6 | 6 |
|
7 |
| -- NodeJS ^8.9 |
8 |
| -- npm ^5.6 |
| 7 | +- NodeJS ^18 |
| 8 | +- npm ^8 |
9 | 9 |
|
10 | 10 | ## Project setup
|
11 | 11 |
|
12 |
| -The code for the frontend in inside the `viplab-standalone-frontend`-folder. |
| 12 | +The code for the frontend is inside the `viplab-standalone-frontend`-folder. |
13 | 13 | The first step ist to move inside that folder:
|
14 | 14 | ```
|
15 | 15 | cd <path-to-Vue-Frontend-Repo>/viplab-standalone-frontend
|
@@ -55,17 +55,16 @@ npm run serve
|
55 | 55 | Then open your browser on <http://localhost:8080>
|
56 | 56 | (or the url specified on the console after successfully running the previous command)
|
57 | 57 |
|
58 |
| -Alternativly, you can build the node-dev container (Dockerfile-dev in this repository). |
| 58 | +Alternativly, you can use the viplab/npm-container (or build the Dockerfile-dev in this repository). |
59 | 59 | Ensure a clean project directory (without node_modules or dist folder) to be in sync with the container while developing. First, run the container with the 'install' command, mounting the working directory to your project directory.
|
60 | 60 | ```
|
61 |
| -docker build -f Dockerfile-dev -t viplab-vue-frontend:dev . |
62 |
| -docker run --rm -v <path-to-project-dir>:/app viplab-vue-frontend:dev install |
| 61 | +docker run --rm -v <path-to-viplab-standalone-frontend-dir>:/app viplab/npm install |
63 | 62 | ```
|
64 |
| -Then you can start the container with hot reloading or, use the viplab-docker-dev-env compose-file with profile "frontend-dev". |
| 63 | +Then you can start the container with hot reloading or, use the viplab-docker-dev-env compose-file with profile "vue-mount". |
65 | 64 | ```
|
66 |
| -docker run -it -p 8081:8081 --rm -v <path-to-project-dir>:/app --name viplab-vue-frontend-dev viplab-vue-frontend:dev |
| 65 | +docker run -it -p 8081:8081 --rm -v <path-to-viplab-standalone-frontend-dir>:/app --name viplab-vue-frontend-dev viplab/npm run serve -- --host 0.0.0.0 |
67 | 66 | ```
|
68 |
| -When you need install further packages while to container is running use: |
| 67 | +When you need install further packages while to container is running (and you named it )viplab-vue-frontend-dev"), use: |
69 | 68 | ```
|
70 | 69 | docker exec viplab-vue-frontend-dev npm install XXX
|
71 | 70 | ```
|
|
0 commit comments