version: "3.8"
services:
  server:
    build:
      context: .
      dockerfile: Dockerfile.server
    env_file:
      - .env
      - apps/server/.env
    volumes:
      - ./data:/app/data
    expose:
      - "3000"

  web:
    build:
      context: .
      dockerfile: Dockerfile.web
    env_file:
      - .env
      - apps/web/.env
    expose:
      - "4173"   # preview server

  nginx:
    image: nginx:stable-alpine
    volumes:
      - ./nginx/default.conf:/etc/nginx/conf.d/default.conf:ro
    ports:
      - "8080:80"
    depends_on:
      - server
      - web
