version: "3.8" services: # Development mode app-dev: build: context: . target: development ports: - "3000:3000" # Web app - "3001:3001" # Service app volumes: - .:/app - /app/node_modules - ./data:/app/data # Persist database files environment: - NODE_ENV=development # CLI is now the default entrypoint, can be overridden with command # command: pnpm dev # Uncomment to run dev servers instead of CLI stdin_open: true # Keep stdin open for interactive CLI tty: true # Allocate a pseudo-TTY for interactive CLI # Production mode app: build: context: . target: production ports: - "3000:3000" # Web app - "3001:3001" # Service app volumes: - ./data:/app/data # Persist database files only environment: - NODE_ENV=production # Runs all services (web + service) in production by default # Override with command to run CLI: ["node", "apps/cli/dist/index.js"] stdin_open: true # Keep stdin open for CLI if used tty: true # Allocate a pseudo-TTY for CLI if used