docker-compose.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. version: "3.8"
  2. services:
  3. # Development mode
  4. app-dev:
  5. build:
  6. context: .
  7. target: development
  8. ports:
  9. - "3000:3000" # Web app (API proxied through Next.js)
  10. volumes:
  11. - .:/app
  12. - /app/node_modules
  13. - ./data:/app/data # Persist database files
  14. environment:
  15. - NODE_ENV=development
  16. - API_URL=http://localhost:3001 # Internal API URL for proxy
  17. # CLI is now the default entrypoint, can be overridden with command
  18. # command: pnpm dev # Uncomment to run dev servers instead of CLI
  19. stdin_open: true # Keep stdin open for interactive CLI
  20. tty: true # Allocate a pseudo-TTY for interactive CLI
  21. # Production mode
  22. app:
  23. build:
  24. context: .
  25. target: production
  26. ports:
  27. - "3000:3000" # Web app (API proxied through Next.js)
  28. volumes:
  29. - ./data:/app/data # Persist database files only
  30. environment:
  31. - NODE_ENV=production
  32. - API_URL=http://localhost:3001 # Internal API URL for proxy
  33. # Runs all services (web + service) in production by default
  34. # Override with command to run CLI: ["node", "apps/cli/dist/index.js"]
  35. stdin_open: true # Keep stdin open for CLI if used
  36. tty: true # Allocate a pseudo-TTY for CLI if used