refactor a lot of things

fix: postgres_passwords could be longer
feat: able to define postgresql databases from the ui
This commit is contained in:
Andras Bacsai
2023-08-09 15:57:53 +02:00
parent d18de24cf9
commit a378b5108e
42 changed files with 167 additions and 92 deletions

View File

@@ -150,7 +150,7 @@ class StartPostgresql
private function generate_init_scripts()
{
if (count($this->database->init_scripts) === 0) {
if (is_null($this->database->init_scripts) || count($this->database->init_scripts) === 0) {
return;
}
foreach ($this->database->init_scripts as $init_script) {

View File

@@ -18,7 +18,7 @@ class CheckResaleLicense
return;
}
$base_url = config('coolify.license_url');
if (isDev()) {
if (is_dev()) {
$base_url = 'http://host.docker.internal:8787';
}
$instance_id = config('app.id');

View File

@@ -17,7 +17,7 @@ class UpdateCoolify
$settings = InstanceSettings::get();
ray('Running InstanceAutoUpdateJob');
$localhost_name = 'localhost';
if (isDev()) {
if (is_dev()) {
$localhost_name = 'testing-local-docker-container';
}
$this->server = Server::where('name', $localhost_name)->firstOrFail();
@@ -52,7 +52,7 @@ class UpdateCoolify
private function update()
{
if (isDev()) {
if (is_dev()) {
ray("Running update on local docker container. Updating to $this->latest_version");
remote_process([
"sleep 10"