oramap/backend/Dockerfile
dvirlabs 15b8334f2a
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Add microservices architecture with separate frontend/backend
- Created backend/Dockerfile for Express API server
- Created frontend/Dockerfile with Nginx for static files
- Added nginx.conf to proxy /api/* to backend
- Created docker-compose.microservices.yml for multi-container setup
- Added .dockerignore files for both frontend and backend
- Updated .woodpecker.yaml to fix registry URL and use separate Dockerfiles
- Added CORS support to backend for microservices mode
- Updated README with dual-mode deployment instructions
- Frontend copies to frontend/public/ for Nginx serving
- CI/CD pipeline now builds separate images for frontend and backend
2026-03-24 09:41:51 +02:00

31 lines
620 B
Docker

# Backend Dockerfile for Ora Map
FROM node:20-alpine AS base
# Production stage
FROM base AS production
WORKDIR /app
# Copy package files
COPY package*.json ./
# Install production dependencies
RUN npm install --production
# Copy application files
COPY . .
# Expose port
EXPOSE 3000
# Set environment variables
ENV NODE_ENV=production
ENV PORT=3000
# Health check
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:3000/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"
# Start the application
CMD ["node", "server.js"]