diff --git a/app/Jobs/EduGainRunMdaScript.php b/app/Jobs/EduGainRunMdaScript.php index 8713d11..bfd7817 100644 --- a/app/Jobs/EduGainRunMdaScript.php +++ b/app/Jobs/EduGainRunMdaScript.php @@ -41,7 +41,7 @@ public function handle(): void $realScriptPath = realpath($scriptPath); try { - $file = escapeshellarg($folderName).'.xml'; + $file = config('storageCfg.mdaConfigFolder').'/'. escapeshellarg($folderName).'.xml'; $pipeline = 'main'; $command = 'sh '.escapeshellarg($realScriptPath).' '.$file.' '.$pipeline; diff --git a/app/Jobs/RunMdaScript.php b/app/Jobs/RunMdaScript.php index ff02aa7..bc1555f 100644 --- a/app/Jobs/RunMdaScript.php +++ b/app/Jobs/RunMdaScript.php @@ -64,12 +64,10 @@ public function handle(): void try { foreach ($filterArray as $filter) { - $file = escapeshellarg($filter).'.xml'; + $file = config('storageCfg.mdaConfigFolder').'/'.escapeshellarg($filter).'.xml'; $pipeline = 'main'; $command = 'sh '.escapeshellarg($realScriptPath).' '.$file.' '.$pipeline; - - $res = shell_exec($command); - dump($res); + shell_exec($command); } } catch (Exception $e) { diff --git a/docker-compose.yml b/docker-compose.yml index 467b2b0..3171e26 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -21,6 +21,8 @@ services: volumes: - '.:/var/www/html' - '/home/artem/Desktop/cesnet/metadata/testdata/mda:/home/artem/Desktop/cesnet/metadata/testdata/mda' + - '/home/artem/Desktop/cesnet/mda:/home/artem/Desktop/cesnet/mda' + - '/home/artem/Desktop/cesnet/metadata:/home/artem/Desktop/cesnet/metadata' networks: - sail depends_on: diff --git a/docker/8.1/Dockerfile b/docker/8.1/Dockerfile index 2505a30..215b89c 100644 --- a/docker/8.1/Dockerfile +++ b/docker/8.1/Dockerfile @@ -58,6 +58,13 @@ RUN chown -R sail /home/sail/.ssh \ && chmod go= /home/sail/.ssh/id_ed25519* RUN chmod +x /usr/local/bin/start-container +RUN apt-get update && \ + apt-get install -y openjdk-17-jdk && \ + apt-get clean; +ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-amd64 +ENV PATH $JAVA_HOME/bin:$PATH +RUN java -version + EXPOSE 8000 ENTRYPOINT ["start-container"]