mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 18:18:29 +00:00
add env variables to deployment
This commit is contained in:
1 parent
1e98cddaa6
commit
23f58b8c13
5 files changed
+51
-15
No files matched your search
@@ -78,6 +78,10 @@ class Application extends BaseModel
|
||||
{
|
||||
return $this->hasMany(EnvironmentVariable::class);
|
||||
}
|
||||
public function build_environment_variables(): HasMany
|
||||
{
|
||||
return $this->hasMany(EnvironmentVariable::class)->where('is_build_time', true);
|
||||
}
|
||||
public function environment()
|
||||
{
|
||||
return $this->belongsTo(Environment::class);
|
||||
|
||||
@@ -16,7 +16,7 @@ class EnvironmentVariable extends Model
|
||||
];
|
||||
private function get_environment_variables(string $environment_variable): string|null
|
||||
{
|
||||
$team_id = session('currentTeam')->id;
|
||||
// $team_id = session('currentTeam')->id;
|
||||
if (str_contains(trim($environment_variable), '{{') && str_contains(trim($environment_variable), '}}')) {
|
||||
$environment_variable = preg_replace('/\s+/', '', $environment_variable);
|
||||
$environment_variable = str_replace('{{', '', $environment_variable);
|
||||
|
||||
Reference in new issue
Block a user