Runtime Environments Guide
Shared VPS and DEV environment sources for active Swarm and retained Compose launchers.
The environment tree supplies both active Swarm launchers and retained Compose launchers. Split Swarm stacks may load more than one service-local env file.
Source Of Truth
- VPS layout is the source of truth for folder structure and variable names.
- Non-production environments should copy the same structure and replace only env values.
- Compose files do not change per environment.
Directory Model
runtime/
stacks/
infrastructure/
services/
environments/
dev/
infrastructure/
services/
vps/
infrastructure/
services/File Types
VPS
- Local live runtime values:
runtime/environments/vps/**/.env - Tracked placeholder values:
runtime/environments/vps/**/*{service}.env
The launcher scripts use the local .env file first. If it does not exist, they fall back to the tracked placeholder file.
DEV
- Tracked reusable templates:
runtime/environments/dev/**/*.dev.env
The launcher scripts use these files directly when you run them with dev.
Infrastructure Environment Paths
- Edge:
runtime/environments/vps/infrastructure/edge/traefik/.envruntime/environments/vps/infrastructure/edge/portainer/.envruntime/environments/vps/infrastructure/edge/kener/.env
- Platform:
runtime/environments/vps/infrastructure/platform/.env
- Operations:
runtime/environments/vps/infrastructure/operations/.env
- Registry:
runtime/environments/vps/infrastructure/registry/.env
- Feeds:
runtime/environments/vps/infrastructure/feeds/.env
- Gateway:
runtime/environments/vps/infrastructure/gateway/.env
- NetBird:
runtime/environments/vps/infrastructure/netbird/.env
- Databases:
runtime/environments/vps/infrastructure/databases/{mssql,postgres,mysql,mongodb}/.env
- Object storage:
runtime/environments/vps/infrastructure/object-storage/rustfs/.env
The matching dev templates live under runtime/environments/dev/infrastructure/**.
Service Environment Paths
- Perspective-V core:
runtime/environments/vps/services/perspective-v.com/identity.perspective-v.com/.envruntime/environments/vps/services/perspective-v.com/graph.perspective-v.com/.envruntime/environments/vps/services/perspective-v.com/console.perspective-v.com/.env
- Domain sites:
runtime/environments/vps/services/dbskc.com/dbskc.com/.envruntime/environments/vps/services/nishatcolony.pk/nishatcolony.pk/.envruntime/environments/vps/services/arnexglobal.com/data.arnexglobal.com/.env
- Starter domains:
runtime/environments/vps/services/syassociates.pk/syassociates.pk/syassociates.pk.envplus optional local.envruntime/environments/vps/services/syassociates.pk/service.syassociates.pk/service.syassociates.pk.envplus optional local.env
The matching dev templates live under runtime/environments/dev/services/**.
Swarm DEV Coverage
The role-organized Swarm launchers map each workload to a tracked DEV template,
including the split Perspective-V services and WordPress-backed websites. Run
the matching swarm/scripts/** launcher with config dev before deployment.
Rebuild A New Docker Environment
- Keep the compose files unchanged.
- Start from the matching file under
runtime/environments/dev. - Replace hostnames, passwords, image tags, and bind settings for the new environment.
- Use the launcher scripts in
devmode.
Examples:
./runtime/scripts/infrastructure/edge-traefik.sh show dev
./runtime/scripts/infrastructure/edge-traefik.sh config dev
./runtime/scripts/infrastructure/platform.sh up dev
./runtime/scripts/services/identity.sh up devRecommended Workflow
For the VPS:
cp runtime/environments/vps/infrastructure/platform/platform.env runtime/environments/vps/infrastructure/platform/.env
nano runtime/environments/vps/infrastructure/platform/.env
./runtime/scripts/infrastructure/platform.sh upFor a reproducible non-production host:
nano runtime/environments/dev/infrastructure/platform/platform.dev.env
./runtime/scripts/infrastructure/platform.sh up dev