Knowledge
Search knowledge... ⌘K
Knowledge · Guidelines · docker
Production Compose
Guidelines for production docker-compose files used by Dokploy
Metadata
docker docker mandatory
Procedures
Showing 3 of 8
- 1 Service naming
Use project-prefixed names for all services to avoid collisions when multiple projects share the same VPS
services: sbx-api: # project prefix: sbx ... sbx-web: ... shredbx-api: # project prefix: shredbx ... shredbx-web: ... - 2 Build context
Use repo-relative paths for build contexts since Dokploy clones the entire repo before building
services: sbx-api: build: context: . dockerfile: projects/sbx/apps/sbx/api/Dockerfile sbx-web: build: context: . dockerfile: projects/sbx/apps/sbx/svelte/Dockerfile - 3 Port allocation
Match the server's port registry from the server model YAML. Never hardcode ports — use variable substitution or the registered port values
services: sbx-api: ports: - "${SBX_API_PORT:-5000}:5000" sbx-web: ports: - "${SBX_WEB_PORT:-4000}:4000" # Port values must match .sbx/ports/registry.yml
Tools
- docker compose
- docker