diff --git a/compose/osmcha.yml b/compose/osmcha.yml index 5a1ae4e6..a0aa6cd1 100644 --- a/compose/osmcha.yml +++ b/compose/osmcha.yml @@ -1,6 +1,20 @@ version: '3' -services: - osmcha-db: +services: + web: + platform: linux/amd64 + image: developmentseed/osmseed-osmcha-web:v6 + build: + context: ../images/osmcha-web + dockerfile: Dockerfile + # command: > + # /bin/bash -c " + # ./start.sh + # " + env_file: + - ../envs/.env.osmcha + volumes: + - ../data/osmcha/staticfiles:/staticfiles + db: platform: linux/amd64 image: osmseed-osmcha-db:v1 build: @@ -12,13 +26,27 @@ services: - ../data/osmcha-db-data:/var/lib/postgresql/data env_file: - ../envs/.env.osmcha - osmcha-web: + api: platform: linux/amd64 - image: osmseed-osmcha-web:v1 + image: developmentseed/osmseed-osmcha-api:v3 build: - context: ../images/osmcha-web + context: ../images/osmcha-api dockerfile: Dockerfile ports: - - '8000:8000' + - '3000:3000' env_file: - ../envs/.env.osmcha + volumes: + - ../data/osmcha/staticfiles:/staticfiles + nginx: + platform: linux/amd64 + image: developmentseed/osmseed-osmcha-nginx:v1 + build: + context: ../images/osmcha-nginx + dockerfile: Dockerfile + ports: + - '80:80' + env_file: + - ../envs/.env.osmcha + volumes: + - ../data/osmcha/staticfiles:/staticfiles \ No newline at end of file diff --git a/images/osmcha-nginx/Dockerfile b/images/osmcha-nginx/Dockerfile new file mode 100644 index 00000000..2a2a6e9e --- /dev/null +++ b/images/osmcha-nginx/Dockerfile @@ -0,0 +1,5 @@ +FROM nginx:alpine +COPY config/mime.types /etc/nginx/ +COPY config/nginx.conf /etc/nginx/ + +# COPY --from=builder /app/build /assets \ No newline at end of file diff --git a/images/osmcha-nginx/config/mime.types b/images/osmcha-nginx/config/mime.types new file mode 100644 index 00000000..e043d2d5 --- /dev/null +++ b/images/osmcha-nginx/config/mime.types @@ -0,0 +1,16 @@ +types { + text/html html htm shtml; + text/css css; + text/xml xml; + image/gif gif; + image/jpeg jpeg jpg; + application/javascript js; + image/png png; + image/svg+xml svg svgz; + image/tiff tif tiff; + image/x-icon ico; + image/x-jng jng; + application/font-woff woff; + application/json json; + application/zip zip; +} diff --git a/images/osmcha-nginx/config/nginx.conf b/images/osmcha-nginx/config/nginx.conf new file mode 100644 index 00000000..1d492e0d --- /dev/null +++ b/images/osmcha-nginx/config/nginx.conf @@ -0,0 +1,55 @@ +worker_processes 4; + +events { + worker_connections 1024; +} + +http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + upstream app { + server host.docker.internal:5000; + } + + server { + listen 80; + charset utf-8; + + location ~ ^/static.* { + root /staticfiles; + try_files $uri @proxy_to_frontend; + } + + location @proxy_to_frontend { + root /assets; + try_files $uri @django; + } + + location / { + root /assets; + # checks for static file, if not found proxy to app + try_files $uri $uri/ @django; + } + + location @django { + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + # proxy_set_header Host $http_host; + proxy_redirect off; + proxy_pass http://app; + } + } +} diff --git a/images/osmcha-web/Dockerfile b/images/osmcha-web/Dockerfile index 736b40b5..a9fade89 100644 --- a/images/osmcha-web/Dockerfile +++ b/images/osmcha-web/Dockerfile @@ -13,9 +13,5 @@ RUN yarn install ENV REACT_APP_PRODUCTION_API_URL /api/v1 RUN yarn build:${BUILD_ENV} - -FROM nginx:alpine -# COPY config/nginx.conf /etc/nginx/ -# COPY config/mime.types /etc/nginx/ -# RUN nginx -t -COPY --from=builder /app/build /assets +COPY start.sh . +CMD [ "./start.sh" ] \ No newline at end of file diff --git a/images/osmcha-web/start.sh b/images/osmcha-web/start.sh index b37767e0..7408f7ff 100755 --- a/images/osmcha-web/start.sh +++ b/images/osmcha-web/start.sh @@ -1,15 +1,8 @@ #!/usr/bin/env bash set -ex +sed -i "s|https://osmcha.org|$OSMCHA_URL|g" package.json +yarn build:prod +cp -R build/* /staticfiles/ -# Build frontend -cd /osmcha-frontend -REACT_APP_VERSION=ohm REACT_APP_STACK=PRODUCTION PUBLIC_URL=$OSMCHA_URL npx react-scripts build -cp -R build/*.html /app/osmchadjango/frontend/templates/frontend/ -cp -R build/* /app/osmchadjango/static/ -cp -R build/static/* /app/osmchadjango/static/ - -# Start service -cd /app -python3 manage.py collectstatic --noinput -python3 manage.py migrate -supervisord -c /etc/supervisor/supervisord.conf +# mkdir -p /staticfiles/static/ +# chmod a+rw /staticfiles/static/ \ No newline at end of file diff --git a/osm-seed/templates/osmcha-app/configMap-works.yaml b/osm-seed/templates/osmcha-app/configMap-works.yaml new file mode 100644 index 00000000..2c9241f7 --- /dev/null +++ b/osm-seed/templates/osmcha-app/configMap-works.yaml @@ -0,0 +1,114 @@ +{{- if .Values.osmchaApi.enabled -}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-osmcha-common-env +data: + POSTGRES_HOST: {{ .Release.Name }}-osmcha-db + PGHOST: {{ .Release.Name }}-osmcha-db + POSTGRES_PORT: {{ .Values.osmchaDb.env.POSTGRES_PORT | quote }} + POSTGRES_USER: {{ .Values.osmchaDb.env.POSTGRES_USER | quote }} + POSTGRES_PASSWORD: {{ .Values.osmchaDb.env.POSTGRES_PASSWORD | quote }} + POSTGRES_DATABASE: {{ .Values.osmchaDb.env.POSTGRES_DB | quote }} + POSTGRES_DB: {{ .Values.osmchaDb.env.POSTGRES_DB | quote }} + + # POSTGRES_HOST: {{ .Release.Name }}-osmcha-db + # POSTGRES_PORT: "5432" + # POSTGRES_USER: {{ .Values.osmchaDb.env.POSTGRES_USER | quote }} + # POSTGRES_PASSWORD: {{ .Values.osmchaDb.env.POSTGRES_PASSWORD | quote }} + # POSTGRES_DATABASE: {{ .Values.osmchaDb.env.POSTGRES_DB | quote }} + + REDIS_URL: {{ .Release.Name }}-osmcha-redis + + DJANGO_SETTINGS_MODULE: "config.settings.production" + OSMCHA_FRONTEND_VERSION: "v0.86.0-production" + + + OSM_SERVER_URL: {{ .Values.osmchaDb.env.OSM_SERVER_URL | quote }} + POSTGRES_DB: {{ .Values.osmchaDb.env.POSTGRES_DB | quote }} + PGHOST: {{ .Release.Name }}-osmcha-db + DJANGO_SECRET_KEY: {{ .Values.osmchaApi.env.DJANGO_SECRET_KEY | quote }} + C_FORCE_ROOT: {{ .Values.osmchaApi.env.C_FORCE_ROOT | quote }} + OSMCHA_URL: {{ .Values.osmchaApi.env.OSMCHA_URL | quote }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-osmcha-nginx-config +data: + nginx.conf: | + worker_processes 4; + + events { + worker_connections 1024; + } + + http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + upstream app { + server localhost:3000; + } + + server { + listen 80; + charset utf-8; + + location ~ ^/static.* { + root /staticfiles; + try_files $uri @proxy_to_frontend; + } + + location @proxy_to_frontend { + root /assets; + try_files $uri @django; + } + + location / { + root /assets; + # checks for static file, if not found proxy to app + try_files $uri $uri/ @django; + } + + # cookiecutter-django app + location @django { + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_redirect off; + proxy_pass http://app; + } + } + } + mime.types: | + types { + text/html html htm shtml; + text/css css; + text/xml xml; + image/gif gif; + image/jpeg jpeg jpg; + application/javascript js; + image/png png; + image/svg+xml svg svgz; + image/tiff tif tiff; + image/x-icon ico; + image/x-jng jng; + application/font-woff woff; + application/json json; + application/zip zip; + } + +{{- end }} diff --git a/osm-seed/templates/osmcha-app/configMap.yaml b/osm-seed/templates/osmcha-app/configMap.yaml new file mode 100644 index 00000000..40c04b28 --- /dev/null +++ b/osm-seed/templates/osmcha-app/configMap.yaml @@ -0,0 +1,114 @@ +{{- if .Values.osmchaApi.enabled -}} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-osmcha-common-env +data: + # DB + POSTGRES_HOST: {{ .Release.Name }}-osmcha-db + PGHOST: {{ .Release.Name }}-osmcha-db + POSTGRES_PORT: "5432" + POSTGRES_USER: {{ .Values.osmchaDb.env.POSTGRES_USER | quote }} + POSTGRES_PASSWORD: {{ .Values.osmchaDb.env.POSTGRES_PASSWORD | quote }} + POSTGRES_DATABASE: {{ .Values.osmchaDb.env.POSTGRES_DB | quote }} + POSTGRES_DB: {{ .Values.osmchaDb.env.POSTGRES_DB | quote }} + # API + DJANGO_SECRET_KEY: {{ .Values.osmchaApi.env.DJANGO_SECRET_KEY | quote }} + DJANGO_SETTINGS_MODULE: {{ .Values.osmchaApi.env.DJANGO_SETTINGS_MODULE | quote }} + OSMCHA_FRONTEND_VERSION: {{ .Values.osmchaApi.env.OSMCHA_FRONTEND_VERSION | quote }} + OAUTH_OSM_KEY: {{ .Values.osmchaApi.env.OAUTH_OSM_KEY | quote }} + OAUTH_OSM_SECRET: {{ .Values.osmchaApi.env.OAUTH_OSM_SECRET | quote }} + OAUTH_REDIRECT_URI: {{ .Values.osmchaApi.env.OAUTH_REDIRECT_URI | quote }} + DJANGO_SECURE_SSL_REDIRECT: "False" + OSMCHA_URL: {{ .Values.osmchaApi.env.OSMCHA_URL | quote }} + DJANGO_DEBUG: "False" + DJANGO_ENV: "production" + OSM_SERVER_URL: {{ .Values.osmchaApi.env.OSM_SERVER_URL | quote }} + REDIS_URL: {{ .Release.Name }}-osmcha-redis + + DJANGO_DEBUG: "False" + DJANGO_ENV: "production" + # OSM_SERVER_URL: {{ .Values.osmchaApi.env.OSM_SERVER_URL | quote }} + REDIS_URL: {{ .Release.Name }}-osmcha-redis +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Release.Name }}-osmcha-nginx-config +data: + nginx.conf: | + worker_processes 4; + + events { + worker_connections 1024; + } + + http { + include /etc/nginx/mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log /var/log/nginx/access.log main; + + sendfile on; + #tcp_nopush on; + + keepalive_timeout 65; + + #gzip on; + + upstream app { + server localhost:5000; + } + + server { + listen 80; + charset utf-8; + + location ~ ^/static.* { + root /staticfiles; + try_files $uri @proxy_to_frontend; + } + + location @proxy_to_frontend { + root /assets; + try_files $uri @django; + } + + location / { + root /assets; + # checks for static file, if not found proxy to app + try_files $uri $uri/ @django; + } + + # cookiecutter-django app + location @django { + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_redirect off; + proxy_pass http://app; + } + } + } + mime.types: | + types { + text/html html htm shtml; + text/css css; + text/xml xml; + image/gif gif; + image/jpeg jpeg jpg; + application/javascript js; + image/png png; + image/svg+xml svg svgz; + image/tiff tif tiff; + image/x-icon ico; + image/x-jng jng; + application/font-woff woff; + application/json json; + application/zip zip; + } + +{{- end }} diff --git a/osm-seed/templates/osmcha-app/deployment.yaml b/osm-seed/templates/osmcha-app/deployment.yaml new file mode 100644 index 00000000..bbfca72a --- /dev/null +++ b/osm-seed/templates/osmcha-app/deployment.yaml @@ -0,0 +1,115 @@ +{{- if .Values.osmchaApi.enabled -}} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-osmcha-app + labels: + app: {{ template "osm-seed.name" . }} + component: osmcha-app-deployment + environment: {{ .Values.environment }} + release: {{ .Release.Name }} +spec: + replicas: {{ .Values.osmchaApi.replicaCount }} + selector: + matchLabels: + app: {{ template "osm-seed.name" . }} + release: {{ .Release.Name }} + run: {{ .Release.Name }}-osmcha-app + template: + metadata: + labels: + app: {{ template "osm-seed.name" . }} + release: {{ .Release.Name }} + run: {{ .Release.Name }}-osmcha-app + spec: + initContainers: + - name: web-init + image: "{{ .Values.osmchaWeb.image.name }}:{{ .Values.osmchaWeb.image.tag }}" + envFrom: + - configMapRef: + name: {{ .Release.Name }}-osmcha-common-env + volumeMounts: + - name: staticfiles + mountPath: /staticfiles + - name: osmcha-init + image: "{{ .Values.osmchaApi.image.name }}:{{ .Values.osmchaApi.image.tag }}" + command: + - /bin/sh + - -c + - | + set -x + python manage.py collectstatic + python manage.py migrate + mkdir -p /staticfiles/static + python manage.py migrate + cp -r /app/staticfiles/* /staticfiles/static/ + envFrom: + - configMapRef: + name: {{ .Release.Name }}-osmcha-common-env + volumeMounts: + - name: staticfiles + mountPath: /staticfiles + securityContext: + runAsUser: 0 + containers: + - name: osmcha-api + image: "{{ .Values.osmchaApi.image.name }}:{{ .Values.osmchaApi.image.tag }}" + command: + - gunicorn + - "--workers" + - "4" + - "--bind" + - 0.0.0.0:5000 + - --log-file + - "log-file.log" + - --access-logfile + - "access-logfile.log" + - config.wsgi + ports: + - containerPort: 5000 + livenessProbe: + httpGet: + path: / + port: 5000 + initialDelaySeconds: 60 + timeoutSeconds: 30 + envFrom: + - configMapRef: + name: {{ .Release.Name }}-osmcha-common-env + volumeMounts: + - name: staticfiles + mountPath: /staticfiles + {{- if .Values.osmchaApi.resources.enabled }} + resources: + requests: + memory: {{ .Values.osmchaApi.resources.requests.memory }} + cpu: {{ .Values.osmchaApi.resources.requests.cpu }} + limits: + memory: {{ .Values.osmchaApi.resources.limits.memory }} + cpu: {{ .Values.osmchaApi.resources.limits.cpu }} + {{- end }} + - name: osmcha-nginx + image: "nginx:alpine" + volumeMounts: + - name: osmcha-frontend-nginx-config + mountPath: /etc/nginx + readOnly: true + - name: staticfiles + mountPath: /staticfiles + # ports: + # - name: http + # containerPort: 80 + # protocol: TCP + volumes: + - name: staticfiles + emptyDir: {} + - name: osmcha-frontend-nginx-config + configMap: + name: {{ .Release.Name }}-osmcha-nginx-config + defaultMode: 0777 + {{- if .Values.osmchaApi.nodeSelector.enabled }} + nodeSelector: + {{ .Values.osmchaApi.nodeSelector.label_key }} : {{ .Values.osmchaApi.nodeSelector.label_value }} + {{- end }} +{{- end }} + diff --git a/osm-seed/templates/osmcha-web/osmcha-web-ingress.yaml b/osm-seed/templates/osmcha-app/ingress.yaml similarity index 71% rename from osm-seed/templates/osmcha-web/osmcha-web-ingress.yaml rename to osm-seed/templates/osmcha-app/ingress.yaml index cf2df4bc..7360e2d1 100644 --- a/osm-seed/templates/osmcha-web/osmcha-web-ingress.yaml +++ b/osm-seed/templates/osmcha-app/ingress.yaml @@ -1,8 +1,8 @@ -{{- if and .Values.osmchaWeb.enabled (eq .Values.serviceType "ClusterIP") }} +{{- if and .Values.osmchaApi.enabled (eq .Values.serviceType "ClusterIP") }} apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: {{ template "osm-seed.fullname" . }}-ingress-osmcha-web + name: {{ template "osm-seed.fullname" . }}-ingress-osmcha-app annotations: kubernetes.io/ingress.class: nginx cert-manager.io/cluster-issuer: letsencrypt-prod-issuer @@ -20,7 +20,7 @@ spec: pathType: Prefix backend: service: - name: {{ template "osm-seed.fullname" . }}-osmcha-web + name: {{ template "osm-seed.fullname" . }}-osmcha-app port: number: 80 -{{- end }} \ No newline at end of file +{{- end }} diff --git a/osm-seed/templates/osmcha-web/osmcha-web-service.yaml b/osm-seed/templates/osmcha-app/service.yaml similarity index 82% rename from osm-seed/templates/osmcha-web/osmcha-web-service.yaml rename to osm-seed/templates/osmcha-app/service.yaml index 612a35ab..343c3183 100644 --- a/osm-seed/templates/osmcha-web/osmcha-web-service.yaml +++ b/osm-seed/templates/osmcha-app/service.yaml @@ -1,11 +1,11 @@ -{{- if .Values.osmchaWeb.enabled -}} +{{- if .Values.osmchaApi.enabled -}} apiVersion: v1 kind: Service metadata: - name: {{ template "osm-seed.fullname" . }}-osmcha-web + name: {{ template "osm-seed.fullname" . }}-osmcha-app labels: app: {{ template "osm-seed.name" . }} - component: osmcha-web-service + component: osmcha-app-service environment: {{ .Values.environment }} release: {{ .Release.Name }} annotations: @@ -20,7 +20,7 @@ metadata: {{- else }} fake.annotation: fake {{- end }} - {{- with .Values.osmchaWeb.serviceAnnotations }} + {{- with .Values.osmchaApi.serviceAnnotations }} {{- toYaml . | nindent 4 }} {{- end }} spec: @@ -39,5 +39,6 @@ spec: selector: app: {{ template "osm-seed.name" . }} release: {{ .Release.Name }} - run: {{ .Release.Name }}-osmcha-web -{{- end }} \ No newline at end of file + run: {{ .Release.Name }}-osmcha-app +{{- end }} + diff --git a/osm-seed/templates/osmcha-redis/deployment.yaml b/osm-seed/templates/osmcha-redis/deployment.yaml new file mode 100644 index 00000000..b85f66e0 --- /dev/null +++ b/osm-seed/templates/osmcha-redis/deployment.yaml @@ -0,0 +1,22 @@ +{{- if .Values.osmchaRedis.enabled -}} + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }}-osmcha-redis +spec: + replicas: 1 + selector: + matchLabels: + app: {{ .Release.Name }}-osmcha-redis + template: + metadata: + labels: + app: {{ .Release.Name }}-osmcha-redis + spec: + containers: + - name: redis + image: "{{ .Values.osmchaRedis.image.name }}:{{ .Values.osmchaRedis.image.tag }}" + ports: + - containerPort: {{ .Values.osmchaRedis.port }} +{{- end }} diff --git a/osm-seed/templates/osmcha-redis/service.yaml b/osm-seed/templates/osmcha-redis/service.yaml new file mode 100644 index 00000000..9a21eb3c --- /dev/null +++ b/osm-seed/templates/osmcha-redis/service.yaml @@ -0,0 +1,14 @@ +{{- if .Values.osmchaRedis.enabled -}} +apiVersion: v1 +kind: Service +metadata: + name: {{ .Release.Name }}-osmcha-redis +spec: + ports: + - port: {{ .Values.osmchaRedis.port }} + targetPort: {{ .Values.osmchaRedis.port }} + protocol: TCP + name: redis + selector: + app: {{ .Release.Name }}-osmcha-redis +{{- end }} diff --git a/osm-seed/templates/osmcha-web/osmcha-web-deployment.yaml b/osm-seed/templates/osmcha-web/osmcha-web-deployment.yaml deleted file mode 100644 index 81a86f9c..00000000 --- a/osm-seed/templates/osmcha-web/osmcha-web-deployment.yaml +++ /dev/null @@ -1,127 +0,0 @@ -{{- if .Values.osmchaWeb.enabled -}} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }}-osmcha-web - labels: - app: {{ template "osm-seed.name" . }} - component: osmcha-web-deployment - environment: {{ .Values.environment }} - release: {{ .Release.Name }} -spec: - replicas: {{ .Values.osmchaWeb.replicaCount }} - selector: - matchLabels: - app: {{ template "osm-seed.name" . }} - release: {{ .Release.Name }} - run: {{ .Release.Name }}-osmcha-web - template: - metadata: - labels: - app: {{ template "osm-seed.name" . }} - release: {{ .Release.Name }} - run: {{ .Release.Name }}-osmcha-web - spec: - containers: - - name: {{ .Chart.Name }}-osmcha-web - image: "{{ .Values.osmchaWeb.image.name }}:{{ .Values.osmchaWeb.image.tag }}" - ports: - - name: http - containerPort: 5000 - protocol: TCP - livenessProbe: - httpGet: - path: / - port: 5000 - initialDelaySeconds: 600 # 10 min, because the compile process takes time. - timeoutSeconds: 30 - {{- if .Values.osmchaWeb.resources.enabled }} - resources: - requests: - memory: {{ .Values.osmchaWeb.resources.requests.memory }} - cpu: {{ .Values.osmchaWeb.resources.requests.cpu }} - limits: - memory: {{ .Values.osmchaWeb.resources.limits.memory }} - cpu: {{ .Values.osmchaWeb.resources.limits.cpu }} - {{- end }} - env: - - name: OSM_SERVER_URL - value: {{ .Values.osmchaDb.env.OSM_SERVER_URL | quote }} - - name: POSTGRES_USER - value: {{ .Values.osmchaDb.env.POSTGRES_USER | quote }} - - name: POSTGRES_PASSWORD - value: {{ .Values.osmchaDb.env.POSTGRES_PASSWORD | quote }} - - name: POSTGRES_DB - value: {{ .Values.osmchaDb.env.POSTGRES_DB | quote }} - - name: PGHOST - value: {{ .Release.Name }}-osmcha-db - - name: POSTGRES_HOST - value: {{ .Release.Name }}-osmcha-db - - name: DJANGO_CACHES - value: {{ .Values.osmchaWeb.env.DJANGO_CACHES | quote }} - - name: DJANGO_DEBUG - value: {{ .Values.osmchaWeb.env.DJANGO_DEBUG | quote }} - - name: DJANGO_SECRET_KEY - value: {{ .Values.osmchaWeb.env.DJANGO_SECRET_KEY | quote }} - - name: DJANGO_SECURE_BROWSER_XSS_FILTER - value: {{ .Values.osmchaWeb.env.DJANGO_SECURE_BROWSER_XSS_FILTER | quote }} - - name: DJANGO_SECURE_SSL_REDIRECT - value: {{ .Values.osmchaWeb.env.DJANGO_SECURE_SSL_REDIRECT | quote }} - - name: DJANGO_SECURE_CONTENT_TYPE_NOSNIFF - value: {{ .Values.osmchaWeb.env.DJANGO_SECURE_CONTENT_TYPE_NOSNIFF | quote }} - - name: DJANGO_SECURE_FRAME_DENY - value: {{ .Values.osmchaWeb.env.DJANGO_SECURE_FRAME_DENY | quote }} - - name: DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS - value: {{ .Values.osmchaWeb.env.DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS | quote }} - - name: DJANGO_SESSION_COOKIE_HTTPONLY - value: {{ .Values.osmchaWeb.env.DJANGO_SESSION_COOKIE_HTTPONLY | quote }} - - name: DJANGO_SESSION_COOKIE_SECURE - value: {{ .Values.osmchaWeb.env.DJANGO_SESSION_COOKIE_SECURE | quote }} - - name: DJANGO_DEFAULT_FROM_EMAIL - value: {{ .Values.osmchaWeb.env.DJANGO_DEFAULT_FROM_EMAIL | quote }} - - name: DJANGO_SERVER_EMAIL - value: {{ .Values.osmchaWeb.env.DJANGO_SERVER_EMAIL | quote }} - - name: DJANGO_EMAIL_SUBJECT_PREFIX - value: {{ .Values.osmchaWeb.env.DJANGO_EMAIL_SUBJECT_PREFIX | quote }} - - name: DJANGO_CHANGESETS_FILTER - value: {{ .Values.osmchaWeb.env.DJANGO_CHANGESETS_FILTER | quote }} - - name: OAUTH_OSM_KEY - value: {{ .Values.osmchaWeb.env.OAUTH_OSM_KEY | quote }} - - name: OAUTH_OSM_SECRET - value: {{ .Values.osmchaWeb.env.OAUTH_OSM_SECRET | quote }} - - name: DJANGO_ANON_USER_THROTTLE_RATE - value: {{ .Values.osmchaWeb.env.DJANGO_ANON_USER_THROTTLE_RATE | quote }} - - name: DJANGO_COMMON_USER_THROTTLE_RATE - value: {{ .Values.osmchaWeb.env.DJANGO_COMMON_USER_THROTTLE_RATE | quote }} - - name: DJANGO_NON_STAFF_USER_THROTTLE_RATE - value: {{ .Values.osmchaWeb.env.DJANGO_NON_STAFF_USER_THROTTLE_RATE | quote }} - - name: OAUTH_REDIRECT_URI - value: {{ .Values.osmchaWeb.env.OAUTH_REDIRECT_URI | quote }} - - name: OSMCHA_FRONTEND_VERSION - value: {{ .Values.osmchaWeb.env.OSMCHA_FRONTEND_VERSION | quote }} - - name: DJANGO_ENABLE_CHANGESET_COMMENTS - 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 }} - - name: REACT_APP_OSM_URL - value: {{ .Values.osmchaWeb.env.REACT_APP_OSM_URL | quote }} - - name: REACT_APP_OSM_API - value: {{ .Values.osmchaWeb.env.REACT_APP_OSM_API | quote }} - - name: REACT_APP_OVERPASS_BASE - value: {{ .Values.osmchaWeb.env.REACT_APP_OVERPASS_BASE | quote }} - - name: REACT_APP_NOMINATIM_URL - value: {{ .Values.osmchaWeb.env.REACT_APP_NOMINATIM_URL | quote }} - - name: OSMCHA_URL - value: {{ .Values.osmchaWeb.env.OSMCHA_URL | quote }} - {{- if .Values.osmchaWeb.nodeSelector.enabled }} - nodeSelector: - {{ .Values.osmchaWeb.nodeSelector.label_key }} : {{ .Values.osmchaWeb.nodeSelector.label_value }} - {{- end }} -{{- end }} - diff --git a/osm-seed/values.yaml b/osm-seed/values.yaml index 570e0e0c..0745ac8a 100644 --- a/osm-seed/values.yaml +++ b/osm-seed/values.yaml @@ -15,7 +15,7 @@ cloudProvider: minikube AWS_S3_BUCKET: s3://osm-seed # ==================================================================================================== -# GCP: In case you are using the cloudProvider=gcp set the below variables, We are assuming the nodes has a policies to upload files to cloud storage +# GCP: In case you are using the cloudProvider=gcp set the below variables, We are assuming the nodes has a policies to upload files to cloud storage # ==================================================================================================== GCP_STORAGE_BUCKET: gs://osm-seed-test @@ -44,9 +44,9 @@ AWS_SSL_ARN: false # If you specify `LoadBalancer` as the service type, if you also specify # an `AWS_SSL_ARN` that is a wildcart certificate, that will be configured # as the SSL certificate for your services. Else, you will need to configure -# SSL separately. -serviceType: NodePort - +# SSL separately. +# serviceType: NodePort +serviceType: LoadBalancer # Domain that is pointed to the clusterIP # You will need to create an A record like *.osmseed.example.com pointed to the ClusterIP @@ -77,12 +77,12 @@ adminEmail: admin@example.com db: enabled: false image: - name: '' - tag: '' + name: "" + tag: "" env: POSTGRES_DB: openstreetmap POSTGRES_USER: postgres - POSTGRES_PASSWORD: '1234' + POSTGRES_PASSWORD: "1234" persistenceDisk: enabled: false mountPath: /var/lib/postgresql/data @@ -103,11 +103,11 @@ db: resources: enabled: false requests: - memory: '1Gi' - cpu: '1' + memory: "1Gi" + cpu: "1" limits: - memory: '2Gi' - cpu: '1' + memory: "2Gi" + cpu: "1" nodeSelector: enabled: false sharedMemorySize: 64Mi @@ -117,29 +117,29 @@ db: web: enabled: false image: - name: '' - tag: '' + name: "" + tag: "" replicaCount: 1 serviceAnnotations: {} env: MAILER_ADDRESS: smtp.gmail.com MAILER_DOMAIN: gmail.com MAILER_USERNAME: example@gmail.com - MAILER_PASSWORD: '1234' + MAILER_PASSWORD: "1234" MAILER_FROM: no-reply@example.com MAILER_PORT: 25 - NOMINATIM_URL: 'nominatim' - OVERPASS_URL: 'overpassApi' - OAUTH_CLIENT_ID: 'abcd' # Create client ID and key as OAuth2 Application - OAUTH_KEY: 'xyz' + NOMINATIM_URL: "nominatim" + OVERPASS_URL: "overpassApi" + OAUTH_CLIENT_ID: "abcd" # Create client ID and key as OAuth2 Application + OAUTH_KEY: "xyz" resources: enabled: false requests: - memory: '1Gi' - cpu: '2' + memory: "1Gi" + cpu: "2" limits: - memory: '2Gi' - cpu: '2' + memory: "2Gi" + cpu: "2" nodeSelector: enabled: false autoscaling: @@ -161,11 +161,11 @@ memcached: resources: enabled: false requests: - memory: '8Gi' - cpu: '2' + memory: "8Gi" + cpu: "2" limits: - memory: '8Gi' - cpu: '2' + memory: "8Gi" + cpu: "2" # ==================================================================================================== # Variables for id-editor @@ -179,13 +179,13 @@ idEditor: fullHistory: enabled: false image: - name: '' - tag: '' + name: "" + tag: "" nodeSelector: enabled: false label_key: nodegroup-type label_value: ohm-non-tiler - schedule: '* * * * *' + schedule: "* * * * *" env: OVERWRITE_FHISTORY_FILE: false resources: @@ -202,57 +202,57 @@ fullHistory: # ==================================================================================================== dbBackupRestore: image: - name: 'developmentseed/osmseed-backup-restore' - tag: '0.1.0-0.dev.git.942.h994af82' + name: "developmentseed/osmseed-backup-restore" + tag: "0.1.0-0.dev.git.942.h994af82" cronjobs: - - name: web-db - enabled: false - schedule: '* * * * *' - env: - # DB action: backup/restore - DB_ACTION: backup - # Naming backup files - SET_DATE_AT_NAME: true - BACKUP_CLOUD_FOLDER: database/web-db - BACKUP_CLOUD_FILE: osmseed-api-web-db - AWS_S3_BUCKET: secure-bucket - # Clean up backups options - CLEANUP_BACKUPS: true - RETENTION_DAYS: "30" - resources: - enabled: false - requests: - memory: '300Mi' - cpu: '0.5' - limits: - memory: '400Mi' - cpu: '0.6' - nodeSelector: + - name: web-db enabled: false - - name: osmcha-db - enabled: false - schedule: '* * * * *' - env: - # DB action: backup/restore - DB_ACTION: backup - # Naming backup files - SET_DATE_AT_NAME: true - BACKUP_CLOUD_FOLDER: database/osmcha-db - BACKUP_CLOUD_FILE: osmseed-osmcha-db - AWS_S3_BUCKET: secure-bucket - # Clean up backups options - CLEANUP_BACKUPS: true - RETENTION_DAYS: "30" - resources: - enabled: false - requests: - memory: '300Mi' - cpu: '0.5' - limits: - memory: '400Mi' - cpu: '0.6' - nodeSelector: + schedule: "* * * * *" + env: + # DB action: backup/restore + DB_ACTION: backup + # Naming backup files + SET_DATE_AT_NAME: true + BACKUP_CLOUD_FOLDER: database/web-db + BACKUP_CLOUD_FILE: osmseed-api-web-db + AWS_S3_BUCKET: secure-bucket + # Clean up backups options + CLEANUP_BACKUPS: true + RETENTION_DAYS: "30" + resources: + enabled: false + requests: + memory: "300Mi" + cpu: "0.5" + limits: + memory: "400Mi" + cpu: "0.6" + nodeSelector: + enabled: false + - name: osmcha-db enabled: false + schedule: "* * * * *" + env: + # DB action: backup/restore + DB_ACTION: backup + # Naming backup files + SET_DATE_AT_NAME: true + BACKUP_CLOUD_FOLDER: database/osmcha-db + BACKUP_CLOUD_FILE: osmseed-osmcha-db + AWS_S3_BUCKET: secure-bucket + # Clean up backups options + CLEANUP_BACKUPS: true + RETENTION_DAYS: "30" + resources: + enabled: false + requests: + memory: "300Mi" + cpu: "0.5" + limits: + memory: "400Mi" + cpu: "0.6" + nodeSelector: + enabled: false # ==================================================================================================== # Variables for osm-seed for osmosis, this configuration os to get the planet dump files from apidb @@ -260,19 +260,19 @@ dbBackupRestore: planetDump: enabled: false image: - name: '' - tag: '' - schedule: '* * * * *' + name: "" + tag: "" + schedule: "* * * * *" env: OVERWRITE_PLANET_FILE: false resources: enabled: false requests: - memory: '14Gi' - cpu: '4' + memory: "14Gi" + cpu: "4" limits: - memory: '16Gi' - cpu: '4' + memory: "16Gi" + cpu: "4" nodeSelector: enabled: false @@ -282,16 +282,16 @@ planetDump: replicationJob: enabled: false image: - name: '' - tag: '' + name: "" + tag: "" resources: enabled: false requests: - memory: '20Gi' - cpu: '8' + memory: "20Gi" + cpu: "8" limits: - memory: '24Gi' - cpu: '10' + memory: "24Gi" + cpu: "10" nodeSelector: enabled: false @@ -301,18 +301,18 @@ replicationJob: populateApidb: enabled: false image: - name: '' - tag: '' + name: "" + tag: "" env: - URL_FILE_TO_IMPORT: 'http://download.geofabrik.de/europe/monaco-latest.osm.pbf' + URL_FILE_TO_IMPORT: "http://download.geofabrik.de/europe/monaco-latest.osm.pbf" resources: enabled: false requests: - memory: '1Gi' - cpu: '2' + memory: "1Gi" + cpu: "2" limits: - memory: '2Gi' - cpu: '2.5' + memory: "2Gi" + cpu: "2.5" # ==================================================================================================== # Variables to start a pod to process osm files @@ -320,19 +320,19 @@ populateApidb: osmProcessor: enabled: false image: - name: '' - tag: '' + name: "" + tag: "" env: - URL_FILE_TO_PROCESS: 'http://download.geofabrik.de/europe/monaco-latest.osm.pbf' + URL_FILE_TO_PROCESS: "http://download.geofabrik.de/europe/monaco-latest.osm.pbf" OSM_FILE_ACTION: simple_pbf resources: enabled: false requests: - memory: '14Gi' - cpu: '4' + memory: "14Gi" + cpu: "4" limits: - memory: '16Gi' - cpu: '4' + memory: "16Gi" + cpu: "4" # ==================================================================================================== # Variables for tiler-db @@ -340,13 +340,13 @@ osmProcessor: tilerDb: enabled: false image: - name: '' - tag: '' + name: "" + tag: "" env: POSTGRES_HOST: tiler-db POSTGRES_DB: tiler-osm POSTGRES_USER: postgres - POSTGRES_PASSWORD: '1234' + POSTGRES_PASSWORD: "1234" POSTGRES_PORT: 5432 POSTGRES_DB_MAX_CONNECTIONS: 100 POSTGRES_DB_SHARED_BUFFERS: 128MB @@ -370,11 +370,11 @@ tilerDb: resources: enabled: false requests: - memory: '1Gi' - cpu: '2' + memory: "1Gi" + cpu: "2" limits: - memory: '2Gi' - cpu: '2.5' + memory: "2Gi" + cpu: "2.5" nodeSelector: enabled: false label_key: nodegroup_type @@ -386,8 +386,8 @@ tilerDb: tilerImposm: enabled: false image: - name: '' - tag: '' + name: "" + tag: "" env: TILER_IMPORT_FROM: osm TILER_IMPORT_PBF_URL: http://download.geofabrik.de/europe/monaco-latest.osm.pbf @@ -408,11 +408,11 @@ tilerImposm: resources: enabled: false requests: - memory: '20Gi' - cpu: '8' + memory: "20Gi" + cpu: "8" limits: - memory: '24Gi' - cpu: '10' + memory: "24Gi" + cpu: "10" nodeSelector: enabled: false label_key: nodegroup_type @@ -423,8 +423,8 @@ tilerImposm: tilerServer: enabled: false image: - name: '' - tag: '' + name: "" + tag: "" replicaCount: 1 serviceAnnotations: {} env: @@ -437,7 +437,7 @@ tilerServer: TILER_CACHE_REGION: us-east-1 TILER_CACHE_AWS_ACCESS_KEY_ID: xyz TILER_CACHE_AWS_SECRET_ACCESS_KEY: xyz/q - command: './start.sh' # ./start.sh & ./tile_cache_downloader.sh & ./expire-watcher.sh + command: "./start.sh" # ./start.sh & ./tile_cache_downloader.sh & ./expire-watcher.sh # In case you use TILER_CACHE_TYPE: file with persistenceDisk persistenceDisk: enabled: false @@ -455,30 +455,30 @@ tilerServer: resources: enabled: false requests: - memory: '1Gi' - cpu: '2' + memory: "1Gi" + cpu: "2" limits: - memory: '2Gi' - cpu: '2' + memory: "2Gi" + cpu: "2" nodeSelector: enabled: false label_key: nodegroup_type label_value: tiler # ==================================================================================================== -# Variables for tiler-server cache cleaner, only avaliable in case the TILER_CACHE_TYPE = s3 +# Variables for tiler-server cache cleaner, only avaliable in case the TILER_CACHE_TYPE = s3 # ==================================================================================================== tilerServerCacheCleaner: enabled: false replicaCount: 1 - command: './tile_cache_downloader.sh & ./expire-watcher.sh' + command: "./tile_cache_downloader.sh & ./expire-watcher.sh" resources: enabled: false requests: - memory: '1Gi' - cpu: '2' + memory: "1Gi" + cpu: "2" limits: - memory: '2Gi' - cpu: '2' + memory: "2Gi" + cpu: "2" env: KILL_PROCESS: manually MAX_NUM_PS: 3 @@ -498,8 +498,8 @@ tilerServerCacheCleaner: tilerVisor: enabled: false image: - name: '' - tag: '' + name: "" + tag: "" serviceAnnotations: {} replicaCount: 1 env: @@ -508,11 +508,11 @@ tilerVisor: resources: enabled: false requests: - memory: '1Gi' - cpu: '2' + memory: "1Gi" + cpu: "2" limits: - memory: '2Gi' - cpu: '2' + memory: "2Gi" + cpu: "2" nodeSelector: enabled: false label_key: nodegroup_type @@ -524,48 +524,47 @@ tilerVisor: tmApi: enabled: false image: - name: '' - tag: '' + name: "" + tag: "" nodeSelector: enabled: false replicaCount: 1 serviceAnnotations: {} env: - POSTGRES_HOST: 'tm' - POSTGRES_DB: 'tm' - POSTGRES_PASSWORD: 'tm' - POSTGRES_USER: 'postgres' + POSTGRES_HOST: "tm" + POSTGRES_DB: "tm" + POSTGRES_PASSWORD: "tm" + POSTGRES_USER: "postgres" POSTGRES_PORT: 5432 - TM_ORG_NAME: 'OpenStreetMap' - TM_ORG_CODE: 'OSM' - TM_ORG_URL: 'openstreetmap.org' - TM_ORG_PRIVACY_POLICY_URL: 'openstreetmap.org/copyright' - TM_ORG_GITHUB: 'github.com/openstreetmap' - OSM_SERVER_URL: 'https://openstreetmap.org' - OSM_NOMINATIM_SERVER_URL: 'https://nominatim.openstreetmap.org' - OSM_REGISTER_URL: 'https://openstreetmap.org/user/new' - ID_EDITOR_URL: 'https://openstreetmap.org/edit?editor=id' - POTLATCH2_EDITOR_URL: 'https://openstreetmap.org/edit?editor=potlatch2' - TM_SECRET: 's0m3l0ngr4nd0mstr1ng-b3cr34tiv3' - TM_CONSUMER_KEY: 'example' - TM_CONSUMER_SECRET: 'example' - TM_EMAIL_FROM_ADDRESS: 'no-reply@openstreetmap.org' - TM_SMTP_HOST: 'email-smtp.us-east-1.amazonaws.com' + TM_ORG_NAME: "OpenStreetMap" + TM_ORG_CODE: "OSM" + TM_ORG_URL: "openstreetmap.org" + TM_ORG_PRIVACY_POLICY_URL: "openstreetmap.org/copyright" + TM_ORG_GITHUB: "github.com/openstreetmap" + OSM_SERVER_URL: "https://openstreetmap.org" + OSM_NOMINATIM_SERVER_URL: "https://nominatim.openstreetmap.org" + OSM_REGISTER_URL: "https://openstreetmap.org/user/new" + ID_EDITOR_URL: "https://openstreetmap.org/edit?editor=id" + POTLATCH2_EDITOR_URL: "https://openstreetmap.org/edit?editor=potlatch2" + TM_SECRET: "s0m3l0ngr4nd0mstr1ng-b3cr34tiv3" + TM_CONSUMER_KEY: "example" + TM_CONSUMER_SECRET: "example" + TM_EMAIL_FROM_ADDRESS: "no-reply@openstreetmap.org" + TM_SMTP_HOST: "email-smtp.us-east-1.amazonaws.com" TM_SMTP_PORT: 25 - TM_SMTP_USER: '' - TM_SMTP_PASSWORD: '' - TM_DEFAULT_LOCALE: 'en' - TM_APP_API_URL: '' - TM_APP_BASE_URL: '' + TM_SMTP_USER: "" + TM_SMTP_PASSWORD: "" + TM_DEFAULT_LOCALE: "en" + TM_APP_API_URL: "" + TM_APP_BASE_URL: "" resources: enabled: false requests: - memory: '1Gi' - cpu: '2' + memory: "1Gi" + cpu: "2" limits: - memory: '2Gi' - cpu: '2' - + memory: "2Gi" + cpu: "2" # ==================================================================================================== # Variables for nominatim api @@ -573,8 +572,8 @@ tmApi: nominatimApi: enabled: false image: - name: '' - tag: '' + name: "" + tag: "" serviceAnnotations: {} replicaCount: 1 env: @@ -596,11 +595,11 @@ nominatimApi: resources: enabled: false requests: - memory: '1Gi' - cpu: '2' + memory: "1Gi" + cpu: "2" limits: - memory: '2Gi' - cpu: '2' + memory: "2Gi" + cpu: "2" persistenceDisk: enabled: true accessMode: ReadWriteOnce @@ -624,17 +623,17 @@ nominatimApi: overpassApi: enabled: false image: - name: '' - tag: '' + name: "" + tag: "" serviceAnnotations: {} env: - OVERPASS_META: 'yes' + OVERPASS_META: "yes" OVERPASS_MODE: init OVERPASS_PLANET_URL: http://download.geofabrik.de/europe/monaco-latest.osm.bz2 OVERPASS_DIFF_URL: http://download.openstreetmap.fr/replication/europe/monaco/minute/ OVERPASS_RULES_LOAD: 10 #OVERPASS_PLANET_PREPROCESS: 'mv /db/planet.osm.bz2 /db/planet.osm.pbf && osmium cat -o /db/planet.osm.bz2 /db/planet.osm.pbf && rm /db/planet.osm.pbf' # it is in case we pass planet files as PBF file uncommment this line - OVERPASS_PLANET_PREPROCESS: 'ls' + OVERPASS_PLANET_PREPROCESS: "ls" OVERPASS_REPLICATION_SEQUENCE_NUMBER: 5201000 persistenceDisk: enabled: false @@ -652,11 +651,11 @@ overpassApi: resources: enabled: false requests: - memory: '1Gi' - cpu: '2' + memory: "1Gi" + cpu: "2" limits: - memory: '2Gi' - cpu: '2' + memory: "2Gi" + cpu: "2" nodeSelector: enabled: false # ==================================================================================================== @@ -665,8 +664,8 @@ overpassApi: taginfo: enabled: false image: - name: '' - tag: '' + name: "" + tag: "" serviceAnnotations: {} env: URL_PLANET_FILE_STATE: https://planet.osm.org/pbf/state.txt @@ -679,16 +678,16 @@ taginfo: INSTANCE_ICON: /img/logo/world.png INSTANCE_CONTACT: Anonymous TAGINFO_PROJECT_REPO: https://github.com/taginfo/taginfo-projects.git - DOWNLOAD_DB: 'languages wiki' - CREATE_DB: 'db projects chronology' + DOWNLOAD_DB: "languages wiki" + CREATE_DB: "db projects chronology" resources: enabled: false requests: - memory: '1Gi' - cpu: '2' + memory: "1Gi" + cpu: "2" limits: - memory: '2Gi' - cpu: '2' + memory: "2Gi" + cpu: "2" nodeSelector: enabled: false # ==================================================================================================== @@ -697,17 +696,17 @@ taginfo: osmSimpleMetrics: enabled: false image: - name: '' - tag: '' - schedule: '* */1 * * *' + name: "" + tag: "" + schedule: "* */1 * * *" resources: enabled: false requests: - memory: '1Gi' - cpu: '2' + memory: "1Gi" + cpu: "2" limits: - memory: '2Gi' - cpu: '2' + memory: "2Gi" + cpu: "2" nodeSelector: enabled: false @@ -717,20 +716,20 @@ osmSimpleMetrics: monitoringReplication: enabled: false image: - name: 'developmentseed/osmseed-replication-job' - tag: '0.1.0-n770.hd15c9f2' - schedule: '* */1 * * *' + name: "developmentseed/osmseed-replication-job" + tag: "0.1.0-n770.hd15c9f2" + schedule: "* */1 * * *" env: CREATE_MISSING_FILES: empty REPLICATION_SEQUENCE_NUMBER: "109789" resources: enabled: false requests: - memory: '1Gi' - cpu: '2' + memory: "1Gi" + cpu: "2" limits: - memory: '2Gi' - cpu: '2' + memory: "2Gi" + cpu: "2" nodeSelector: enabled: false @@ -740,101 +739,76 @@ monitoringReplication: changesetReplicationJob: enabled: false image: - name: '' - tag: '' + name: "" + tag: "" resources: enabled: false requests: - memory: '20Gi' - cpu: '8' + memory: "20Gi" + cpu: "8" limits: - memory: '24Gi' - cpu: '10' + memory: "24Gi" + cpu: "10" nodeSelector: enabled: false +# ==================================================================================================== +# Variables for osmcha web builder +# ==================================================================================================== - +osmchaWeb: + enabled: true + image: + name: "developmentseed/osmseed-osmcha-web" + tag: "v6" # ==================================================================================================== -# Variables for changeset-replication-job, Configuration to create the replication files by, minute, hour, or day +# Variables for osmcha Api # ==================================================================================================== osmchaApi: enabled: true image: - name: '' - tag: '' - ui: - name: ghcr.io/sunu/osmcha-frontend - tag: test9 + name: "ghcr.io/willemarcel/osmcha-django" + tag: "b1f4e6afc90e08707cadc4d74580632ca3b93dd2" env: - 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_SETTINGS_MODULE: "config.settings.production" + OSMCHA_FRONTEND_VERSION: "v0.86.0-production" DJANGO_SECRET_KEY: abc - 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: abc OAUTH_OSM_SECRET: abc - 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 - REACT_APP_OSM_URL: https://staging.openstreetmap.org - REACT_APP_OSM_API: https://staging.openstreetmap.org/api/0.6 - REACT_APP_OVERPASS_BASE: https://overpass-api-staging.openstreetmap.org/api/interpreter - REACT_APP_NOMINATIM_URL: https://nominatim-api-staging.openstreetmap.org - OSMCHA_URL: https://osmcha-staging.openstreetmap.org + DJANGO_SECURE_SSL_REDIRECT: "False" + OSM_SERVER_URL: https://staging.openhistoricalmap.org + OSMCHA_URL: https://osmcha-staging.openhistoricalmap.org + OAUTH_REDIRECT_URI: https://osmcha.openhistoricalmap.org/oauth-landing.html resources: enabled: false requests: - memory: '20Gi' - cpu: '8' + memory: "20Gi" + cpu: "8" limits: - memory: '24Gi' - cpu: '10' + memory: "24Gi" + cpu: "10" nodeSelector: enabled: false - -osmchaWeb: - enabled: true - image: - name: '' - tag: '' # ==================================================================================================== -# Variables for changeset-replication-job, Configuration to create the replication files by, minute, hour, or day +# Variables for osmcha DB # ==================================================================================================== osmchaDb: enabled: true image: - name: '' - tag: '' + name: "developmentseed/osmseed-osmcha-db" + tag: "0.1.0-n767.h0090e97" env: POSTGRES_DB: osmcha-db POSTGRES_USER: postgres - POSTGRES_PASSWORD: '1234' + POSTGRES_PASSWORD: "1234" resources: enabled: false requests: - memory: '20Gi' - cpu: '8' + memory: "20Gi" + cpu: "8" limits: - memory: '24Gi' - cpu: '10' + memory: "24Gi" + cpu: "10" persistenceDisk: enabled: false accessMode: ReadWriteOnce @@ -850,11 +824,14 @@ osmchaDb: GCP_gcePersistentDisk_size: 50Gi nodeSelector: enabled: false +# ==================================================================================================== +# Variables for osmcha redis +# ==================================================================================================== osmchaRedis: enabled: true image: - name: 'redis' - tag: 'latest' + name: "redis" + tag: "latest" port: 6379 replicaCount: 1