mirror of
https://github.com/laoxong/nofx.git
synced 2026-06-06 18:58:22 +08:00
fix: align PORT defaults to 8080 for Railway
This commit is contained in:
+3
-3
@@ -33,11 +33,11 @@ COPY railway/start.sh /app/start.sh
|
||||
RUN chmod +x /app/start.sh
|
||||
|
||||
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 \
|
||||
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"]
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# 默认端口
|
||||
export PORT=${PORT:-3000}
|
||||
# 默认端口(Railway 会设置 PORT=8080)
|
||||
export PORT=${PORT:-8080}
|
||||
echo "🚀 Starting NOFX on port $PORT..."
|
||||
|
||||
# 生成加密密钥(如果没有设置)
|
||||
|
||||
Reference in New Issue
Block a user