Skip to content
Snippets Groups Projects
Commit f172443f authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Moved the .gui_configured folder into a subdirectory of the working directory.

Changelog: Changed
parent 9710dfb3
No related branches found
No related tags found
1 merge request!1635Smaller cloud migration related issues.
...@@ -43,6 +43,9 @@ gui/public/env.js ...@@ -43,6 +43,9 @@ gui/public/env.js
# Ignore built gui and docs artufacts # Ignore built gui and docs artufacts
nomad/app/static/ nomad/app/static/
# Ignore files created at nomad runtime
run/
nomad/normalizing/data/*.db nomad/normalizing/data/*.db
nomad/normalizing/data/*.msg nomad/normalizing/data/*.msg
......
...@@ -36,6 +36,9 @@ bundles ...@@ -36,6 +36,9 @@ bundles
examples/workdir/ examples/workdir/
examples/data/uploads/*.zip examples/data/uploads/*.zip
# Ignore files created at nomad runtime
run/
# Side effect of running Jupyterhub locally # Side effect of running Jupyterhub locally
jupyterhub_cookie_secret jupyterhub_cookie_secret
jupyterhub.sqlite jupyterhub.sqlite
......
...@@ -91,7 +91,9 @@ gui_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), 'static/gui ...@@ -91,7 +91,9 @@ gui_folder = os.path.abspath(os.path.join(os.path.dirname(__file__), 'static/gui
if not os.path.exists(gui_folder): if not os.path.exists(gui_folder):
os.makedirs(gui_folder) os.makedirs(gui_folder)
configured_gui_folder = os.path.join(gui_folder, '../.gui_configured') configured_gui_folder = os.path.join(
config.fs.working_directory, 'run', 'gui_configured'
)
if os.path.exists(configured_gui_folder): if os.path.exists(configured_gui_folder):
gui_folder = configured_gui_folder gui_folder = configured_gui_folder
......
...@@ -101,6 +101,7 @@ def run_app( ...@@ -101,6 +101,7 @@ def run_app(
config.meta.service = 'app' config.meta.service = 'app'
if with_gui: if with_gui:
import os
import os.path import os.path
import glob import glob
import shutil import shutil
...@@ -108,7 +109,11 @@ def run_app( ...@@ -108,7 +109,11 @@ def run_app(
gui_folder = os.path.abspath( gui_folder = os.path.abspath(
os.path.join(os.path.dirname(__file__), '../../app/static/gui') os.path.join(os.path.dirname(__file__), '../../app/static/gui')
) )
run_gui_folder = os.path.join(gui_folder, '../.gui_configured') run_gui_folder = os.path.join(
config.fs.working_directory, 'run', 'gui_configured'
)
if not os.path.exists(run_gui_folder):
os.makedirs(run_gui_folder)
# copy # copy
shutil.rmtree(run_gui_folder, ignore_errors=True) shutil.rmtree(run_gui_folder, ignore_errors=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment