Skip to content

Commit fee9c2d

Browse files
committed
feat: add auto-update configuration and scheduling for application updates
1 parent 35ce6e1 commit fee9c2d

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,6 @@ COMPOSER_HOME = "../../.cache/composer"
9595
## SERVER RESOURCE LIMITATION
9696
DISK_SPACE_LIMIT=107374182400
9797
DISK_INODE_LIMIT=400000
98+
99+
## APPLICATION UPDATE
100+
AUTO_UPDATE=true

config/app.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,4 +164,16 @@
164164
'sentry_project' => env('SENTRY_PROJECT_ID'),
165165
'sentry_token' => env('SENTRY_AUTH_TOKEN'),
166166

167+
/*
168+
|--------------------------------------------------------------------------
169+
| Auto Update for Application and Composer Dependencies
170+
|--------------------------------------------------------------------------
171+
|
172+
| This option enables automatic updates for the application and composer
173+
| dependencies. Ensure that this is configured properly to avoid
174+
| unexpected issues during the update process.
175+
|
176+
*/
177+
'auto_update' => env('AUTO_UPDATE', true),
178+
167179
];

routes/console.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,10 @@
1414
->withoutOverlapping()
1515
->runInBackground()
1616
->sentryMonitor();
17+
if (config('app.auto_update')) {
18+
Schedule::command('simpede:update')->dailyAt('1.00')
19+
->withoutOverlapping()
20+
->runInBackground()
21+
->timezone(config('app.schedule_timezone'))
22+
->sentryMonitor();
23+
}

0 commit comments

Comments
 (0)