In prod-local, the backend, admin interface, and PostgreSQL run in Docker. The interface and API are available over HTTPS. This is a separate environment with its own database and images.
The example names the environment local. Run commands from the generated project root.
1. Prepare tools and files
You need Bash, jq, and running Docker with Compose and Buildx. Docker client and server must support API 1.49+ and image inspect --platform; enable containerd image store for local images.
Open Deployment in Generator UI and enable Docker and Production deployment. CI provider can remain None. Save and run Generate.
2. Create a local profile in UI
In Deployment → Deployment environments, enter New profile name: local, select Local production (Docker), and click Add profile.
Keep domains admin.local.test and api.local.test, and ports 8443 and 9443 if free. Allowed HTTPS origins must contain https://admin.local.test:8443. Runtime directory, local media directory, and local backup directory are calculated from the project folder: no manual absolute paths are needed. Prod-local backups remain local.
If the project uses S3, fill in its profile parameters following S3 setup. The storage adapter is shared across the project.
Click Save deployment settings, then Generate. The profile appears in deploy/generated/environments/local.json; leave the empty deploy/custom/environments/local.json unchanged for now. You do not need to copy an example into deploy/environments/. If local.json already exists there, import it into UI and remove the manual file after saving and generation: otherwise it continues to override the profile.
3. Add local addresses
Add a line to the OS hosts file. On macOS/Linux it is /etc/hosts; editing requires administrator permissions:
127.0.0.1 admin.local.test api.local.test
Free ports 8443 and 9443 if another application uses them.
4. Prepare and start the environment
Run commands in order, waiting for each to finish successfully:
bash ./deploy/control provision --env local
bash ./deploy/control up --env local
bash ./deploy/control status --env local --json
provision builds images and creates directories, keys, and local certificates. up applies migrations and starts the application. status shows the current release and component readiness.
If a command fails, investigate it using operation recovery. Do not delete deploy/.state/local: it contains environment data.
5. Open the interface
The admin interface address is https://admin.local.test:8443; the API is https://api.local.test:9443.
Add deploy/.state/local/pki/ui-ca.crt to trusted certificates in your OS or browser. This is the local certificate authority's public certificate; do not import the private key. Without trust configuration, the browser displays a certificate warning.
6. Create the first superadministrator
List running container names:
docker ps --format 'table {{.Names}}\t{{.Status}}'
Find the backend for the local environment specifically: its name usually contains the project name, local, and backend. Copy its name and substitute it for ИМЯ_КОНТЕЙНЕРА:
docker exec -it ИМЯ_КОНТЕЙНЕРА admin bootstrap-superadmin --if-needed --login owner
Enter and repeat a password of 12–128 UTF-8 bytes. Input is hidden. If an active superadministrator already exists, the command creates nothing. Sign in with this account: the Generator UI account does not apply here.
Stopping and restarting
bash ./deploy/control down --env local
bash ./deploy/control up --env local
Stopping preserves the database, images, and history. up starts the recorded version rather than building changed source code.
Open logs with:
bash ./deploy/control logs --env local --service backend
frontend and postgres are also available instead of backend.
Updating
After changing the model, run Generate, then build and apply a new version:
bash ./deploy/control build --env local --output local-release-02.json
bash ./deploy/control deploy --env local --release local-release-02.json --confirm local
The build command creates local-release-02.json. Do not write it manually; choose a new name for the next build. See application update.