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 # CLI is now the default entrypoint, can be overridden with command # command: pnpm start # Uncomment to run production servers instead of CLI stdin_open: true # Keep stdin open for interactive CLI tty: true # Allocate a pseudo-TTY for interactive CLI