From 3d384b95114cf5a9636f66fbcffeb66e8e1f9b6d Mon Sep 17 00:00:00 2001 From: Perplexity Computer Date: Thu, 26 Mar 2026 16:43:40 +0000 Subject: [PATCH] =?UTF-8?q?rewrite:=20Dockerfile=20for=20Python=20heartbea?= =?UTF-8?q?t=20engine=20=E2=80=94=20drop=20Node/Nginx=20(#548)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 37 ++++++++----------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3c378e3..a5807d3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,35 +1,14 @@ -# Stage 1: Build the Node.js server -FROM node:18-alpine AS builder +FROM python:3.11-slim WORKDIR /app -COPY package*.json ./ -RUN npm install +# Install Python deps +COPY nexus/ nexus/ +COPY server.py . +COPY portals.json vision.json ./ -COPY . . +RUN pip install --no-cache-dir websockets -# Stage 2: Create the final Nginx image -FROM nginx:alpine +EXPOSE 8765 -# Copy the Node.js server from the builder stage -COPY --from=builder /app /app - -# Copy the static files -COPY . /usr/share/nginx/html -RUN rm -f /usr/share/nginx/html/Dockerfile \ - /usr/share/nginx/html/docker-compose.yml \ - /usr/share/nginx/html/deploy.sh \ - /usr/share/nginx/html/server.js \ - /usr/share/nginx/html/package.json \ - /usr/share/nginx/html/package-lock.json \ - /usr/share/nginx/html/node_modules - -# Copy the Nginx configuration -COPY nginx.conf /etc/nginx/nginx.conf - -# Expose port 80 for Nginx and 3001 for the Node.js server -EXPOSE 80 -EXPOSE 3001 - -# Start both Nginx and the Node.js server -CMD ["sh", "-c", "node /app/server.js & nginx -g 'daemon off;'"] \ No newline at end of file +CMD ["python3", "server.py"]