Add Dockerfile for Node.js backend setup

This commit is contained in:
MayaTheShy
2026-03-21 16:42:14 -04:00
parent 8f0072dedf
commit 953e8aba99

17
web/server/Dockerfile Normal file
View File

@@ -0,0 +1,17 @@
# Node.js backend
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install --omit=dev
COPY . .
EXPOSE 3001
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:3001/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
CMD ["node", "server.js"]