119 lines
2.7 KiB
YAML
119 lines
2.7 KiB
YAML
image:
|
|
repository: tccr.io/truecharts/recipes
|
|
tag: v1.3.2@sha256:6df81b679f8f44094380a91f96812cd8809d661566518b8b0d72d952eda16fa8
|
|
pullPolicy: IfNotPresent
|
|
|
|
nginxImage:
|
|
repository: tccr.io/truecharts/nginx
|
|
tag: v1.23.1@sha256:bbad83037fe19f0bd1e2bf9cd9b7889615e043050f8a9731b3a6e61cc563382f
|
|
|
|
securityContext:
|
|
readOnlyRootFilesystem: false
|
|
runAsNonRoot: false
|
|
|
|
podSecurityContext:
|
|
runAsUser: 0
|
|
runAsGroup: 0
|
|
|
|
configmap:
|
|
config:
|
|
enabled: true
|
|
data:
|
|
nginx-config: |-
|
|
events {
|
|
worker_connections 1024;
|
|
}
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
server {
|
|
listen 80;
|
|
server_name _;
|
|
client_max_body_size 16M;
|
|
# serve media files
|
|
location /media/ {
|
|
alias /media/;
|
|
}
|
|
# serve static files
|
|
location /static/ {
|
|
alias /static/;
|
|
}
|
|
# pass requests for dynamic content to gunicorn
|
|
location / {
|
|
proxy_set_header Host $host;
|
|
proxy_pass http://localhost:8080;
|
|
}
|
|
}
|
|
}
|
|
|
|
env:
|
|
DEBUG: 0
|
|
ALLOWED_HOSTS: "*"
|
|
GUNICORN_MEDIA: 0
|
|
FRACTION_PREF_DEFAULT: 0
|
|
COMMENT_PREF_DEFAULT: 1
|
|
SHOPPING_MIN_AUTOSYNC_INTERVAL: 5
|
|
TIMEZONE: "{{ .Values.TZ }}"
|
|
DB_ENGINE: "django.db.backends.postgresql"
|
|
POSTGRES_DB: "{{ .Values.postgresql.postgresqlDatabase }}"
|
|
POSTGRES_USER: "{{ .Values.postgresql.postgresqlUsername }}"
|
|
POSTGRES_PORT: "5432"
|
|
POSTGRES_PASSWORD:
|
|
secretKeyRef:
|
|
name: dbcreds
|
|
key: postgresql-password
|
|
POSTGRES_HOST:
|
|
secretKeyRef:
|
|
name: dbcreds
|
|
key: plainhost
|
|
SECRET_KEY:
|
|
secretKeyRef:
|
|
name: recipes-secrets
|
|
key: SECRET_KEY
|
|
|
|
additionalContainers:
|
|
nginx:
|
|
name: nginx
|
|
image: "{{ .Values.nginxImage.repository }}:{{ .Values.nginxImage.tag }}"
|
|
ports:
|
|
- containerPort: 80
|
|
name: main
|
|
volumeMounts:
|
|
- name: recipes-config
|
|
mountPath: "/etc/nginx/nginx.conf"
|
|
subPath: nginx-config
|
|
readOnly: true
|
|
- name: media
|
|
mountPath: "/media"
|
|
- name: static
|
|
mountPath: "/static"
|
|
|
|
service:
|
|
main:
|
|
ports:
|
|
main:
|
|
port: 10029
|
|
targetPort: 80
|
|
|
|
persistence:
|
|
media:
|
|
enabled: true
|
|
mountPath: "/opt/recipes/mediafiles"
|
|
static:
|
|
enabled: true
|
|
type: emptyDir
|
|
mountPath: "/opt/recipes/staticfiles"
|
|
recipes-config:
|
|
enabled: "true"
|
|
mountPath: "/etc/nginx/nginx.conf"
|
|
subPath: "nginx.conf"
|
|
type: "custom"
|
|
volumeSpec:
|
|
configMap:
|
|
name: '{{ printf "%v-config" (include "tc.common.names.fullname" .) }}'
|
|
|
|
postgresql:
|
|
enabled: true
|
|
existingSecret: "dbcreds"
|
|
postgresqlUsername: recipes
|
|
postgresqlDatabase: recipes
|