mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 02:15:51 +00:00
feat(railpack): log generated config and build plan, add multi-language dev examples
Log Railpack config JSON (dev-only) after generation and capture railpack-plan.json post-prepare step. In prod, strip secrets array before logging. In dev, log full plan. Add 10 multi-language seeder examples (Python/Flask, Go/Gin, Rust, Laravel, Symfony, Rails, Elixir/Phoenix, Bun) targeting v4.x branch. Support per-example git_branch override in upsertApplication.
This commit is contained in:
1 parent
8e91d627a3
commit
28320858ca
2 files changed
+96
-1
No files matched your search
@@ -2692,6 +2692,10 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
]
|
||||
);
|
||||
|
||||
if (isDev()) {
|
||||
$this->application_deployment_queue->addLogEntry('Generated Railpack config: '.json_encode($mergedConfig, JSON_PRETTY_PRINT), hidden: true);
|
||||
}
|
||||
|
||||
return $this->generated_railpack_config_relative_path();
|
||||
}
|
||||
|
||||
@@ -2731,8 +2735,27 @@ class ApplicationDeploymentJob implements ShouldBeEncrypted, ShouldQueue
|
||||
$this->application_deployment_queue->addLogEntry('Generating Railpack build plan.');
|
||||
$this->execute_remote_command(
|
||||
[executeInDocker($this->deployment_uuid, $prepare_command), 'hidden' => true],
|
||||
[
|
||||
executeInDocker($this->deployment_uuid, 'cat /artifacts/railpack-plan.json'),
|
||||
'hidden' => true,
|
||||
'save' => 'railpack_plan',
|
||||
],
|
||||
);
|
||||
|
||||
$railpackPlanRaw = $this->saved_outputs->get('railpack_plan');
|
||||
if (! empty($railpackPlanRaw)) {
|
||||
if (isDev()) {
|
||||
$this->application_deployment_queue->addLogEntry("Final Railpack plan: {$railpackPlanRaw}", hidden: true);
|
||||
} else {
|
||||
$parsedPlan = json_decode($railpackPlanRaw, true);
|
||||
if (is_array($parsedPlan)) {
|
||||
// Strip secrets array to avoid logging variable names in production.
|
||||
unset($parsedPlan['secrets']);
|
||||
$this->application_deployment_queue->addLogEntry('Final Railpack plan: '.json_encode($parsedPlan, JSON_PRETTY_PRINT), hidden: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Step 2: Build image using docker buildx with railpack frontend.
|
||||
// Railpack's frontend requires full BuildKit (mergeop), so we use a docker-container driver builder.
|
||||
$this->application_deployment_queue->addLogEntry('Building docker image with Railpack.');
|
||||
|
||||
Reference in new issue
Block a user