用了socket.io官方模板,一直重连中。
模板:
https://github.com/socketio/socket.io/tree/main/examples/chat
Dockerfile:
FROM node:16-alpine
WORKDIR /app
COPY . /app
RUN yarn config set registry https://mirrors.cloud.tencent.com/npm/
RUN yarn install --frozen-lockfile
ENV PORT 80
EXPOSE 80
CMD ["node", "index.js"]
大佬最后怎么解决的呢?