发布应用 Lucky

This commit is contained in:
ms
2025-12-09 10:42:46 +08:00
parent d1a719448f
commit 13cc5c8cdc
2 changed files with 22 additions and 0 deletions
+2
View File
@@ -16,6 +16,8 @@ services:
- ${GLOBAL_ENV_FILE:-/etc/1panel/envs/global.env}
- ${ENV_FILE:-/etc/1panel/envs/default.env}
volumes:
- ./run/start.sh:/goodluck/start.sh:ro
- ${LUCKY_ROOT_PATH}/data:/goodluck
environment:
- TZ=Asia/Shanghai
entrypoint: [ "/goodluck/start.sh" ]
+20
View File
@@ -0,0 +1,20 @@
#!/bin/sh
PORT=16601
/app/lucky -c /goodluck/lucky.conf -runInDocker &
MAIN_PID=$!
echo "Lucky main started with PID $MAIN_PID"
echo "Waiting for lucky to listen on port ${PORT}..."
while ! nc -z 127.0.0.1 "${PORT}" 2>/dev/null; do
sleep 1
done
echo "Lucky port ${PORT} is up"
echo "Running: /app/lucky -rSetHttpAdminPort=${PANEL_APP_PORT_HTTP}"
/app/lucky -rSetHttpAdminPort="${PANEL_APP_PORT_HTTP}"
wait $MAIN_PID