feat: disable autoupdate
This commit is contained in:
parent
dd99ad0af8
commit
60c8e0d625
@ -8,3 +8,5 @@ REDIS_PASSWORD=
|
||||
PUSHER_APP_ID=
|
||||
PUSHER_APP_KEY=
|
||||
PUSHER_APP_SECRET=
|
||||
|
||||
AUTOUPDATE=true
|
||||
|
@ -124,10 +124,9 @@ public function run(): void
|
||||
}
|
||||
$settings = InstanceSettings::get();
|
||||
|
||||
if (env('AUTOUPDATE') === 'true') {
|
||||
if (env('AUTOUPDATE')) {
|
||||
$settings->update(['is_auto_update_enabled' => true]);
|
||||
}
|
||||
if (env('AUTOUPDATE') === 'false') {
|
||||
} else {
|
||||
$settings->update(['is_auto_update_enabled' => false]);
|
||||
}
|
||||
try {
|
||||
|
@ -43,6 +43,7 @@ services:
|
||||
- PUSHER_APP_ID
|
||||
- PUSHER_APP_KEY
|
||||
- PUSHER_APP_SECRET
|
||||
- AUTOUPDATE
|
||||
- SELF_HOSTED
|
||||
- WAITLIST
|
||||
- SUBSCRIPTION_PROVIDER
|
||||
|
@ -130,6 +130,13 @@ curl -fsSL $CDN/docker-compose.prod.yml -o /data/coolify/source/docker-compose.p
|
||||
curl -fsSL $CDN/.env.production -o /data/coolify/source/.env.production
|
||||
curl -fsSL $CDN/upgrade.sh -o /data/coolify/source/upgrade.sh
|
||||
|
||||
# Check if AUTOUPDATE env variable is set, if set use it, if not set to true
|
||||
if [ -z "$AUTOUPDATE" ]; then
|
||||
AUTOUPDATE=true
|
||||
else
|
||||
AUTOUPDATE=false
|
||||
fi
|
||||
|
||||
# Copy .env.example if .env does not exist
|
||||
if [ ! -f /data/coolify/source/.env ]; then
|
||||
cp /data/coolify/source/.env.production /data/coolify/source/.env
|
||||
@ -142,6 +149,8 @@ if [ ! -f /data/coolify/source/.env ]; then
|
||||
sed -i "s|PUSHER_APP_SECRET=.*|PUSHER_APP_SECRET=$(openssl rand -hex 32)|g" /data/coolify/source/.env
|
||||
fi
|
||||
|
||||
sed -i "s|AUTOUPDATE=.*|AUTOUPDATE=$AUTOUPDATE|g" /data/coolify/source/.env
|
||||
|
||||
# Merge .env and .env.production. New values will be added to .env
|
||||
sort -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user