Files
DevSecOps-Lab/docker-compose.yml
dev-1 74f4364fd4
Some checks failed
DevSecOps-Multibranch/pipeline/head There was a failure building this commit
Push main branch code to Dev branch
2025-11-30 15:28:57 +05:30

46 lines
956 B
YAML

version: '3.8'
services:
# Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: todo-backend
restart: unless-stopped
environment:
NODE_ENV: production
PORT: 3001
ports:
- "3001:3001"
networks:
- todo-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3001/health"]
interval: 30s
timeout: 10s
retries: 3
# Frontend React App
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: todo-frontend
restart: unless-stopped
ports:
- "80:80"
depends_on:
- backend
networks:
- todo-network
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:80/health"]
interval: 30s
timeout: 10s
retries: 3
networks:
todo-network:
driver: bridge