Files
archy-demo/neode-ui/Dockerfile.backend
2026-03-17 02:14:04 +00:00

26 lines
666 B
Docker

FROM node:22-alpine
WORKDIR /app
# Install runtime dependencies
RUN apk add --no-cache wget curl docker-cli
# Copy package files
COPY neode-ui/package*.json ./
# Install Node dependencies (need all deps for mock backend)
RUN npm install
# Copy application code
COPY neode-ui/ ./
# Expose port
EXPOSE 5959
# Health check
HEALTHCHECK --interval=30s --timeout=15s --retries=5 --start-period=180s \
CMD wget --quiet --tries=1 --spider http://localhost:5959/health || exit 1
# Start the mock backend with error handling
CMD ["sh", "-c", "node mock-backend.js 2>&1 || (echo 'ERROR: Backend failed to start'; cat /app/package.json; ls -la /app; sleep infinity)"]