Files
home-service/docker-compose.yml

34 lines
735 B
YAML

services:
backend:
build:
context: .
dockerfile: backend/Dockerfile
ports:
- "3000:3000"
environment:
- PORT=3000
- CORS_ORIGIN=http://localhost:3001
- DATABASE_PATH=/data/home-service.db
volumes:
- backend-data:/data
restart: unless-stopped
frontend:
build:
context: .
dockerfile: frontend/Dockerfile
args:
# Client-side API URL (public, goes to browser)
NEXT_PUBLIC_API_URL: http://localhost:3000
ports:
- "3001:3001"
environment:
# Server-side API URL (for SSR, inside Docker network)
- API_URL=http://backend:3000
depends_on:
- backend
restart: unless-stopped
volumes:
backend-data: