Commit e8aceedd authored by Roman Ondráček's avatar Roman Ondráček

Core: use own directory for sessions (fix #230)

Signed-off-by: Roman Ondráček's avatarRoman Ondráček <ondracek.roman@centrum.cz>
parent cba66084
Pipeline #2409 passed with stages
in 21 minutes and 15 seconds
......@@ -39,7 +39,9 @@ class Kernel {
$configurator = new Configurator();
$configurator->enableTracy(__DIR__ . '/../log');
$configurator->setTimeZone('Europe/Prague');
$configurator->setTempDirectory(__DIR__ . '/../temp');
$tempDir = __DIR__ . '/../temp';
$configurator->setTempDirectory($tempDir);
FileSystem::createDir($tempDir . '/sessions');
$configurator->createRobotLoader()->addDirectory(__DIR__)->register();
$configurator->addConfig(__DIR__ . '/config/config.neon');
$version = Json::decode(FileSystem::read(__DIR__ . '/../version.json'));
......
......@@ -42,7 +42,9 @@ iqrfMacros:
path: '%appDir%/../iqrf/DPA-macros_190301_webapp.iqrfmcr'
session:
autoStart: true
expiration: 14 days
savePath: %tempDir%/sessions
services:
router: App\CoreModule\Router\RouterFactory::createRouter
......
Fixes cache directory path
Index: iqrf-gateway-webapp/app/Kernel.php
===================================================================
--- iqrf-gateway-webapp.orig/app/Kernel.php
+++ iqrf-gateway-webapp/app/Kernel.php
--- a/app/Kernel.php
+++ b/app/Kernel.php
@@ -39,7 +39,7 @@
$configurator = new Configurator();
$configurator->enableTracy(__DIR__ . '/../log');
$configurator->setTimeZone('Europe/Prague');
- $configurator->setTempDirectory(__DIR__ . '/../temp');
+ $configurator->setTempDirectory('/var/cache/iqrf-gateway-webapp');
- $tempDir = __DIR__ . '/../temp';
+ $tempDir = '/var/cache/iqrf-gateway-webapp';
$configurator->setTempDirectory($tempDir);
FileSystem::createDir($tempDir . '/sessions');
$configurator->createRobotLoader()->addDirectory(__DIR__)->register();
$configurator->addConfig(__DIR__ . '/config/config.neon');
$version = Json::decode(FileSystem::read(__DIR__ . '/../version.json'));
Fixes configuration directory path
Index: iqrf-gateway-webapp/app/ConsoleModule/Models/FeatureManager.php
===================================================================
--- iqrf-gateway-webapp.orig/app/ConsoleModule/Models/FeatureManager.php
+++ iqrf-gateway-webapp/app/ConsoleModule/Models/FeatureManager.php
@@ -35,7 +35,7 @@ class FeatureManager {
--- a/app/ConsoleModule/Models/FeatureManager.php
+++ b/app/ConsoleModule/Models/FeatureManager.php
@@ -35,7 +35,7 @@
/**
* Path to the webapp's configuration file
*/
......@@ -12,13 +10,11 @@ Index: iqrf-gateway-webapp/app/ConsoleModule/Models/FeatureManager.php
/**
* @var ITranslator Translator
Index: iqrf-gateway-webapp/app/Kernel.php
===================================================================
--- iqrf-gateway-webapp.orig/app/Kernel.php
+++ iqrf-gateway-webapp/app/Kernel.php
@@ -41,7 +41,7 @@ class Kernel {
$configurator->setTimeZone('Europe/Prague');
$configurator->setTempDirectory('/var/cache/iqrf-gateway-webapp');
--- a/app/Kernel.php
+++ b/app/Kernel.php
@@ -43,7 +43,7 @@
$configurator->setTempDirectory($tempDir);
FileSystem::createDir($tempDir . '/sessions');
$configurator->createRobotLoader()->addDirectory(__DIR__)->register();
- $configurator->addConfig(__DIR__ . '/config/config.neon');
+ $configurator->addConfig('/etc/iqrf-gateway-webapp/config.neon');
......
Fixes log directory path
---
app/Kernel.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/app/Kernel.php
+++ b/app/Kernel.php
@@ -37,7 +37,7 @@
......@@ -12,5 +8,5 @@ Fixes log directory path
- $configurator->enableTracy(__DIR__ . '/../log');
+ $configurator->enableTracy('/var/log/iqrf-gateway-webapp');
$configurator->setTimeZone('Europe/Prague');
$configurator->setTempDirectory('/var/cache/iqrf-gateway-webapp');
$configurator->createRobotLoader()->addDirectory(__DIR__)->register();
$tempDir = '/var/cache/iqrf-gateway-webapp';
$configurator->setTempDirectory($tempDir);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment