DC_prefix: Use for docker-compose-only variables (not passed to containers)DC_MONGODB_PORT,DC_CURRENTS_IMAGE_TAG,DC_REDIS_VOLUME
- No prefix: For app config variables that containers need
MONGODB_PASSWORD,APP_BASE_URL,CLICKHOUSE_CURRENTS_PASSWORD
- Default database ports to localhost-only:
${DC_MONGODB_PORT:-127.0.0.1:27017}:27017 - Default application ports to all interfaces:
${DC_API_PORT:-4000}:4000 - Don't use
expose:- it has no functional effect
- Currents services: Use repository + tag pattern
image: ${DC_CURRENTS_IMAGE_REPOSITORY:-currents-}api:${DC_CURRENTS_IMAGE_TAG:-dev}
- Infrastructure services: Use full image reference
image: ${DC_MONGODB_IMAGE:-mongo:8.2.3}
- Use key-value format instead of array format for
environment:sections - makes files more extensible and easier to merge:Not:environment: KEY: value ANOTHER_KEY: ${VAR}
environment: - KEY=value(array format)
- Use
commandinstead ofentrypointwhen you want to keep the default Docker entrypoint behavior - For multi-line scripts in YAML, use array format with block scalar to avoid parsing issues with colons:
post_start: - command: - bash - -c - | echo "script here"
- Replica sets + auth require keyFile - even single-node replica sets
- Change streams require replica sets - can't use standalone MongoDB
- Connection strings need
authSource=adminfor root users created byMONGO_INITDB_ROOT_* - Use localhost exception for initial user creation when auth is enabled
- Never default passwords - require them to be set, generate in setup.sh
- Keep credentials out of healthcheck commands - they show in
docker inspect - Use variable interpolation for derived URLs:
API_URL=${APP_BASE_URL}/v1
- Templates live in
on-prem/templates/compose.*.yml generate-compose.shmerges templates into final compose filessetup.shgenerates secrets usinggenerate-secrets.sh.env.exampledocuments all configurable variables- Documentation lives in
docs/
Always update documentation when making changes. The docs folder (docs/) contains user-facing documentation that must stay in sync with the codebase.
| File | Update When... |
|---|---|
docs/configuration.md |
Adding/removing/changing environment variables, changing defaults, adding new DC_* variables |
docs/quickstart.md |
Changing setup flow, adding new features users need to configure, changing ports/volumes/services |
docs/support.md |
Changing support boundaries, adding new component categories |
docs/README.md |
Adding new documentation pages, changing known limitations |
.env.example |
Adding any new environment variable (always document generation commands for secrets) |
on-prem/README.md |
Changing scripts, profiles, or file structure |
- Use tables for configuration references (Variable | Type | Default | Description)
- Group settings into Required, Frequently Used, and Other sections
- Include example values and generation commands for secrets
- Document both localhost development and production deployment patterns
When adding new environment variables, ensure they're documented in .env.example. Key variables that should be present:
- Authentication:
JWT_SECRET,JWT_SECRET_EXPIRY,API_SECRET(internal service-to-service auth) - ClickHouse:
CLICKHOUSE_CURRENTS_PASSWORD,CLICKHOUSE_ACCESS_TOKEN(optional token-based auth) - Object Storage:
FILE_STORAGE_REGION(required for AWS S3, optional for local/MinIO) - Initial Setup:
ON_PREM_EMAIL(root admin user email)
- GitHub workflows validate compose files using
docker compose configandpodman compose config - Validation runs on both Ubuntu (Docker) and AlmaLinux 8 (Podman) to ensure compatibility