move devs to client & server.

This commit is contained in:
Miroslav Šedivý
2024-09-08 11:52:47 +02:00
parent b617c5cc32
commit 3d7be663ec
10 changed files with 63 additions and 113 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
cd "$(dirname "$0")"
# start component watch
docker run --rm -it \
--user "$(id -u):$(id -g)" \
--volume "${PWD}/../:/app" \
--entrypoint="npm" \
--workdir="/app" \
node:18-bullseye-slim run build
+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
cd "$(dirname "$0")"
# start component watch
docker run --rm -it \
--user "$(id -u):$(id -g)" \
--volume "${PWD}/../:/app" \
--entrypoint="/bin/bash" \
--workdir="/app" \
node:18-bullseye-slim
Executable
+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
cd "$(dirname "$0")"
# npm
docker run --rm -it \
--user "$(id -u):$(id -g)" \
--volume "${PWD}/../:/app" \
--entrypoint="npm" \
--workdir="/app" \
node:18-bullseye-slim "$@"
+27
View File
@@ -0,0 +1,27 @@
#!/bin/bash
cd "$(dirname "$0")"
if [ -z $VUE_APP_SERVER_PORT ]; then
VUE_APP_SERVER_PORT="3000"
fi
echo "Using VUE_APP_SERVER_PORT: ${VUE_APP_SERVER_PORT}"
# use -i to install
if [ ! -d "${PWD}/../node_modules" ] || [ "$1" == "-i" ]; then
docker run --rm -it \
--volume "${PWD}/../:/app" \
--workdir="/app" \
--entrypoint="npm" \
node:18-bullseye-slim install
fi
# npm run serve
docker run --rm -it \
-p 3001:3001 \
-e "VUE_APP_SERVER_PORT=$VUE_APP_SERVER_PORT" \
--user "$(id -u):$(id -g)" \
--volume "${PWD}/../:/app" \
--entrypoint="npm" \
--workdir="/app" \
node:18-bullseye-slim run serve -- --port 3001