Merge branch 'next' into feat-add-dockerfile-from-instruction-par
This commit is contained in:
commit
d0ee7d0412
2 changed files with 6 additions and 7 deletions
|
|
@ -3310,12 +3310,6 @@ private function add_build_env_variables_to_dockerfile()
|
|||
}
|
||||
}
|
||||
|
||||
// Add secrets hash if we have environment variables
|
||||
if ($envs->isNotEmpty()) {
|
||||
$secrets_hash = $this->generate_secrets_hash($envs);
|
||||
$argsToInsert->push("ARG COOLIFY_BUILD_SECRETS_HASH={$secrets_hash}");
|
||||
}
|
||||
|
||||
// Insert ARGs after each FROM instruction (in reverse order to maintain correct line numbers)
|
||||
if ($argsToInsert->isNotEmpty()) {
|
||||
foreach (array_reverse($fromLines) as $fromLineIndex) {
|
||||
|
|
@ -3324,6 +3318,11 @@ private function add_build_env_variables_to_dockerfile()
|
|||
$dockerfile->splice($fromLineIndex + 1, 0, [$arg]);
|
||||
}
|
||||
}
|
||||
$envs_mapped = $envs->mapWithKeys(function ($env) {
|
||||
return [$env->key => $env->real_value];
|
||||
});
|
||||
$secrets_hash = $this->generate_secrets_hash($envs_mapped);
|
||||
$argsToInsert->push("ARG COOLIFY_BUILD_SECRETS_HASH={$secrets_hash}");
|
||||
}
|
||||
|
||||
$dockerfile_base64 = base64_encode($dockerfile->implode("\n"));
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"scripts": {
|
||||
"onWorktreeCreate": "cp $GCOOL_ROOT_PATH/.env .",
|
||||
"onWorktreeCreate": "cp $JEAN_ROOT_PATH/.env .",
|
||||
"run": "docker rm -f coolify coolify-realtime coolify-minio coolify-testing-host coolify-redis coolify-db coolify-mail coolify-vite && spin up"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue