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