From 0b5be9a97d72b404fae4ca76a2b4a08ce6289bb8 Mon Sep 17 00:00:00 2001 From: chenc <1458513@qq.com> Date: Wed, 8 Nov 2023 09:32:57 +0800 Subject: [PATCH] add --- docker-compose.yaml.example | 3 ++- nodejs/entrypoint.sh | 3 +-- nodejs/run-script.sh | 2 ++ www/run-script.sh | 4 ++++ 4 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 nodejs/run-script.sh create mode 100644 www/run-script.sh diff --git a/docker-compose.yaml.example b/docker-compose.yaml.example index 258f640..10ce264 100644 --- a/docker-compose.yaml.example +++ b/docker-compose.yaml.example @@ -14,13 +14,14 @@ networks: services: nodejs: - image: ${IMAGE_BASE}/nodejs:18.17.0 + image: ${IMAGE_BASE}/nodejs:18.18.2 container_name: nodejs environment: - PACKAGE_PATH=${PACKAGE_PATH} volumes: - "${WWWROOT_PATH}:/data/wwwroot" working_dir: /data/wwwroot/ + privileged: true networks: aix-docker-cc: ipv4_address: ${NET_SUBNET:-10.12.25}.200 diff --git a/nodejs/entrypoint.sh b/nodejs/entrypoint.sh index b72bf2c..2394d28 100644 --- a/nodejs/entrypoint.sh +++ b/nodejs/entrypoint.sh @@ -1,3 +1,2 @@ #!/bin/bash -npm install -npm run production +cnpm -v diff --git a/nodejs/run-script.sh b/nodejs/run-script.sh new file mode 100644 index 0000000..e756f38 --- /dev/null +++ b/nodejs/run-script.sh @@ -0,0 +1,2 @@ +#!/bin/bash +pwd \ No newline at end of file diff --git a/www/run-script.sh b/www/run-script.sh new file mode 100644 index 0000000..5b33d92 --- /dev/null +++ b/www/run-script.sh @@ -0,0 +1,4 @@ +#!/bin/bash +cd /data/wwwroot/项目 +npm install +npm run build \ No newline at end of file