Get discourse working.
This commit is contained in:
@@ -21,8 +21,8 @@ spec:
|
|||||||
securityContext:
|
securityContext:
|
||||||
fsGroup: 1000
|
fsGroup: 1000
|
||||||
fsGroupChangePolicy: Always
|
fsGroupChangePolicy: Always
|
||||||
containers:
|
initContainers:
|
||||||
- name: discourse
|
- name: discourse-migrate
|
||||||
image: discourse/discourse:3.5.3
|
image: discourse/discourse:3.5.3
|
||||||
imagePullPolicy: "IfNotPresent"
|
imagePullPolicy: "IfNotPresent"
|
||||||
securityContext:
|
securityContext:
|
||||||
@@ -42,7 +42,75 @@ spec:
|
|||||||
runAsUser: 0
|
runAsUser: 0
|
||||||
seccompProfile:
|
seccompProfile:
|
||||||
type: RuntimeDefault
|
type: RuntimeDefault
|
||||||
|
command:
|
||||||
|
- /bin/bash
|
||||||
|
- -c
|
||||||
|
- |
|
||||||
|
set -e
|
||||||
|
cd /var/www/discourse
|
||||||
|
export HOME=/root
|
||||||
|
git config --global --add safe.directory /var/www/discourse
|
||||||
|
bundle exec rake db:migrate
|
||||||
|
bundle exec rake assets:precompile
|
||||||
env:
|
env:
|
||||||
|
- name: RAILS_ENV
|
||||||
|
value: "production"
|
||||||
|
- name: DISCOURSE_DB_HOST
|
||||||
|
value: {{ .dbHostname }}
|
||||||
|
- name: DISCOURSE_DB_PORT
|
||||||
|
value: "{{ .dbPort }}"
|
||||||
|
- name: DISCOURSE_DB_NAME
|
||||||
|
value: {{ .dbName }}
|
||||||
|
- name: DISCOURSE_DB_USERNAME
|
||||||
|
value: {{ .dbUsername }}
|
||||||
|
- name: DISCOURSE_DB_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: discourse-secrets
|
||||||
|
key: dbPassword
|
||||||
|
- name: DISCOURSE_REDIS_HOST
|
||||||
|
value: {{ .redisHostname }}
|
||||||
|
- name: DISCOURSE_REDIS_PASSWORD
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: discourse-secrets
|
||||||
|
key: redis.password
|
||||||
|
- name: DISCOURSE_HOSTNAME
|
||||||
|
value: {{ .domain }}
|
||||||
|
- name: DISCOURSE_SECRET_KEY_BASE
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: discourse-secrets
|
||||||
|
key: secretKeyBase
|
||||||
|
volumeMounts:
|
||||||
|
- name: discourse-data
|
||||||
|
mountPath: /shared
|
||||||
|
containers:
|
||||||
|
- name: discourse
|
||||||
|
image: discourse/discourse:3.5.3
|
||||||
|
imagePullPolicy: "IfNotPresent"
|
||||||
|
command:
|
||||||
|
- /sbin/boot
|
||||||
|
securityContext:
|
||||||
|
allowPrivilegeEscalation: false
|
||||||
|
capabilities:
|
||||||
|
drop:
|
||||||
|
- ALL
|
||||||
|
add:
|
||||||
|
- CHOWN
|
||||||
|
- FOWNER
|
||||||
|
- SETGID
|
||||||
|
- SETUID
|
||||||
|
- DAC_OVERRIDE
|
||||||
|
privileged: false
|
||||||
|
readOnlyRootFilesystem: false
|
||||||
|
runAsNonRoot: false
|
||||||
|
runAsUser: 0
|
||||||
|
seccompProfile:
|
||||||
|
type: RuntimeDefault
|
||||||
|
env:
|
||||||
|
- name: RAILS_ENV
|
||||||
|
value: "production"
|
||||||
# Discourse database configuration
|
# Discourse database configuration
|
||||||
- name: DISCOURSE_DB_HOST
|
- name: DISCOURSE_DB_HOST
|
||||||
value: {{ .dbHostname }}
|
value: {{ .dbHostname }}
|
||||||
@@ -91,7 +159,7 @@ spec:
|
|||||||
value: "{{ .smtp.startTls }}"
|
value: "{{ .smtp.startTls }}"
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
containerPort: 3000
|
containerPort: 80
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
@@ -146,8 +214,10 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- /bin/bash
|
- /bin/bash
|
||||||
- -c
|
- -c
|
||||||
- "cd /var/www/discourse && exec bundle exec sidekiq"
|
- "cd /var/www/discourse && export HOME=/root && exec bundle exec sidekiq"
|
||||||
env:
|
env:
|
||||||
|
- name: RAILS_ENV
|
||||||
|
value: "production"
|
||||||
# Discourse database configuration
|
# Discourse database configuration
|
||||||
- name: DISCOURSE_DB_HOST
|
- name: DISCOURSE_DB_HOST
|
||||||
value: {{ .dbHostname }}
|
value: {{ .dbHostname }}
|
||||||
|
|||||||
Reference in New Issue
Block a user