mirror of
https://github.com/QYG2297248353/appstore-1panel.git
synced 2024-11-13 12:36:57 +08:00
feat: 增加 Node.js 版本
This commit is contained in:
parent
7a9e7cea7f
commit
ab48604144
1
apps/node/12.22.12/data.yml
Normal file
1
apps/node/12.22.12/data.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
additionalProperties:
|
23
apps/node/12.22.12/docker-compose.yml
Normal file
23
apps/node/12.22.12/docker-compose.yml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
node:
|
||||||
|
image: node:${NODE_VERSION}
|
||||||
|
container_name: ${CONTAINER_NAME}
|
||||||
|
working_dir: /app
|
||||||
|
volumes:
|
||||||
|
- ${CODE_DIR}:/app
|
||||||
|
- ./run.sh:/run.sh
|
||||||
|
- ./.env:/.env
|
||||||
|
command: bash /run.sh
|
||||||
|
networks:
|
||||||
|
- 1panel-network
|
||||||
|
ports:
|
||||||
|
- ${HOST_IP}:${PANEL_APP_PORT_HTTP}:${NODE_APP_PORT}
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "curl -f http://localhost:${NODE_APP_PORT} || exit 1"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 20
|
||||||
|
networks:
|
||||||
|
1panel-network:
|
||||||
|
external: true
|
27
apps/node/12.22.12/run.sh
Normal file
27
apps/node/12.22.12/run.sh
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source /.env
|
||||||
|
|
||||||
|
if [[ "$PACKAGE_MANAGER" == "npm" ]]; then
|
||||||
|
npm config set registry $CONTAINER_PACKAGE_URL
|
||||||
|
elif [[ "$PACKAGE_MANAGER" == "yarn" ]]; then
|
||||||
|
yarn config set registry $CONTAINER_PACKAGE_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$RUN_INSTALL" -eq "1" ]]; then
|
||||||
|
if [[ "$PACKAGE_MANAGER" == "npm" ]]; then
|
||||||
|
npm install
|
||||||
|
elif [[ "$PACKAGE_MANAGER" == "yarn" ]]; then
|
||||||
|
yarn install
|
||||||
|
else
|
||||||
|
echo "未知的 PACKAGE_MANAGER: $PACKAGE_MANAGER"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [[ "$PACKAGE_MANAGER" == "npm" ]]; then
|
||||||
|
npm run $EXEC_SCRIPT
|
||||||
|
elif [[ "$PACKAGE_MANAGER" == "yarn" ]]; then
|
||||||
|
yarn run $EXEC_SCRIPT
|
||||||
|
fi
|
1
apps/node/14.21.3/data.yml
Normal file
1
apps/node/14.21.3/data.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
additionalProperties:
|
23
apps/node/14.21.3/docker-compose.yml
Normal file
23
apps/node/14.21.3/docker-compose.yml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
node:
|
||||||
|
image: node:${NODE_VERSION}
|
||||||
|
container_name: ${CONTAINER_NAME}
|
||||||
|
working_dir: /app
|
||||||
|
volumes:
|
||||||
|
- ${CODE_DIR}:/app
|
||||||
|
- ./run.sh:/run.sh
|
||||||
|
- ./.env:/.env
|
||||||
|
command: bash /run.sh
|
||||||
|
networks:
|
||||||
|
- 1panel-network
|
||||||
|
ports:
|
||||||
|
- ${HOST_IP}:${PANEL_APP_PORT_HTTP}:${NODE_APP_PORT}
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "curl -f http://localhost:${NODE_APP_PORT} || exit 1"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 20
|
||||||
|
networks:
|
||||||
|
1panel-network:
|
||||||
|
external: true
|
27
apps/node/14.21.3/run.sh
Normal file
27
apps/node/14.21.3/run.sh
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source /.env
|
||||||
|
|
||||||
|
if [[ "$PACKAGE_MANAGER" == "npm" ]]; then
|
||||||
|
npm config set registry $CONTAINER_PACKAGE_URL
|
||||||
|
elif [[ "$PACKAGE_MANAGER" == "yarn" ]]; then
|
||||||
|
yarn config set registry $CONTAINER_PACKAGE_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$RUN_INSTALL" -eq "1" ]]; then
|
||||||
|
if [[ "$PACKAGE_MANAGER" == "npm" ]]; then
|
||||||
|
npm install
|
||||||
|
elif [[ "$PACKAGE_MANAGER" == "yarn" ]]; then
|
||||||
|
yarn install
|
||||||
|
else
|
||||||
|
echo "未知的 PACKAGE_MANAGER: $PACKAGE_MANAGER"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [[ "$PACKAGE_MANAGER" == "npm" ]]; then
|
||||||
|
npm run $EXEC_SCRIPT
|
||||||
|
elif [[ "$PACKAGE_MANAGER" == "yarn" ]]; then
|
||||||
|
yarn run $EXEC_SCRIPT
|
||||||
|
fi
|
1
apps/node/16.20.2/data.yml
Normal file
1
apps/node/16.20.2/data.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
additionalProperties:
|
23
apps/node/16.20.2/docker-compose.yml
Normal file
23
apps/node/16.20.2/docker-compose.yml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
node:
|
||||||
|
image: node:${NODE_VERSION}
|
||||||
|
container_name: ${CONTAINER_NAME}
|
||||||
|
working_dir: /app
|
||||||
|
volumes:
|
||||||
|
- ${CODE_DIR}:/app
|
||||||
|
- ./run.sh:/run.sh
|
||||||
|
- ./.env:/.env
|
||||||
|
command: bash /run.sh
|
||||||
|
networks:
|
||||||
|
- 1panel-network
|
||||||
|
ports:
|
||||||
|
- ${HOST_IP}:${PANEL_APP_PORT_HTTP}:${NODE_APP_PORT}
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "curl -f http://localhost:${NODE_APP_PORT} || exit 1"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 20
|
||||||
|
networks:
|
||||||
|
1panel-network:
|
||||||
|
external: true
|
27
apps/node/16.20.2/run.sh
Normal file
27
apps/node/16.20.2/run.sh
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source /.env
|
||||||
|
|
||||||
|
if [[ "$PACKAGE_MANAGER" == "npm" ]]; then
|
||||||
|
npm config set registry $CONTAINER_PACKAGE_URL
|
||||||
|
elif [[ "$PACKAGE_MANAGER" == "yarn" ]]; then
|
||||||
|
yarn config set registry $CONTAINER_PACKAGE_URL
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$RUN_INSTALL" -eq "1" ]]; then
|
||||||
|
if [[ "$PACKAGE_MANAGER" == "npm" ]]; then
|
||||||
|
npm install
|
||||||
|
elif [[ "$PACKAGE_MANAGER" == "yarn" ]]; then
|
||||||
|
yarn install
|
||||||
|
else
|
||||||
|
echo "未知的 PACKAGE_MANAGER: $PACKAGE_MANAGER"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [[ "$PACKAGE_MANAGER" == "npm" ]]; then
|
||||||
|
npm run $EXEC_SCRIPT
|
||||||
|
elif [[ "$PACKAGE_MANAGER" == "yarn" ]]; then
|
||||||
|
yarn run $EXEC_SCRIPT
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user