EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 7a525eed authored by Fabian Schindler's avatar Fabian Schindler
Browse files

Merge branch 'main' of gitlab.eox.at:vs/core

parents 334a0644 40d9bbe9
No related branches found
No related tags found
No related merge requests found
Pipeline #26526 failed
......@@ -76,7 +76,7 @@ ENV INSTANCE_ID="view-server_core" \
GDAL_PAM_ENABLED="NO" \
OWS_WCS_MAXSIZE="4096" \
EOXS_LAYER_SUFFIX_SEPARATOR="__" \
DEV="false" \
DEVELOPMENT="false" \
ENABLE_HTTP_ACCESS="false"
COPY . .
......
......@@ -60,12 +60,11 @@
echo "ALLOWED_HOSTS = ['*']" >> pvs_instance/settings.py
echo "USE_X_FORWARDED_HOST = True" >> pvs_instance/settings.py
echo "SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')" >> pvs_instance/settings.py
if $DEV ; then
if $DEVELOPMENT ; then
# activate django cors plugin for dev environment to remove need for browser cors plugin
sed -i "s/ 'django.contrib.auth',/ 'corsheaders', 'django.contrib.auth',/g" pvs_instance/settings.py
sed -i "s/ 'django.contrib.sessions.middleware.SessionMiddleware',/ 'corsheaders.middleware.CorsMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',/g" pvs_instance/settings.py
echo 'CORS_ORIGIN_ALLOW_ALL = True' >> pvs_instance/settings.py
sed -e 's/DEBUG = False/DEBUG = True/' -i pvs_instance/settings.py
fi
......@@ -86,11 +85,13 @@
if [[ "$EOXS_OPENSEARCH_GETCOVERAGE_HTML_EXCEPTION" = true ]] ; then
echo "EOXS_OPENSEARCH_GETCOVERAGE_HTML_EXCEPTION = True" >> pvs_instance/settings.py
fi
if [[ "$DEBUG" = true ]] ; then
echo "DEBUG ON Setting functions"
echo "MIDDLEWARE.append('pyinstrument.middleware.ProfilerMiddleware')" >> pvs_instance/settings.py
sed -e 's/DEBUG = False/DEBUG = True/' -i pvs_instance/settings.py
fi
if [[ "$DEVELOPMENT" = true ]] ; then
echo "DEVELOPMENT ON Setting functions"
echo "MIDDLEWARE.append('pyinstrument.middleware.ProfilerMiddleware')" >> pvs_instance/settings.py
var="import os
import sys
......
......@@ -4,7 +4,6 @@ shopt -s nullglob
SERVICES=${WAIT_SERVICES:=''}
TIMEOUT=${WAIT_TIMEOUT:='15'}
DEBUG=${DEVELOPMENT:="false"}
if [[ ! -z $SERVICES ]] ; then
for service in $SERVICES ; do
......
......@@ -65,7 +65,7 @@ def setup_logging(debug=False):
@click.option("--validate", is_flag=True)
@click.option("--host", type=str)
@click.option("--port", type=int)
@click.option("--debug", is_flag=True)
@click.option("--debug/--no-debug", is_flag=True)
@click.pass_context
def cli(
ctx, config_file=None, validate=False, host=None, port=None, debug=False
......@@ -121,7 +121,7 @@ def daemon(ctx, replace=False):
@cli.command(help="Run a single, one-off registration")
@click.argument("route_name", type=str)
@click.argument("item", type=str)
@click.option("--replace", is_flag=True)
@click.option("--replace/--no-replace", is_flag=True)
@click.pass_context
def register(ctx, route_name, item, replace):
""" Registers a single item.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment