Compose files and files on disk

The DataMind Installer owns a small set of files on the host. Knowing which ones it rewrites — and which one it never touches — decides where your local edits survive an update and where they do not.

There are two compose projects. The installer's own compose file starts the installer itself; the deployed stack's compose file describes the DataMind OS services the installer deploys. They are separate files, in separate directories, and they are overwritten at different times.

Files the installer writes

Host path (relative to the install directory)Written byRewritten by an update?Safe for local edits?
docker-compose.ymlThe published installer compose, downloaded from blob storageYes — replaced by self-update; the previous copy is kept as docker-compose.yml.pre-updateNo — local edits are lost (the backup is your only copy)
.envThe operator, copied from .env.exampleNo — the operator's file is left in placeYes — this is the installer's own environment; see Environment variables
deployment/docker-compose.ymlDownloaded from blob storage on every deploy and on boot-time restoreYes — replaced on every deployNo
deployment/.env.unified.templateDownloaded from blob storage (the published schema)Yes — replaced on every deployNo
deployment/.envGenerated from the installer's stored configurationYes — rewritten on every generationNo — edit values in the UI, not in this file
deployment/docker-compose.override.ymlThe operatorNo — the installer never writes or deletes it; it is merged into compose commands only when presentYes — this is the supported place for local compose changes

Everything above deployment/ belongs to the installer; everything inside deployment/ belongs to the deployed stack.

The installer's own compose file

The installer runs as a compose project whose compose file is published to blob storage on every push to the main branch, so it is the canonical copy of the file that runs the installer itself. During a self-update the helper container:

  1. backs the current compose file up to docker-compose.yml.pre-update;
  2. installs the newly downloaded compose over it;
  3. brings the backend service up on the new image, waiting on its healthcheck;
  4. if that fails, restores the backup and brings the service up on the pre-update image.
Warning

Any local edit to the installer's own docker-compose.yml is overwritten by the next update. The backup at docker-compose.yml.pre-update is the only surviving copy. If you need to add services or change mounts, do it in the deployed stack's override file, not in either compose file the installer overwrites.

The installer's own .env is never rewritten by an update, so values you set there persist.

The deployed stack's files

Inside deployment/ the installer manages three files:

The override file is the deliberate exception: the installer merges deployment/docker-compose.override.yml into its compose commands when it exists, but it never creates, modifies or removes it. Put local compose changes — extra volumes, resource tweaks, additional ports — there.

If any of the three managed files is missing at boot, the installer restores it: the compose file and the template are re-downloaded, and .env is regenerated. Restoration is skipped until the Azure client secret has been set, because the downloads authenticate with it.

Files left behind by a self-update

Beyond the compose backup, a self-update leaves two artefacts on the host:

PathPurpose
docker-compose.yml.pre-updateThe compose file as it was before the switch; used for the automated one-shot rollback
.self-update-status (in the compose project's working directory)A one-word breadcrumb written by the updater helper — ok, rolled-back or failed — for a human reading the host. The installer does not read it back; it reconciles the outcome by comparing image digests instead

The updater also stages the newly downloaded compose file under the temp directory (/var/tmp/delamain/self-update/docker-compose.yml in the default setup). That directory is bind-mounted at the same path on host and container deliberately: it is the one place the backend can hand a file to the helper container.

Note

The self-update rollback is deliberately a single attempt with no retry loop and no down-migrations. If both the switch and the rollback fail, the helper stops and prints the manual recovery commands; its log remains available with docker logs delamain-self-updater.

Files left behind by a host migration

The host-migration path writes a few files as side effects of retiring the old bare-metal platform. They are the migration script itself, copied to the configured MIGRATE_HOST_SCRIPT_PATH (/opt/delamain/migrate-host.sh by default); a timestamped log under /var/log; backups of any systemd unit files it moved aside, under /root/disabled-units by default; and a timestamped backup of /etc/exports before it removes the old export lines. The migration runbook covers these; they are listed here only so the file inventory is complete.