feat(lychee): Add db/redis, fix storage path, add app_key secret, add gui config options (#1928)
* feat(lychee): Add db/redis, fix storage path, add app_key secret, add gui config options * see output * without quote * remove `command` * Add TZ
This commit is contained in:
@@ -4,6 +4,14 @@ dependencies:
|
|||||||
- name: common
|
- name: common
|
||||||
repository: https://truecharts.org
|
repository: https://truecharts.org
|
||||||
version: 8.16.0
|
version: 8.16.0
|
||||||
|
- condition: postgresql.enabled
|
||||||
|
name: postgresql
|
||||||
|
repository: https://truecharts.org/
|
||||||
|
version: 6.0.68
|
||||||
|
- condition: redis.enabled
|
||||||
|
name: redis
|
||||||
|
repository: https://truecharts.org
|
||||||
|
version: 1.0.74
|
||||||
deprecated: false
|
deprecated: false
|
||||||
description: Lychee is a free photo-management tool, which runs on your server or
|
description: Lychee is a free photo-management tool, which runs on your server or
|
||||||
web-space
|
web-space
|
||||||
@@ -23,7 +31,7 @@ sources:
|
|||||||
- https://github.com/LycheeOrg/Lychee
|
- https://github.com/LycheeOrg/Lychee
|
||||||
- https://hub.docker.com/r/lycheeorg/lychee
|
- https://hub.docker.com/r/lycheeorg/lychee
|
||||||
type: application
|
type: application
|
||||||
version: 9.0.43
|
version: 10.0.0
|
||||||
annotations:
|
annotations:
|
||||||
truecharts.org/catagories: |
|
truecharts.org/catagories: |
|
||||||
- media
|
- media
|
||||||
|
|||||||
@@ -88,7 +88,133 @@ questions:
|
|||||||
schema:
|
schema:
|
||||||
type: int
|
type: int
|
||||||
default: 568
|
default: 568
|
||||||
|
- variable: APP_URL
|
||||||
|
label: "APP_URL"
|
||||||
|
description: "Application URL eg. https://lychee.mydomain.com"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "http://localhost"
|
||||||
|
- variable: APP_DEBUG
|
||||||
|
label: "APP_DEBUG"
|
||||||
|
description: "Enables the debug info"
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
- variable: SECURITY_HEADER_HSTS_ENABLE
|
||||||
|
label: "SECURITY_HEADER_HSTS_ENABLE"
|
||||||
|
description: "Enables HSTS Headers"
|
||||||
|
schema:
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
|
- variable: secret
|
||||||
|
group: "Container Configuration"
|
||||||
|
label: "Secret Image Environment"
|
||||||
|
schema:
|
||||||
|
additional_attrs: true
|
||||||
|
type: dict
|
||||||
|
attrs:
|
||||||
|
- variable: MAIL_FROM_ADDRESS
|
||||||
|
label: "MAIL_FROM_ADDRESS"
|
||||||
|
description: "Mail from Address"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
- variable: MAIL_FROM_NAME
|
||||||
|
label: "MAIL_FROM_NAME"
|
||||||
|
description: "Mail from Name"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
- variable: MAIL_DRIVER
|
||||||
|
label: "MAIL_DRIVER"
|
||||||
|
description: "Mail Driver"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "smtp"
|
||||||
|
enum:
|
||||||
|
- value: "smtp"
|
||||||
|
description: "smtp"
|
||||||
|
- value: "mailgun"
|
||||||
|
description: "mailgun"
|
||||||
|
- value: "sendmail"
|
||||||
|
description: "sendmail"
|
||||||
|
- value: "ses"
|
||||||
|
description: "ses"
|
||||||
|
- value: "postmark"
|
||||||
|
description: "postmark"
|
||||||
|
- value: "log"
|
||||||
|
description: "log"
|
||||||
|
- value: "array"
|
||||||
|
description: "array"
|
||||||
|
- variable: MAIL_HOST
|
||||||
|
label: "MAIL_HOST"
|
||||||
|
description: "Mail Host"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
- variable: MAIL_PORT
|
||||||
|
label: "MAIL_PORT"
|
||||||
|
description: "Mail Port"
|
||||||
|
schema:
|
||||||
|
type: int
|
||||||
|
- variable: MAIL_USERNAME
|
||||||
|
label: "MAIL_USERNAME"
|
||||||
|
description: "Mail Username"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
- variable: MAIL_PASSWORD
|
||||||
|
label: "MAIL_PASSWORD"
|
||||||
|
description: "Mail Password"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
private: true
|
||||||
|
default: ""
|
||||||
|
- variable: MAIL_ENCRYPTION
|
||||||
|
label: "MAIL_ENCRYPTION"
|
||||||
|
description: "Mail Encryption"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "tls"
|
||||||
|
- variable: PUSHER_APP_ID
|
||||||
|
label: "PUSHER_APP_ID"
|
||||||
|
description: "Pusher App ID"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
- variable: PUSHER_APP_KEY
|
||||||
|
label: "PUSHER_APP_KEY"
|
||||||
|
description: "Pusher App Key"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
private: true
|
||||||
|
default: ""
|
||||||
|
- variable: PUSHER_APP_SECRET
|
||||||
|
label: "PUSHER_APP_SECRET"
|
||||||
|
description: "Pusher App Secret"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
private: true
|
||||||
|
default: ""
|
||||||
|
- variable: PUSHER_APP_CLUSTER
|
||||||
|
label: "PUSHER_APP_CLUSTER"
|
||||||
|
description: "Pusher App Cluster"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "mt1"
|
||||||
|
- variable: PUSHER_APP_CLUSTER
|
||||||
|
label: "PUSHER_APP_CLUSTER"
|
||||||
|
description: "Pusher App Cluster"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "mt1"
|
||||||
|
- variable: PUSHER_APP_CLUSTER
|
||||||
|
label: "PUSHER_APP_CLUSTER"
|
||||||
|
description: "Pusher App Cluster"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "mt1"
|
||||||
|
|
||||||
# Include{containerConfig}
|
# Include{containerConfig}
|
||||||
|
|
||||||
@@ -182,7 +308,7 @@ questions:
|
|||||||
additional_attrs: true
|
additional_attrs: true
|
||||||
type: dict
|
type: dict
|
||||||
attrs:
|
attrs:
|
||||||
- variable: config
|
- variable: conf
|
||||||
label: "App Config Storage"
|
label: "App Config Storage"
|
||||||
description: "Stores the Application Configuration."
|
description: "Stores the Application Configuration."
|
||||||
schema:
|
schema:
|
||||||
@@ -225,6 +351,92 @@ questions:
|
|||||||
- value: "Memory"
|
- value: "Memory"
|
||||||
description: "Memory"
|
description: "Memory"
|
||||||
# Include{persistenceAdvanced}
|
# Include{persistenceAdvanced}
|
||||||
|
- variable: sym
|
||||||
|
label: "App sym Storage"
|
||||||
|
description: "Stores the Application sym."
|
||||||
|
schema:
|
||||||
|
additional_attrs: true
|
||||||
|
type: dict
|
||||||
|
attrs:
|
||||||
|
- variable: type
|
||||||
|
label: "Type of Storage"
|
||||||
|
description: "Sets the persistence type, Anything other than PVC could break rollback!"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "simplePVC"
|
||||||
|
enum:
|
||||||
|
- value: "simplePVC"
|
||||||
|
description: "PVC (simple)"
|
||||||
|
- value: "simpleHP"
|
||||||
|
description: "HostPath (simple)"
|
||||||
|
- value: "emptyDir"
|
||||||
|
description: "emptyDir"
|
||||||
|
- value: "pvc"
|
||||||
|
description: "pvc"
|
||||||
|
- value: "hostPath"
|
||||||
|
description: "hostPath"
|
||||||
|
# Include{persistenceBasic}
|
||||||
|
- variable: hostPath
|
||||||
|
label: "hostPath"
|
||||||
|
description: "Path inside the container the storage is mounted"
|
||||||
|
schema:
|
||||||
|
show_if: [["type", "=", "hostPath"]]
|
||||||
|
type: hostpath
|
||||||
|
- variable: medium
|
||||||
|
label: "EmptyDir Medium"
|
||||||
|
schema:
|
||||||
|
show_if: [["type", "=", "emptyDir"]]
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
enum:
|
||||||
|
- value: ""
|
||||||
|
description: "Default"
|
||||||
|
- value: "Memory"
|
||||||
|
description: "Memory"
|
||||||
|
# Include{persistenceAdvanced}
|
||||||
|
- variable: uploads
|
||||||
|
label: "App Uploads Storage"
|
||||||
|
description: "Stores the Application Uploads."
|
||||||
|
schema:
|
||||||
|
additional_attrs: true
|
||||||
|
type: dict
|
||||||
|
attrs:
|
||||||
|
- variable: type
|
||||||
|
label: "Type of Storage"
|
||||||
|
description: "Sets the persistence type, Anything other than PVC could break rollback!"
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
default: "simplePVC"
|
||||||
|
enum:
|
||||||
|
- value: "simplePVC"
|
||||||
|
description: "PVC (simple)"
|
||||||
|
- value: "simpleHP"
|
||||||
|
description: "HostPath (simple)"
|
||||||
|
- value: "emptyDir"
|
||||||
|
description: "emptyDir"
|
||||||
|
- value: "pvc"
|
||||||
|
description: "pvc"
|
||||||
|
- value: "hostPath"
|
||||||
|
description: "hostPath"
|
||||||
|
# Include{persistenceBasic}
|
||||||
|
- variable: hostPath
|
||||||
|
label: "hostPath"
|
||||||
|
description: "Path inside the container the storage is mounted"
|
||||||
|
schema:
|
||||||
|
show_if: [["type", "=", "hostPath"]]
|
||||||
|
type: hostpath
|
||||||
|
- variable: medium
|
||||||
|
label: "EmptyDir Medium"
|
||||||
|
schema:
|
||||||
|
show_if: [["type", "=", "emptyDir"]]
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
enum:
|
||||||
|
- value: ""
|
||||||
|
description: "Default"
|
||||||
|
- value: "Memory"
|
||||||
|
description: "Memory"
|
||||||
|
# Include{persistenceAdvanced}
|
||||||
|
|
||||||
# Include{persistenceList}
|
# Include{persistenceList}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
{{/* Define the secrets */}}
|
||||||
|
{{- define "lychee.secrets" -}}
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
type: Opaque
|
||||||
|
metadata:
|
||||||
|
name: lychee-secrets
|
||||||
|
{{- $lycheeprevious := lookup "v1" "Secret" .Release.Namespace "lychee-secrets" }}
|
||||||
|
{{- $app_key := "" }}
|
||||||
|
data:
|
||||||
|
{{- if $lycheeprevious}}
|
||||||
|
APP_KEY: {{ index $lycheeprevious.data "APP_KEY" }}
|
||||||
|
{{- else }}
|
||||||
|
{{- $app_key := randAlphaNum 32 }}
|
||||||
|
APP_KEY: {{ $app_key | b64enc }}
|
||||||
|
{{- end }}
|
||||||
|
|
||||||
|
{{- end -}}
|
||||||
@@ -1 +1,7 @@
|
|||||||
{{ include "common.all" . }}
|
{{/* Make sure all variables are set properly */}}
|
||||||
|
{{ include "common.setup" . }}
|
||||||
|
|
||||||
|
{{ include "lychee.secrets" . }}
|
||||||
|
|
||||||
|
{{/* Render the templates */}}
|
||||||
|
{{ include "common.postSetup" . }}
|
||||||
|
|||||||
@@ -18,10 +18,69 @@ service:
|
|||||||
port: 10017
|
port: 10017
|
||||||
targetPort: 80
|
targetPort: 80
|
||||||
|
|
||||||
env: {}
|
env:
|
||||||
# PHP_TZ: UTC
|
# Internal Envs
|
||||||
# PUID: 1001
|
TIMEZONE: "{{ .Values.env.TZ }}"
|
||||||
|
PHP_TZ: "{{ .Values.env.TZ }}"
|
||||||
|
DB_CONNECTION: "pgsql"
|
||||||
|
DB_PORT: "5432"
|
||||||
|
DB_DATABASE: "{{ .Values.postgresql.postgresqlDatabase }}"
|
||||||
|
DB_USERNAME: "{{ .Values.postgresql.postgresqlUsername }}"
|
||||||
|
REDIS_PORT: "6379"
|
||||||
|
CACHE_DRIVER: "redis"
|
||||||
|
SESSION_DRIVER: "redis"
|
||||||
|
APP_ENV: "production"
|
||||||
|
APP_NAME: "Lychee"
|
||||||
|
MIX_PUSHER_APP_KEY: "{{ .Values.env.PUSHER_APP_KEY }}"
|
||||||
|
MIX_PUSHER_APP_CLUSTER: "{{ .Values.env.PUSHER_APP_CLUSTER }}"
|
||||||
|
# User Envs
|
||||||
|
PUID: 568
|
||||||
|
TZ: UTC
|
||||||
|
SECURITY_HEADER_HSTS_ENABLE: false
|
||||||
|
APP_DEBUG: false
|
||||||
|
PUSHER_APP_KEY: ""
|
||||||
|
PUSHER_APP_CLUSTER: ""
|
||||||
|
APP_URL: http://localhost
|
||||||
|
|
||||||
|
envValueFrom:
|
||||||
|
DB_PASSWORD:
|
||||||
|
secretKeyRef:
|
||||||
|
name: dbcreds
|
||||||
|
key: postgresql-password
|
||||||
|
DB_HOST:
|
||||||
|
secretKeyRef:
|
||||||
|
name: dbcreds
|
||||||
|
key: plainhost
|
||||||
|
REDIS_HOST:
|
||||||
|
secretKeyRef:
|
||||||
|
name: rediscreds
|
||||||
|
key: plainhost
|
||||||
|
REDIS_PASSWORD:
|
||||||
|
secretKeyRef:
|
||||||
|
name: rediscreds
|
||||||
|
key: redis-password
|
||||||
|
APP_KEY:
|
||||||
|
secretKeyRef:
|
||||||
|
name: lychee-secrets
|
||||||
|
key: APP_KEY
|
||||||
|
|
||||||
persistence:
|
persistence:
|
||||||
config:
|
conf:
|
||||||
enabled: true
|
enabled: true
|
||||||
mountPath: "/config"
|
mountPath: "/conf"
|
||||||
|
sym:
|
||||||
|
enabled: true
|
||||||
|
mountPath: "/sym"
|
||||||
|
uploads:
|
||||||
|
enabled: true
|
||||||
|
mountPath: "/uploads"
|
||||||
|
|
||||||
|
postgresql:
|
||||||
|
enabled: true
|
||||||
|
existingSecret: "dbcreds"
|
||||||
|
postgresqlUsername: lychee
|
||||||
|
postgresqlDatabase: lychee
|
||||||
|
|
||||||
|
redis:
|
||||||
|
enabled: true
|
||||||
|
existingSecret: "rediscreds"
|
||||||
|
|||||||
Reference in New Issue
Block a user