mirror of
https://github.com/fleetbase/fleetbase.git
synced 2025-12-19 14:18:57 +00:00
feat: fixed optimization changes for octane, added deprecation workflow
This commit is contained in:
13
Caddyfile
13
Caddyfile
@@ -1,9 +1,6 @@
|
||||
{
|
||||
frankenphp {
|
||||
# Reduced from 24 to 20 for better resource management
|
||||
# With 4 containers: 20 × 4 = 80 total workers
|
||||
# Requires db.t3.large (591 max connections) or better
|
||||
num_threads 20
|
||||
num_threads 24
|
||||
}
|
||||
order php_server before file_server
|
||||
}
|
||||
@@ -12,14 +9,6 @@ http://:8000 {
|
||||
root * /fleetbase/api/public
|
||||
encode zstd br gzip
|
||||
|
||||
# Request timeouts to prevent hanging
|
||||
timeouts {
|
||||
read_body 10s
|
||||
read_header 5s
|
||||
write 60s
|
||||
idle 120s
|
||||
}
|
||||
|
||||
php_server {
|
||||
resolve_root_symlink
|
||||
}
|
||||
|
||||
@@ -105,8 +105,8 @@ return [
|
||||
OperationTerminated::class => [
|
||||
FlushOnce::class,
|
||||
FlushTemporaryContainerInstances::class,
|
||||
DisconnectFromDatabases::class, // ✅ Release DB connections after each request
|
||||
CollectGarbage::class, // ✅ Prevent memory leaks
|
||||
DisconnectFromDatabases::class,
|
||||
CollectGarbage::class,
|
||||
],
|
||||
|
||||
WorkerErrorOccurred::class => [
|
||||
|
||||
@@ -2,6 +2,7 @@ import Application from '@ember/application';
|
||||
import Resolver from 'ember-resolver';
|
||||
import loadInitializers from 'ember-load-initializers';
|
||||
import config from '@fleetbase/console/config/environment';
|
||||
import './deprecation-workflow';
|
||||
|
||||
export default class App extends Application {
|
||||
modulePrefix = config.modulePrefix;
|
||||
|
||||
9
console/app/deprecation-workflow.js
Normal file
9
console/app/deprecation-workflow.js
Normal file
@@ -0,0 +1,9 @@
|
||||
import setupDeprecationWorkflow from 'ember-cli-deprecation-workflow';
|
||||
|
||||
setupDeprecationWorkflow({
|
||||
workflow: [
|
||||
{ handler: 'silence', matchId: 'ember-concurrency.deprecate-decorator-task' },
|
||||
{ handler: 'silence', matchId: 'new-helper-names' },
|
||||
{ handler: 'silence', matchId: 'ember-data:deprecate-non-strict-relationships' },
|
||||
],
|
||||
});
|
||||
@@ -23,7 +23,7 @@ module.exports = function (environment) {
|
||||
APP: {
|
||||
autoboot: true,
|
||||
extensions: asArray(getenv('EXTENSIONS')),
|
||||
disableRuntimeConfig: toBoolean(getenv('DISABLE_RUNTIME_CONFIG')),
|
||||
disableRuntimeConfig: toBoolean(getenv('DISABLE_RUNTIME_CONFIG', environment === 'production')),
|
||||
},
|
||||
|
||||
API: {
|
||||
|
||||
@@ -158,14 +158,14 @@ CMD ["php", "artisan", "queue:work"]
|
||||
# Application dev stage
|
||||
FROM base AS app-dev
|
||||
ENTRYPOINT ["docker-php-entrypoint"]
|
||||
CMD ["sh", "-c", "php artisan octane:frankenphp --workers=20 --max-requests=1000 --port=8000 --host=0.0.0.0 --watch"]
|
||||
CMD ["sh", "-c", "php artisan octane:frankenphp --max-requests=1000 --port=8000 --host=0.0.0.0 --watch"]
|
||||
|
||||
# Application release stage
|
||||
FROM base AS app-release
|
||||
ENTRYPOINT ["docker-php-entrypoint"]
|
||||
CMD ["sh", "-c", "php artisan octane:frankenphp --workers=20 --max-requests=1000 --port=8000 --host=0.0.0.0"]
|
||||
CMD ["sh", "-c", "php artisan octane:frankenphp --max-requests=1000 --port=8000 --host=0.0.0.0"]
|
||||
|
||||
# Application stage
|
||||
FROM base AS app
|
||||
ENTRYPOINT ["/sbin/ssm-parent", "-c", ".ssm-parent.yaml", "run", "--", "docker-php-entrypoint"]
|
||||
CMD ["sh", "-c", "php artisan octane:frankenphp --workers=20 --max-requests=1000 --port=8000 --host=0.0.0.0"]
|
||||
CMD ["sh", "-c", "php artisan octane:frankenphp --max-requests=1000 --port=8000 --host=0.0.0.0"]
|
||||
|
||||
Reference in New Issue
Block a user