refactor(deployment): remove redundant environment variable documentation from Dockerfile comments to streamline the deployment process

This commit is contained in:
Andras Bacsai 2025-09-16 18:25:16 +02:00
parent 6314fef8df
commit f084ded6e9

View file

@ -2764,19 +2764,6 @@ private function add_buildkit_secrets_to_dockerfile()
'',
];
// Get the environment variables to document which secrets are available
$envs = $this->pull_request_id === 0
? $this->application->environment_variables()->where('key', 'not like', 'NIXPACKS_%')->get()
: $this->application->environment_variables_preview()->where('key', 'not like', 'NIXPACKS_%')->get();
if ($envs->count() > 0) {
$secretsComment[] = '# Available secrets:';
foreach ($envs as $env) {
$secretsComment[] = "# - {$env->key}";
}
$secretsComment[] = '';
}
// Find where to insert the comments (after FROM statement)
$fromIndex = $dockerfile->search(function ($line) {
return str_starts_with(trim(strtoupper($line)), 'FROM');