Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
- 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
49 lines
1.1 KiB
YAML
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
|