diff --git a/envs/.env.osmcha.example b/envs/.env.osmcha.example index 7ba0ad42..53740d6a 100644 --- a/envs/.env.osmcha.example +++ b/envs/.env.osmcha.example @@ -12,4 +12,8 @@ DJANGO_NON_STAFF_USER_THROTTLE_RATE=3/min OAUTH_REDIRECT_URI=http://localhost:8000/oauth-landing.html OSMCHA_FRONTEND_VERSION=oh-pages DJANGO_ENABLE_CHANGESET_COMMENTS=False -DJANGO_OSM_COMMENTS_API_KEY="" \ No newline at end of file +DJANGO_OSM_COMMENTS_API_KEY="" +DJANGO_ROOT=/app +DJANGO_SETTINGS_MODULE=config.settings.local +C_FORCE_ROOT=True +OSMCHA_FRONTEND_VERSION=v0.86.0-production \ No newline at end of file diff --git a/images/osmcha-web/Dockerfile b/images/osmcha-web/Dockerfile index e42cd284..ba519d8e 100644 --- a/images/osmcha-web/Dockerfile +++ b/images/osmcha-web/Dockerfile @@ -32,11 +32,6 @@ RUN pip3 install certifi RUN pip3 install django-extensions ADD . /app -ENV DJANGO_ROOT /app -ENV DJANGO_SETTINGS_MODULE config.settings.production -ENV C_FORCE_ROOT True -ENV OSMCHA_FRONTEND_VERSION v0.86.0-production - RUN echo "alias python=python3" >> ~/.bashrc RUN echo "alias pip=pip3" >> ~/.bashrc diff --git a/osm-seed/templates/osmcha-web/osmcha-web-deployment.yaml b/osm-seed/templates/osmcha-web/osmcha-web-deployment.yaml index 6419e516..50b4457a 100644 --- a/osm-seed/templates/osmcha-web/osmcha-web-deployment.yaml +++ b/osm-seed/templates/osmcha-web/osmcha-web-deployment.yaml @@ -103,6 +103,12 @@ spec: value: {{ .Values.osmchaWeb.env.DJANGO_ENABLE_CHANGESET_COMMENTS | quote }} - name: DJANGO_OSM_COMMENTS_API_KEY value: {{ .Values.osmchaWeb.env.DJANGO_OSM_COMMENTS_API_KEY | quote }} + - name: DJANGO_ROOT + value: {{ .Values.osmchaWeb.env.DJANGO_ROOT | quote }} + - name: DJANGO_SETTINGS_MODULE + value: {{ .Values.osmchaWeb.env.DJANGO_SETTINGS_MODULE | quote }} + - name: C_FORCE_ROOT + value: {{ .Values.osmchaWeb.env.C_FORCE_ROOT | quote }} {{- if .Values.osmchaWeb.nodeSelector.enabled }} nodeSelector: {{ .Values.osmchaWeb.nodeSelector.label_key }} : {{ .Values.osmchaWeb.nodeSelector.label_value }} diff --git a/osm-seed/values.yaml b/osm-seed/values.yaml index f0547d6d..1037a0a2 100644 --- a/osm-seed/values.yaml +++ b/osm-seed/values.yaml @@ -727,29 +727,33 @@ osmchaWeb: name: '' tag: '' env: - DJANGO_CACHES: xyz - DJANGO_DEBUG: xyz - DJANGO_SECRET_KEY: xyz - DJANGO_SECURE_BROWSER_XSS_FILTER: xyz - DJANGO_SECURE_SSL_REDIRECT: xyz - DJANGO_SECURE_CONTENT_TYPE_NOSNIFF: xyz - DJANGO_SECURE_FRAME_DENY: xyz - DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS: xyz - DJANGO_SESSION_COOKIE_HTTPONLY: xyz - DJANGO_SESSION_COOKIE_SECURE: xyz - DJANGO_DEFAULT_FROM_EMAIL: xyz - DJANGO_SERVER_EMAIL: xyz - DJANGO_EMAIL_SUBJECT_PREFIX: xyz - DJANGO_CHANGESETS_FILTER: xyz - OAUTH_OSM_KEY: xyz - OAUTH_OSM_SECRET: xyz - DJANGO_ANON_USER_THROTTLE_RATE: xyz - DJANGO_COMMON_USER_THROTTLE_RATE: xyz - DJANGO_NON_STAFF_USER_THROTTLE_RATE: xyz - OAUTH_REDIRECT_URI: xyz - OSMCHA_FRONTEND_VERSION: xyz - DJANGO_ENABLE_CHANGESET_COMMENTS: xyz - DJANGO_OSM_COMMENTS_API_KEY: xyz + OSM_SERVER_URL: 'https://staging.openstreetmap.org' + DJANGO_CACHES: "{'default': {'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'LOCATION': '127.0.0.1:11211'}}" + DJANGO_DEBUG: "False" + DJANGO_SECRET_KEY: {? {STAGING_OSMCHA_DJANGO_SECRET_KEY: ''} : ''} + DJANGO_SECURE_BROWSER_XSS_FILTER: "True" + DJANGO_SECURE_SSL_REDIRECT: "True" + DJANGO_SECURE_CONTENT_TYPE_NOSNIFF: "True" + DJANGO_SECURE_FRAME_DENY: "True" + DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS: "True" + DJANGO_SESSION_COOKIE_HTTPONLY: "True" + DJANGO_SESSION_COOKIE_SECURE: "True" + DJANGO_DEFAULT_FROM_EMAIL: "webmaster@openstreetmap.org" + DJANGO_SERVER_EMAIL: "server@openstreetmap.org" + DJANGO_EMAIL_SUBJECT_PREFIX: "osmcha" + DJANGO_CHANGESETS_FILTER: "{'some_filter_key': 'some_filter_value'}" + OAUTH_OSM_KEY: {? {STAGING_OSMCHA_CONSUMER_KEY: ''} : ''} + OAUTH_OSM_SECRET: {? {STAGING_OSMCHA_CONSUMER_SECRET: ''} : ''} + DJANGO_ANON_USER_THROTTLE_RATE: "10/h" + DJANGO_COMMON_USER_THROTTLE_RATE: "100/h" + DJANGO_NON_STAFF_USER_THROTTLE_RATE: "50/h" + OAUTH_REDIRECT_URI: https://osmcha.openstreetmap.org/oauth-landing.html + OSMCHA_FRONTEND_VERSION: "v0.86.0-production" + DJANGO_ENABLE_CHANGESET_COMMENTS: "True" + DJANGO_OSM_COMMENTS_API_KEY: "test" + DJANGO_ROOT: /app + DJANGO_SETTINGS_MODULE: config.settings.local + C_FORCE_ROOT: True resources: enabled: false requests: