Documentation navigation
Anybuild documentation

Environment Variables

Override provider configuration and layer runtime environment files predictably.

Provider overrides

Provider fields map to uppercase ANYBUILD_* names.

Terminal
ANYBUILD_NODE_VERSION=22 anybuild . --startANYBUILD_PYTHON_VERSION=3.12 anybuild . --startANYBUILD_STATIC_DIR=dist anybuild . --start

The legacy SHIPIT_* form is consulted only when the matching ANYBUILD_* variable is absent.

JSON patch

Terminal
anybuild build . --config '{"phpix":true,"php_version":"8.3.29"}'

.env layering

During build, Anybuild adds dotenv values to the serve environment in this order; later files override earlier values.

  1. Environment declared by the evaluated Serve.
  2. Workspace root .env.
  3. Workspace root .env.<name> when --env-name is set.
  4. Application subdirectory .env.
  5. Application subdirectory .env.<name>.

PORT

--serve-port takes precedence over process PORT. The default is 8080. References to $PORT in start and after-deploy commands are resolved for the active runner.