You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

48 lines
1.1 KiB

version: '3.8'
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: just-demo-backend
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
- JWT_SECRET=${JWT_SECRET:-your-secret-key-please-change}
- FRONTEND_URL=${FRONTEND_URL:-http://localhost:5500}
- UPLOAD_DIR=uploads
volumes:
- ./backend/database:/app/database
- ./backend/uploads:/app/uploads
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: just-demo-frontend
ports:
- "5500:5500"
depends_on:
- backend
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:5500"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
networks:
default:
name: just-demo-network