Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(parser): use firstOrCreate instead of updateOrCreate for environment variables

Andras Bacsai0679e91c85f2
diff --git a/bootstrap/helpers/parsers.php b/bootstrap/helpers/parsers.php
index 6b66de8a21..99ce9185ad 100644
--- a/bootstrap/helpers/parsers.php
+++ b/bootstrap/helpers/parsers.php
@@ -1940,7 +1940,7 @@ function serviceParser(Service $resource): Collection
} else {
$value = generateEnvValue($command, $resource);
- $resource->environment_variables()->updateOrCreate([
+ $resource->environment_variables()->firstOrCreate([
'key' => $key->value(),
'resourceable_type' => get_class($resource),
'resourceable_id' => $resource->id,