diff --git a/chart/templates/deployment-celery-worker.yaml b/chart/templates/deployment-celery-worker.yaml index e26a84bf5f2337c8c9f418bc3828379206095a85..8bc0d5f20533316cdd5c4c5d3c15b7815c4fc633 100644 --- a/chart/templates/deployment-celery-worker.yaml +++ b/chart/templates/deployment-celery-worker.yaml @@ -76,6 +76,8 @@ spec: value: {{ .Values.ingress.host.name | quote }} - name: REDIS_HOSTNAME value: {{ printf "%s-redis-master" .Release.Name }} + - name: PUBLIC_HOST + value: {{ .Values.ingress.host.name }} {{- $root := . -}} {{- range tuple "MARVINJS_APIKEY" "GALAXY_APIKEY" "GALAXY_BASE_URL" "GALAXY_COMPOUNDPROPERTIES_WORKFLOWID" "GACODE" "SECRET_KEY" }} - name: {{ . }} diff --git a/chart/templates/deployment-django.yaml b/chart/templates/deployment-django.yaml index 19a575151cac73331015f791b8771b9eeba8674c..1d0f39045c1d558684190c22af22d385b4a3a3e1 100644 --- a/chart/templates/deployment-django.yaml +++ b/chart/templates/deployment-django.yaml @@ -75,6 +75,8 @@ spec: value: {{ .Values.ingress.host.name | quote }} - name: REDIS_HOSTNAME value: {{ printf "%s-redis-master" .Release.Name }} + - name: PUBLIC_HOST + value: {{ .Values.ingress.host.name }} {{- $root := . -}} {{- range tuple "MARVINJS_APIKEY" "GALAXY_APIKEY" "GALAXY_BASE_URL" "GALAXY_COMPOUNDPROPERTIES_WORKFLOWID" "GACODE" "SECRET_KEY" }} - name: {{ . }} diff --git a/chart/values.yaml b/chart/values.yaml index 25868da0808c34ea971adf9f2e153e765420934c..aba674bfb683a011393c5e4870453ec9ccd3b44b 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -97,11 +97,10 @@ redis: architecture: standalone master: persistence: - storageClass: 'ceph-block' + storageClass: "ceph-block" enabled: true size: 1Gi - postgresqlBackend: bitnami: enabled: false @@ -119,12 +118,12 @@ postgresql: preparedDatabases: extensions: {} parameters: -# shared_buffers: 512Mi -# max_connections: 99 + # shared_buffers: 512Mi + # max_connections: 99 log_statement: none volume: size: 20Gi - storageClass: 'ceph-block' + storageClass: "ceph-block" resources: requests: memory: 2Gi @@ -136,7 +135,7 @@ postgresql: postgresqlbitnami: primary: persistence: - storageClass: 'ceph-block' + storageClass: "ceph-block" enabled: true size: 20Gi resources: @@ -150,8 +149,8 @@ postgresqlbitnami: ephemeral-storage: 128Mi djangoSecrets: - MARVINJS_APIKEY: '' - GALAXY_APIKEY: '' - GALAXY_BASE_URL: '' - GALAXY_COMPOUNDPROPERTIES_WORKFLOWID: '' - GACODE: '' + MARVINJS_APIKEY: "" + GALAXY_APIKEY: "" + GALAXY_BASE_URL: "" + GALAXY_COMPOUNDPROPERTIES_WORKFLOWID: "" + GACODE: "" diff --git a/ippisite/ippidb/templates/base.html b/ippisite/ippidb/templates/base.html index 08afeaa4a75c2ad88f641c98f2ef7f2464c584a4..4ef32f72b394ac5bf34373f1a63ad5cfc47f3145 100644 --- a/ippisite/ippidb/templates/base.html +++ b/ippisite/ippidb/templates/base.html @@ -39,9 +39,10 @@ <script defer src="/static/font-awesome/js/all.min.js"></script> <script src="/static/smilesdrawer/smiles-drawer.min.js"></script> <script src="/static/bootstrap-slider-master/dist/bootstrap-slider.min.js"></script> - + <script defer data-domain="{{ PUBLIC_HOST }}" src="https://plausible.pasteur.cloud/js/script.js"></script> <script src="/static/js/ippidb.js" type="text/javascript"></script> <script src="/static/js/ippidb-smilesdrawer.js" type="text/javascript"></script> + {% block extra_js %}{% endblock %} diff --git a/ippisite/ippisite/settings.py b/ippisite/ippisite/settings.py index 73a43a7bef11e1e7bb9a0943837097f89e58a035..ce9e2f586d458c1639fbae105b50893ede0bdf04 100644 --- a/ippisite/ippisite/settings.py +++ b/ippisite/ippisite/settings.py @@ -118,6 +118,7 @@ TEMPLATES = [ "django.contrib.messages.context_processors.messages", "ippidb.views.marvinjs", "ippidb.views.google_analytics", + "ippidb.context_processors.additionnal_settings_variable", "live_settings.context_processors.processors", "maintenance_mode.context_processors.maintenance_mode", ] @@ -325,3 +326,5 @@ MAINTENANCE_MODE_IGNORE_URLS = (r"^((?!\/targetcentric).)*$",) ################################################################################ FILE_UPLOAD_MAX_MEMORY_SIZE = 1024 * 1024 * 15 # 15Mo ################################################################################ + +PUBLIC_HOST = config("PUBLIC_HOST", default="localhost:8080")