Pārlūkot izejas kodu

Added option to map vue-cli ports from workspace container

Laércio de Sousa 5 gadi atpakaļ
vecāks
revīzija
3fe18368bd
3 mainītis faili ar 17 papildinājumiem un 3 dzēšanām
  1. 13 3
      DOCUMENTATION/content/documentation/index.md
  2. 2 0
      docker-compose.yml
  3. 2 0
      env-example

+ 13 - 3
DOCUMENTATION/content/documentation/index.md

@@ -560,8 +560,14 @@ composer update
 ```bash
 phpunit
 ```
-
-
+```
+vue serve
+```
+(browse the results at `http://localhost:[WORKSPACE_VUE_CLI_SERVE_HOST_PORT]`)
+```
+vue ui
+```
+(browse the results at `http://localhost:[WORKSPACE_VUE_CLI_UI_HOST_PORT]`)
 
 
 
@@ -1890,7 +1896,11 @@ To install NPM VUE CLI in the Workspace container
 
 2 - Search for the `WORKSPACE_INSTALL_NPM_VUE_CLI` argument under the Workspace Container and set it to `true`
 
-3 - Re-build the container `docker-compose build workspace`
+3 - Change `vue serve` port using `WORKSPACE_VUE_CLI_SERVE_HOST_PORT` if you wish to (default value is 8080)
+
+4 - Change `vue ui` port using `WORKSPACE_VUE_CLI_UI_HOST_PORT` if you wish to (default value is 8001)
+
+5 - Re-build the container `docker-compose build workspace`
 
 
 

+ 2 - 0
docker-compose.yml

@@ -150,6 +150,8 @@ services:
         - "dockerhost:${DOCKER_HOST_IP}"
       ports:
         - "${WORKSPACE_SSH_PORT}:22"
+        - "${WORKSPACE_VUE_CLI_SERVE_HOST_PORT}:8080"
+        - "${WORKSPACE_VUE_CLI_UI_HOST_PORT}:8000"
       tty: true
       environment:
         - PHP_IDE_CONFIG=${PHP_IDE_CONFIG}

+ 2 - 0
env-example

@@ -159,6 +159,8 @@ WORKSPACE_INSTALL_FFMPEG=false
 WORKSPACE_INSTALL_GNU_PARALLEL=false
 WORKSPACE_INSTALL_AST=true
 WORKSPACE_AST_VERSION=1.0.3
+WORKSPACE_VUE_CLI_SERVE_HOST_PORT=8080
+WORKSPACE_VUE_CLI_UI_HOST_PORT=8001
 
 ### PHP_FPM ###############################################