File tree Expand file tree Collapse file tree 9 files changed +153
-0
lines changed Expand file tree Collapse file tree 9 files changed +153
-0
lines changed Original file line number Diff line number Diff line change 1+ additionalProperties:
Original file line number Diff line number Diff line change 1+ version : ' 3'
2+ services :
3+ node :
4+ image : node:${NODE_VERSION}
5+ container_name : ${CONTAINER_NAME}
6+ working_dir : /app
7+ volumes :
8+ - ${CODE_DIR}:/app
9+ - ./run.sh:/run.sh
10+ - ./.env:/.env
11+ command : bash /run.sh
12+ networks :
13+ - 1panel-network
14+ ports :
15+ - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:${NODE_APP_PORT}
16+ healthcheck :
17+ test : ["CMD-SHELL", "curl -f http://localhost:${NODE_APP_PORT} || exit 1"]
18+ interval : 30s
19+ timeout : 5s
20+ retries : 20
21+ networks :
22+ 1panel-network :
23+ external : true
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ source /.env
4+
5+ if [[ " $PACKAGE_MANAGER " == " npm" ]]; then
6+ npm config set registry $CONTAINER_PACKAGE_URL
7+ elif [[ " $PACKAGE_MANAGER " == " yarn" ]]; then
8+ yarn config set registry $CONTAINER_PACKAGE_URL
9+ fi
10+
11+ if [[ " $RUN_INSTALL " -eq " 1" ]]; then
12+ if [[ " $PACKAGE_MANAGER " == " npm" ]]; then
13+ npm install
14+ elif [[ " $PACKAGE_MANAGER " == " yarn" ]]; then
15+ yarn install
16+ else
17+ echo " 未知的 PACKAGE_MANAGER: $PACKAGE_MANAGER "
18+ exit 1
19+ fi
20+ fi
21+
22+
23+ if [[ " $PACKAGE_MANAGER " == " npm" ]]; then
24+ npm run $EXEC_SCRIPT
25+ elif [[ " $PACKAGE_MANAGER " == " yarn" ]]; then
26+ yarn run $EXEC_SCRIPT
27+ fi
Original file line number Diff line number Diff line change 1+ additionalProperties:
Original file line number Diff line number Diff line change 1+ version : ' 3'
2+ services :
3+ node :
4+ image : node:${NODE_VERSION}
5+ container_name : ${CONTAINER_NAME}
6+ working_dir : /app
7+ volumes :
8+ - ${CODE_DIR}:/app
9+ - ./run.sh:/run.sh
10+ - ./.env:/.env
11+ command : bash /run.sh
12+ networks :
13+ - 1panel-network
14+ ports :
15+ - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:${NODE_APP_PORT}
16+ healthcheck :
17+ test : ["CMD-SHELL", "curl -f http://localhost:${NODE_APP_PORT} || exit 1"]
18+ interval : 30s
19+ timeout : 5s
20+ retries : 20
21+ networks :
22+ 1panel-network :
23+ external : true
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ source /.env
4+
5+ if [[ " $PACKAGE_MANAGER " == " npm" ]]; then
6+ npm config set registry $CONTAINER_PACKAGE_URL
7+ elif [[ " $PACKAGE_MANAGER " == " yarn" ]]; then
8+ yarn config set registry $CONTAINER_PACKAGE_URL
9+ fi
10+
11+ if [[ " $RUN_INSTALL " -eq " 1" ]]; then
12+ if [[ " $PACKAGE_MANAGER " == " npm" ]]; then
13+ npm install
14+ elif [[ " $PACKAGE_MANAGER " == " yarn" ]]; then
15+ yarn install
16+ else
17+ echo " 未知的 PACKAGE_MANAGER: $PACKAGE_MANAGER "
18+ exit 1
19+ fi
20+ fi
21+
22+
23+ if [[ " $PACKAGE_MANAGER " == " npm" ]]; then
24+ npm run $EXEC_SCRIPT
25+ elif [[ " $PACKAGE_MANAGER " == " yarn" ]]; then
26+ yarn run $EXEC_SCRIPT
27+ fi
Original file line number Diff line number Diff line change 1+ additionalProperties:
Original file line number Diff line number Diff line change 1+ version : ' 3'
2+ services :
3+ node :
4+ image : node:${NODE_VERSION}
5+ container_name : ${CONTAINER_NAME}
6+ working_dir : /app
7+ volumes :
8+ - ${CODE_DIR}:/app
9+ - ./run.sh:/run.sh
10+ - ./.env:/.env
11+ command : bash /run.sh
12+ networks :
13+ - 1panel-network
14+ ports :
15+ - ${HOST_IP}:${PANEL_APP_PORT_HTTP}:${NODE_APP_PORT}
16+ healthcheck :
17+ test : ["CMD-SHELL", "curl -f http://localhost:${NODE_APP_PORT} || exit 1"]
18+ interval : 30s
19+ timeout : 5s
20+ retries : 20
21+ networks :
22+ 1panel-network :
23+ external : true
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ source /.env
4+
5+ if [[ " $PACKAGE_MANAGER " == " npm" ]]; then
6+ npm config set registry $CONTAINER_PACKAGE_URL
7+ elif [[ " $PACKAGE_MANAGER " == " yarn" ]]; then
8+ yarn config set registry $CONTAINER_PACKAGE_URL
9+ fi
10+
11+ if [[ " $RUN_INSTALL " -eq " 1" ]]; then
12+ if [[ " $PACKAGE_MANAGER " == " npm" ]]; then
13+ npm install
14+ elif [[ " $PACKAGE_MANAGER " == " yarn" ]]; then
15+ yarn install
16+ else
17+ echo " 未知的 PACKAGE_MANAGER: $PACKAGE_MANAGER "
18+ exit 1
19+ fi
20+ fi
21+
22+
23+ if [[ " $PACKAGE_MANAGER " == " npm" ]]; then
24+ npm run $EXEC_SCRIPT
25+ elif [[ " $PACKAGE_MANAGER " == " yarn" ]]; then
26+ yarn run $EXEC_SCRIPT
27+ fi
You can’t perform that action at this time.
0 commit comments