Skip to content

Commit

Permalink
Update env vars for osmcha web
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Sep 12, 2023
1 parent 6a15ed5 commit 881151c
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 29 deletions.
6 changes: 5 additions & 1 deletion envs/.env.osmcha.example
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
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
5 changes: 0 additions & 5 deletions images/osmcha-web/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions osm-seed/templates/osmcha-web/osmcha-web-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
50 changes: 27 additions & 23 deletions osm-seed/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: "[email protected]"
DJANGO_SERVER_EMAIL: "[email protected]"
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:
Expand Down

0 comments on commit 881151c

Please sign in to comment.