mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-12 15:26:55 +08:00
fix: align PORT defaults to 8080 for Railway
This commit is contained in:
@@ -33,11 +33,11 @@ COPY railway/start.sh /app/start.sh
|
|||||||
RUN chmod +x /app/start.sh
|
RUN chmod +x /app/start.sh
|
||||||
|
|
||||||
ENV DB_PATH=/app/data/data.db
|
ENV DB_PATH=/app/data/data.db
|
||||||
ENV PORT=3000
|
|
||||||
|
|
||||||
EXPOSE 3000
|
# Railway 会自动设置 PORT 环境变量
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
||||||
CMD wget --no-verbose --tries=1 --spider http://localhost:${PORT:-3000}/health || exit 1
|
CMD wget --no-verbose --tries=1 --spider http://localhost:${PORT:-8080}/health || exit 1
|
||||||
|
|
||||||
CMD ["/app/start.sh"]
|
CMD ["/app/start.sh"]
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# 默认端口
|
# 默认端口(Railway 会设置 PORT=8080)
|
||||||
export PORT=${PORT:-3000}
|
export PORT=${PORT:-8080}
|
||||||
echo "🚀 Starting NOFX on port $PORT..."
|
echo "🚀 Starting NOFX on port $PORT..."
|
||||||
|
|
||||||
# 生成加密密钥(如果没有设置)
|
# 生成加密密钥(如果没有设置)
|
||||||
|
|||||||
Reference in New Issue
Block a user