Files
PinchChat/Dockerfile
shiyue a03e8db621
Some checks failed
CI / build (20) (push) Has been cancelled
CI / build (22) (push) Has been cancelled
CI / notify-failure (push) Has been cancelled
Docker / build-and-push (push) Has been cancelled
feat: support cross-origin WebSocket proxy for remote gateway
- Add nginx /gwproxy/ reverse proxy with correct Origin header
- Auto-detect cross-origin gateway URL in GatewayClient.connect()
- Detect path-based proxy deployment in LoginScreen getInitialUrl()
- Change nginx/Docker to listen on port 3000, use host network mode
2026-03-14 13:22:24 +08:00

17 lines
446 B
Docker

# Stage 1: Build
FROM node:22-alpine AS build
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
# Stage 2: Serve
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget -qO /dev/null http://localhost:3000/ || exit 1
CMD ["nginx", "-g", "daemon off;"]