oramap/docker-compose.microservices.yml
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

49 lines
1.1 KiB
YAML

version: '3.8'
services:
# Backend API Service
backend:
build:
context: ./backend
dockerfile: Dockerfile
image: oramap-backend:latest
container_name: oramap-backend
environment:
- NODE_ENV=production
- PORT=3000
restart: unless-stopped
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
networks:
- oramap-network
# Frontend Nginx Service
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
image: oramap-frontend:latest
container_name: oramap-frontend
ports:
- "80:80"
depends_on:
backend:
condition: service_healthy
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
networks:
- oramap-network
networks:
oramap-network:
driver: bridge