TruthGate uses two Compose files for development:
compose.yaml
compose.dev.yaml
They are passed in that order:
docker compose \
-f compose.yaml \
-f compose.dev.yaml \
up --buildcompose.yaml defines the production service:
- production build target;
- stable image;
- ports;
- persistent paths;
- environment;
- security options;
- health check.
compose.dev.yaml merges into that service and changes development-specific behavior:
- development build target;
developmentcommand;- no restart policy;
- writable root filesystem;
- repository mounted at
/workspace; dotnet watch;- NuGet cache volumes;
- HTTP portal on host
8080; - development environment names.
The override uses Compose !override where a list must replace rather than append to the production list.
Add a new production requirement to compose.yaml.
Examples:
- new persistent mount;
- new required environment variable;
- new production port;
- new health-check dependency;
- new container capability.
Add only the development difference to compose.dev.yaml.
A development-only addition that never reaches compose.yaml is easy to forget when opening a PR and can create a feature that works only on a developer machine.
docker compose -f compose.yaml configdocker compose \
-f compose.yaml \
-f compose.dev.yaml \
configReview the merged result when changing ports, lists, volumes, or security settings.
docker compose \
-f compose.yaml \
-f compose.dev.yaml \
downDo not add -v unless deleting the development volumes and data is intentional.