Skip to content

Commit

Permalink
refactor: add docker config to improve UX
Browse files Browse the repository at this point in the history
  • Loading branch information
Siumauricio committed Jun 7, 2024
1 parent b8a8e32 commit 7eb1716
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/utils/builders/compose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,12 @@ const createEnvFile = (compose: ComposeNested) => {
join(COMPOSE_PATH, appName, "docker-compose.yml");

const envFilePath = join(dirname(composeFilePath), ".env");
const envFileContent = prepareEnvironmentVariables(env).join("\n");
let envContent = env || "";
if (!envContent.includes("DOCKER_CONFIG")) {
envContent += "\nDOCKER_CONFIG=/root/.docker/config.json";
}

const envFileContent = prepareEnvironmentVariables(envContent).join("\n");

if (!existsSync(dirname(envFilePath))) {
mkdirSync(dirname(envFilePath), { recursive: true });
Expand Down

0 comments on commit 7eb1716

Please sign in to comment.