-
-
Notifications
You must be signed in to change notification settings - Fork 119
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When running nitric start, the CLI automatically provisions a PostgreSQL container named nitric-{project-name}-local-sql, even when:
- No
sql()resource is used anywhere in the codebase - The
preview: sql-databasesflag is not enabled innitric.yaml
Environment
- Nitric CLI version: 1.61.1
- OS: macOS (Darwin 25.3.0)
- Node/Bun: Bun 1.x
Steps to Reproduce
- Create a project with
nitric.yamlcontaining only basic service configuration:name: my-project services: - match: ./src/apps/*/main.ts start: bun run $SERVICE_PATH type: default
- Ensure no
preview:section exists - Ensure no
sql()imports from@nitric/sdkin any source files - Run
nitric start - Check Docker containers:
docker ps | grep sql
Expected Behavior
No PostgreSQL container should be provisioned since:
- The project doesn't use
sql()resources - The
sql-databasespreview feature is not enabled
Actual Behavior
A container is created:
nitric-my-project-local-sql postgres:17.6
Container details:
- Image:
postgres:17.6 - Environment:
POSTGRES_PASSWORD=localsecret - Auto-remove: true
Impact
- Unnecessary resource consumption (Docker container running)
- Confusion for users who manage their own PostgreSQL separately
Questions
- Is this intentional behavior in recent CLI versions?
- Is there a way to disable automatic SQL container provisioning?
- Should this require explicit opt-in via
preview: sql-databases?
Additional Context
Our project uses a separate PostgreSQL instance via docker-compose with Drizzle ORM. The application connects via DATABASE_URL environment variable, not through Nitric's sql() resource.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working