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 @@ - - - - - - - - - Works - - - - IT WORKS! - - - \ No newline at end of file diff --git a/app/public/load.php b/app/public/load.php deleted file mode 100644 index 8bc48f8..0000000 --- a/app/public/load.php +++ /dev/null @@ -1,8 +0,0 @@ - \ No newline at end of file diff --git a/config b/config index 17c5cba..78a671a 100644 --- a/config +++ b/config @@ -1,4 +1,4 @@ -ASDPHP_VERSION="2.3.0-rev3" +ASDPHP_VERSION="2.3.5" DEBUG_REMOTE_IP="10.0.1.3" DEBUG_REMOTE_PORT="9003" diff --git a/localEnv/docker-compose.yml b/localEnv/docker-compose.yml index 9e984e8..2672865 100644 --- a/localEnv/docker-compose.yml +++ b/localEnv/docker-compose.yml @@ -19,6 +19,8 @@ services: - §PROJECT_BUILDNAME§-storage:/home/asdynamics/storage/§PROJECT_BUILDNAME§ - §PROJECT_BUILDNAME§-log:/var/log/asdynamics/ +networks: + db-network: volumes: §PROJECT_BUILDNAME§-storage: diff --git a/localEnv/runNotDetached.sh b/localEnv/runNotDetached.sh index f70fb2f..f28957c 100755 --- a/localEnv/runNotDetached.sh +++ b/localEnv/runNotDetached.sh @@ -13,7 +13,7 @@ cd "/home/asdynamics/dockerenv/$PROJECT_BUILDNAME" COMPOSER_NAME="local_$PROJECT_BUILDNAME" -docker-compose -p "$COMPOSER_NAME" up webserver +docker-compose -p "$COMPOSER_NAME" up worker cd "$DIR_RETURN" exit 0;