diff --git a/Dockerfile b/Dockerfile index 4f05a9e..bd62cf4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,10 +15,10 @@ COPY . . # 设置环境变量 ENV HOST=0.0.0.0 -ENV PORT=80 +ENV PORT=3000 # 暴露端口 -EXPOSE 80 +EXPOSE 3000 # 启动项目 CMD ["yarn", "dev"] \ No newline at end of file diff --git a/server.js b/server.js index 9b6702e..a3a131d 100644 --- a/server.js +++ b/server.js @@ -536,7 +536,7 @@ io.on('connection', (socket) => { }); // 启动服务器 -const PORT = process.env.PORT || 80; +const PORT = process.env.PORT || 3000; server.listen(PORT, '0.0.0.0', async () => { console.log(`服务器运行在端口 ${PORT}`); await initializeServer();