kopia lustrzana https://github.com/OpenDroneMap/WebODM
Merge remote-tracking branch 'upstream/master' into elevation-map-plugin
commit
f1fe6b52a9
1
.env
1
.env
|
@ -6,4 +6,5 @@ WO_SSL_KEY=
|
|||
WO_SSL_CERT=
|
||||
WO_SSL_INSECURE_PORT_REDIRECT=80
|
||||
WO_DEBUG=NO
|
||||
WO_DEV=NO
|
||||
WO_BROKER=redis://broker
|
||||
|
|
|
@ -94,9 +94,13 @@ def build_plugins():
|
|||
"Cannot generate webpack.config.js for {}, a path is missing: {}".format(plugin, ' '.join(build_paths)))
|
||||
|
||||
# Check for webpack.config.js (if we need to build it)
|
||||
if plugin.path_exists("public/webpack.config.js") and not plugin.path_exists("public/build"):
|
||||
logger.info("Running webpack for {}".format(plugin.get_name()))
|
||||
subprocess.call(['webpack-cli'], cwd=plugin.get_path("public"))
|
||||
if plugin.path_exists("public/webpack.config.js"):
|
||||
if settings.DEV:
|
||||
logger.info("Running webpack with watcher for {}".format(plugin.get_name()))
|
||||
subprocess.Popen(['webpack-cli', '--watch'], cwd=plugin.get_path("public"))
|
||||
elif not plugin.path_exists("public/build"):
|
||||
logger.info("Running webpack for {}".format(plugin.get_name()))
|
||||
subprocess.call(['webpack-cli'], cwd=plugin.get_path("public"))
|
||||
|
||||
|
||||
def register_plugins():
|
||||
|
|
|
@ -31,6 +31,7 @@ services:
|
|||
- WO_HOST
|
||||
- WO_DEBUG
|
||||
- WO_BROKER
|
||||
- WO_DEV
|
||||
restart: on-failure:10
|
||||
oom_score_adj: 0
|
||||
broker:
|
||||
|
|
|
@ -77,6 +77,7 @@ case $key in
|
|||
;;
|
||||
--dev)
|
||||
export WO_DEBUG=YES
|
||||
export WO_DEV=YES
|
||||
dev_mode=true
|
||||
shift # past argument
|
||||
;;
|
||||
|
|
|
@ -50,6 +50,7 @@ WORKER_RUNNING = sys.argv[2:3] == ["worker"]
|
|||
|
||||
# SECURITY WARNING: don't run with debug turned on a public facing server!
|
||||
DEBUG = os.environ.get('WO_DEBUG', 'YES') == 'YES' or TESTING
|
||||
DEV = os.environ.get('WO_DEV', 'NO') == 'YES'
|
||||
SESSION_COOKIE_SECURE = CSRF_COOKIE_SECURE = os.environ.get('WO_SSL', 'NO') == 'YES'
|
||||
INTERNAL_IPS = ['127.0.0.1']
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue