Site ↗
Documentation sections
Operations · 0.8.1

Environments: interface settings and custom files

Create a runtime profile in Generator UI, save settings, and supplement them manually.

On this page

An environment is a separate application instance with its own database, files, and addresses. For example, local runs on your computer and production on a VPS. You choose the name: --env production refers to a profile named production, rather than enabling a special built-in mode.

Where to configure it

In Generator UI, open Deployment. Enable Docker and Production deployment, then find Deployment environments. Enter domains, data directory, servers, delivery method, and backup here. After Save deployment settings and Generate, the controller receives the prepared settings.

What you change Where
Entities, fields, relationships, and access Generator interface
Settings for a particular instance Deployment → Deployment environments
Individual settings manually deploy/custom/environments/<имя>.json
Service passwords and tokens Separate secrets file outside Git
Running application version deploy/control commands

Save deployment settings saves the project model. Generate creates or updates application files. Neither action runs commands on the VPS.

How settings reach control

For the production profile, the generator creates:

  • deploy/generated/environments/production.json — complete UI settings. Generate updates this file;
  • deploy/custom/environments/production.json — initially {}. Override individual values here; later generation preserves your changes;
  • deploy/custom/environments/README.md — custom file editing rules.

You do not need to copy anything into deploy/environments/ for a new profile. Examples in deploy/generated/examples/ remain reference material rather than a required startup step.

When custom settings are needed

For example, a separate website will call the API alongside the admin interface. Add its address to Allowed HTTPS origins in UI. If a separate manual setting is more convenient, open deploy/custom/environments/production.json and enter:

{
  "allowedOrigins": [
    "https://admin.example.com",
    "https://app.example.com"
  ]
}

This is the complete custom file, not a complete environment configuration. Replace domains with your own. Other settings come from UI. Arrays are replaced entirely, so the example retains the admin address. Nested objects merge by field; a scalar value replaces the original; null removes a field. Arbitrary parameters are not allowed, and custom overrides cannot change project, schemaVersion, or environment.

To discard manual overrides, restore {}. JSON does not support comments; write explanations in the adjacent README. When only custom changes, Generate is unnecessary: control reads the file when a command starts.

File priority and older settings

If deploy/environments/production.json exists, control uses the entire file. UI and custom settings for this name do not apply. This manual mode remains available for managing the complete JSON yourself.

To move from a manual file to UI:

  1. Enter its name in Deployment environments and click Import manual JSON.
  2. Check imported values, save the project, and run Generate.
  3. Move the old deploy/environments/production.json outside that folder, keeping a copy.
  4. Open Preview effective JSON: the source should be Generated or Custom, rather than Manual.

The preview shows the current draft with file overrides. Save settings and run Generate before running commands.

Changes after the first release

Changing settings does not move the database, change the domain automatically, or move to another VPS. Supported changes to delivery, registry, or backup use reconfigure. Data transfer is covered separately.

The image adapter — Local or S3 — is selected for the entire project. A profile sets the directory or S3 parameters, but does not switch adapters independently of other environments. CI provider is also shared across the project.