Improve Laravel deploy support and add .env import to deploy wizard.
Set Laravel DB env vars in Helm and Kubernetes, fix default port to 80 with a storage-aware entrypoint, and let users upload a .env file during deploy. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -53,6 +53,15 @@ spec:
|
||||
key: password
|
||||
- name: DATABASE_URL
|
||||
value: "postgresql://$(DB_USER):$(DB_PASSWORD)@{{ include "cloudhost-app.dbDeploymentName" . }}:5432/{{ include "cloudhost-app.dbName" . }}"
|
||||
{{- if or (eq .Values.app.runtime "laravel") (eq .Values.app.runtime "php") }}
|
||||
- name: DB_DATABASE
|
||||
value: {{ include "cloudhost-app.dbName" . }}
|
||||
- name: DB_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ $name }}-db-secret
|
||||
key: username
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.database.enabled (eq .Values.database.type "mysql") }}
|
||||
- name: DB_HOST
|
||||
@@ -73,6 +82,15 @@ spec:
|
||||
key: password
|
||||
- name: DATABASE_URL
|
||||
value: "mysql://$(DB_USER):$(DB_PASSWORD)@{{ include "cloudhost-app.dbDeploymentName" . }}:3306/{{ include "cloudhost-app.dbName" . }}"
|
||||
{{- if or (eq .Values.app.runtime "laravel") (eq .Values.app.runtime "php") }}
|
||||
- name: DB_DATABASE
|
||||
value: {{ include "cloudhost-app.dbName" . }}
|
||||
- name: DB_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ $name }}-db-secret
|
||||
key: username
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.database.enabled (eq .Values.database.type "mariadb") }}
|
||||
- name: DB_HOST
|
||||
@@ -93,6 +111,15 @@ spec:
|
||||
key: password
|
||||
- name: DATABASE_URL
|
||||
value: "mysql://$(DB_USER):$(DB_PASSWORD)@{{ include "cloudhost-app.dbDeploymentName" . }}:3306/{{ include "cloudhost-app.dbName" . }}"
|
||||
{{- if or (eq .Values.app.runtime "laravel") (eq .Values.app.runtime "php") }}
|
||||
- name: DB_DATABASE
|
||||
value: {{ include "cloudhost-app.dbName" . }}
|
||||
- name: DB_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ $name }}-db-secret
|
||||
key: username
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if and .Values.database.enabled (eq .Values.database.type "mongodb") }}
|
||||
- name: DB_HOST
|
||||
@@ -115,6 +142,15 @@ spec:
|
||||
value: "mongodb://$(DB_USER):$(DB_PASSWORD)@{{ include "cloudhost-app.dbDeploymentName" . }}:27017/{{ include "cloudhost-app.dbName" . }}?authSource=admin"
|
||||
- name: DATABASE_URL
|
||||
value: "mongodb://$(DB_USER):$(DB_PASSWORD)@{{ include "cloudhost-app.dbDeploymentName" . }}:27017/{{ include "cloudhost-app.dbName" . }}?authSource=admin"
|
||||
{{- if or (eq .Values.app.runtime "laravel") (eq .Values.app.runtime "php") }}
|
||||
- name: DB_DATABASE
|
||||
value: {{ include "cloudhost-app.dbName" . }}
|
||||
- name: DB_USERNAME
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ $name }}-db-secret
|
||||
key: username
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- /* Redis connection env vars */}}
|
||||
{{- if .Values.redis.enabled }}
|
||||
|
||||
Reference in New Issue
Block a user