Skip to main content

Development vs production

The env file name is the mode — do not put GRID_APP_ENV inside the file.

ModeCommandEnv file
Developmentnpm run dev.env.development only
Productionnpm start / npm run prod / npm run build.env only

The two files are never mixed. There is no override flag for production.

Who owns the hard production gate?​

PackageHard gate?Notes
grid-coreYesAPI boot refuses incomplete production .env / injected env — including HTTPS GitOps without username + host token + expiry (“Without any token, I’m not moving forward.”). SSH remotes OK with host deploy keys.
grid-uiYesnpm run build / prod requires .env + VITE_GRID_API_URL
install / ComposeYescheck-env.sh + compose-up.sh; Compose is production-only
grid-cliNoAdd-on: Core validates then injects env via cliChildEnv(). npm run build is compile-only. Generate still errors if remote state vars are incomplete.

Local development: npm run dev + .env.development.

Released module bank: https://github.com/gridplatform/grid-terraform.git @ v0.1.0.

See Remote_State.

Compose (production only)​

cp install/.env.example install/.env # fill every required value
bash install/compose-up.sh # check-env.sh then docker compose up
bash install/compose-up.sh release # GHCR images

No development Compose profile and no skip flags.

Where generated Terraform lives​

UnitPath
Normal units<GRID_CONFIG_ROOT>/archive/projects/<app>/<cloud>/<env>/<type>/<name>/
Fallback onlyGRID_WORK_DIR/<infra-id>/generated/