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 @@ COPY ./nginx.conf /etc/nginx/conf.d/default.conf");
'', '',
]; ];
// 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) // Find where to insert the comments (after FROM statement)
$fromIndex = $dockerfile->search(function ($line) { $fromIndex = $dockerfile->search(function ($line) {
return str_starts_with(trim(strtoupper($line)), 'FROM'); return str_starts_with(trim(strtoupper($line)), 'FROM');