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.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix: only allow to modify in .env file if AUTOUPDATE is set
Andras Bacsai6ae87466ca6f
diff --git a/.env.production b/.env.productionindex d92c9ce277..f15a8b0e99 100644--- a/.env.production+++ b/.env.production@@ -8,5 +8,3 @@ REDIS_PASSWORD=PUSHER_APP_ID=PUSHER_APP_KEY=PUSHER_APP_SECRET=--AUTOUPDATE=truediff --git a/resources/views/livewire/settings/configuration.blade.php b/resources/views/livewire/settings/configuration.blade.phpindex 2a31e840ac..a47da5b212 100644--- a/resources/views/livewire/settings/configuration.blade.php+++ b/resources/views/livewire/settings/configuration.blade.php@@ -21,7 +21,11 @@</form><h2 class="pt-6">Advanced</h2><div class="flex flex-col py-6 text-right w-80">- <x-forms.checkbox instantSave id="is_auto_update_enabled" label="Auto Update Coolify" />+ @if (env('AUTOUPDATE') == 'true')+ <x-forms.checkbox instantSave helper="AUTOUPDATE is set in .env file, you need to modify it there." disabled id="is_auto_update_enabled" label="Auto Update Coolify" />+ @else+ <x-forms.checkbox instantSave id="is_auto_update_enabled" label="Auto Update Coolify" />+ @endif<x-forms.checkbox instantSave id="is_registration_enabled" label="Registration Allowed" /><x-forms.checkbox instantSave id="do_not_track" label="Do Not Track" />@if ($next_channel)diff --git a/scripts/install.sh b/scripts/install.shindex 5716ba2b69..eed99dbbbd 100644--- a/scripts/install.sh+++ b/scripts/install.sh@@ -106,9 +106,9 @@ cat >/etc/docker/daemon.json.coolify <<EOL}EOLTEMP_FILE=$(mktemp)-if ! jq -s '.[0] * .[1]' /etc/docker/daemon.json /etc/docker/daemon.json.coolify > "$TEMP_FILE"; then- echo "Error merging JSON files"- exit 1+if ! jq -s '.[0] * .[1]' /etc/docker/daemon.json /etc/docker/daemon.json.coolify >"$TEMP_FILE"; then+ echo "Error merging JSON files"+ exit 1fimv "$TEMP_FILE" /etc/docker/daemon.json@@ -156,9 +156,12 @@ fi# Merge .env and .env.production. New values will be added to .envsort -u -t '=' -k 1,1 /data/coolify/source/.env /data/coolify/source/.env.production | sed '/^$/d' >/data/coolify/source/.env.temp && mv /data/coolify/source/.env.temp /data/coolify/source/.env-# Check if AUTOUPDATE value is true in env, not in env file and it is not set in .envif [ "$AUTOUPDATE" = "false" ]; then- sed -i "s|AUTOUPDATE=.*|AUTOUPDATE=false|g" /data/coolify/source/.env+ if ! grep -q "AUTOUPDATE=" /data/coolify/source/.env; then+ echo "AUTOUPDATE=false" >>/data/coolify/source/.env+ else+ sed -i "s|AUTOUPDATE=.*|AUTOUPDATE=false|g" /data/coolify/source/.env+ fifi# Generate an ssh key (ed25519) at /data/coolify/ssh/keys/[email protected]