Merge pull request #4188 from Dokploy/fix/compose-project-name-orphan-containers

fix: inject COMPOSE_PROJECT_NAME to prevent orphaned containers on redeploy
This commit is contained in:
Mauricio Siu
2026-04-09 17:09:52 -06:00
committed by GitHub
@@ -106,6 +106,7 @@ export const getCreateEnvFileCommand = (compose: ComposeNested) => {
const envFilePath = join(dirname(composeFilePath), ".env");
let envContent = `APP_NAME=${appName}\n`;
envContent += `COMPOSE_PROJECT_NAME=${appName}\n`;
envContent += env || "";
if (!envContent.includes("DOCKER_CONFIG")) {
envContent += "\nDOCKER_CONFIG=/root/.docker";