dev use app path inside docker as well.

This commit is contained in:
Miroslav Šedivý 2024-03-17 13:12:22 +01:00
parent e0366905ad
commit 5ebfb043f8
4 changed files with 16 additions and 8 deletions

View File

@ -1,10 +1,12 @@
#!/bin/sh
cd "$(dirname "$0")"
APP_PATH="$(realpath ../)"
# start component watch
docker run --rm -it \
--user "$(id -u):$(id -g)" \
--volume "${PWD}/../:/app" \
--volume "$APP_PATH:$APP_PATH" \
--entrypoint="npm" \
--workdir="/app" \
--workdir="$APP_PATH" \
node:18-buster-slim run build

View File

@ -1,10 +1,12 @@
#!/bin/sh
cd "$(dirname "$0")"
APP_PATH="$(realpath ../)"
# start component watch
docker run --rm -it \
--user "$(id -u):$(id -g)" \
--volume "${PWD}/../:/app" \
--volume "$APP_PATH:$APP_PATH" \
--entrypoint="/bin/bash" \
--workdir="/app" \
--workdir="$APP_PATH" \
node:18-buster-slim

View File

@ -1,10 +1,12 @@
#!/bin/sh
cd "$(dirname "$0")"
APP_PATH="$(realpath ../)"
# npm
docker run --rm -it \
--user "$(id -u):$(id -g)" \
--volume "${PWD}/../:/app" \
--volume "$APP_PATH:$APP_PATH" \
--entrypoint="npm" \
--workdir="/app" \
--workdir="$APP_PATH" \
node:18-buster-slim "$@"

View File

@ -21,6 +21,8 @@ fi
echo "Using app port: ${NEKO_PORT}"
echo "Using IP address: ${NEKO_HOST}"
APP_PATH="$(realpath ../)"
# npm run serve
docker run --rm -it \
-p 3001:3001 \
@ -28,7 +30,7 @@ docker run --rm -it \
-e "NEKO_PORT=$NEKO_PORT" \
-e "VUE_APP_LOG_COLOR=true" \
--user "$(id -u):$(id -g)" \
--volume "${PWD}/../:/app" \
--volume "$APP_PATH:$APP_PATH" \
--entrypoint="npm" \
--workdir="/app" \
--workdir="$APP_PATH" \
node:18-buster-slim run dev -- --port 3001 --host