diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..72ea2ed --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "intelephense.environment.includePaths": [ + "${workspaceRoot}", + "/home/rik/workspace-php/kube/asdphpKube" + ] +} \ No newline at end of file diff --git a/app/os/opcache.template.ini b/app/os/opcache.template.ini index d2a11b3..cb763df 100644 --- a/app/os/opcache.template.ini +++ b/app/os/opcache.template.ini @@ -6,7 +6,6 @@ opcache.interned_strings_buffer=16 opcache.max_accelerated_files=10000 opcache.revalidate_freq=360 opcache.validate_timestamps=0 -opcache.preload=/var/www/§PROJECT_BUILDNAME§/load.php +opcache.preload=/home/asdynamics/private/§PROJECT_BUILDNAME§/load.php opcache.preload_user=www-data -;opcache.blacklist_filename=/var/www/contents-manager-service/index.php opcache.fast_shutdown=1 diff --git a/app/os/worker-entrypoint b/app/os/worker-entrypoint index 4e79a64..7855330 100644 --- a/app/os/worker-entrypoint +++ b/app/os/worker-entrypoint @@ -6,6 +6,15 @@ function exit_func { } trap exit_func SIGTERM SIGINT +printenv | grep "ASD_" >> /etc/environment + +chown -R www-data:www-data /var/log/asdynamics +chown -R www-data:www-data /home/asdynamics/storage +mkdir -p /tmp/asdynamics +chown -R www-data:www-data /tmp/asdynamics + +docker-php-entrypoint + ASD_BINDIR="/home/asdynamics/private/${ASD_BUILDNAME}/bin" $ASD_BINDIR/ensureConstraints.php diff --git a/app/private/common/config.php b/app/private/common/config.php index cd7913e..f8354d0 100644 --- a/app/private/common/config.php +++ b/app/private/common/config.php @@ -13,6 +13,13 @@ Context::setCurrentLocale("gui","en"); Context::setCurrentLocale("system","en"); Context::setCurrentLocale("api","en"); + +// %% LOGS +$logPath = Context::getEnvironment()->getDirectoryPath("log"); +Context::getEnvironment()->addFilePath("log.job", $logPath."/job.log"); + + +// %% FS Exchange Files Context::getEnvironment()->addDirectoryPath("comunication", "/jobComunication"); Context::getEnvironment()->addFilePath("comunication.shutdown", Context::getEnvironment()->getDirectoryPath("comunication")."/shutdown" ); Context::getEnvironment()->addFilePath("comunication.execution", Context::getEnvironment()->getDirectoryPath("comunication")."/execution" ); diff --git a/app/private/lib/fileSystem/lib.config.php b/app/private/lib/fileSystem/lib.config.php index 925f9ee..cc0c79e 100644 --- a/app/private/lib/fileSystem/lib.config.php +++ b/app/private/lib/fileSystem/lib.config.php @@ -18,5 +18,7 @@ FileSystemManager::addRuleset(Context::getEnvironment()->getDirectoryPath("stora // Lettura e scrittura su tmp FileSystemManager::addRuleset(Context::getEnvironment()->getDirectoryPath("tmp"), new FileSystemRuleset(FileSystemRuleset::PERMISSION_READ + FileSystemRuleset::PERMISSION_WRITE)); +// Lettura e scrittura filesystem interscambio +FileSystemManager::addRuleset(Context::getEnvironment()->getDirectoryPath("comunication"), new FileSystemRuleset(FileSystemRuleset::PERMISSION_READ + FileSystemRuleset::PERMISSION_WRITE)); ?> \ No newline at end of file diff --git a/app/private/lib/logger/lib.config.php b/app/private/lib/logger/lib.config.php index afc8bba..aaf501d 100644 --- a/app/private/lib/logger/lib.config.php +++ b/app/private/lib/logger/lib.config.php @@ -15,11 +15,13 @@ use ASD\Log\LogManager; if (Context::getEnvironment()->get("name") == "local") { LogManager::addLogger(new FileLogger("core", Context::getEnvironment()->getFilePath("log.core") , Logger::LEVEL_DEBUG)); LogManager::addLogger(new FileLogger("dao", Context::getEnvironment()->getFilePath("log.dao"), Logger::LEVEL_DEBUG)); + LogManager::addLogger(new FileLogger("job", Context::getEnvironment()->getFilePath("log.job"), Logger::LEVEL_DEBUG)); } else { $httpClient = new HttpClient(); LogManager::addLogger(new GELFLogger("core", "http://graylog3:12201/gelf", $httpClient, Logger::LEVEL_NOTICE)); LogManager::addLogger(new GELFLogger("dao", "http://graylog3:12201/gelf", $httpClient, Logger::LEVEL_NOTICE)); + LogManager::addLogger(new GELFLogger("job", "http://graylog3:12201/gelf", $httpClient, Logger::LEVEL_NOTICE)); } diff --git a/app/public/index.php b/app/public/index.php deleted file mode 100644 index c8cb0da..0000000 --- a/app/public/index.php +++ /dev/null @@ -1,20 +0,0 @@ - - - - - -
- - -