Standardize config.

This commit is contained in:
2026-05-23 19:51:33 +00:00
parent e2e3f730a5
commit 6b5325c6f3
87 changed files with 426 additions and 531 deletions

View File

@@ -27,9 +27,9 @@ spec:
readOnlyRootFilesystem: false
env:
- name: PGHOST
value: "{{ .dbHostname }}"
value: "{{ .db.host }}"
- name: PGPORT
value: "{{ .dbPort }}"
value: "{{ .db.port }}"
- name: PGUSER
value: postgres
- name: PGPASSWORD
@@ -38,9 +38,9 @@ spec:
name: mastodon-secrets
key: postgres.password
- name: MASTODON_DB
value: "{{ .dbName }}"
value: "{{ .db.name }}"
- name: MASTODON_USER
value: "{{ .dbUsername }}"
value: "{{ .db.user }}"
- name: MASTODON_PASSWORD
valueFrom:
secretKeyRef:
@@ -108,7 +108,7 @@ spec:
type: RuntimeDefault
containers:
- name: db-migrate
image: {{ .image }}
image: ghcr.io/mastodon/mastodon:v4.5.3
securityContext:
allowPrivilegeEscalation: false
capabilities:
@@ -150,22 +150,22 @@ spec:
name: mastodon-secrets
key: activeRecordKeyDerivationSalt
- name: DB_HOST
value: "{{ .dbHostname }}"
value: "{{ .db.host }}"
- name: DB_PORT
value: "{{ .dbPort }}"
value: "{{ .db.port }}"
- name: DB_NAME
value: "{{ .dbName }}"
value: "{{ .db.name }}"
- name: DB_USER
value: "{{ .dbUsername }}"
value: "{{ .db.user }}"
- name: DB_PASS
valueFrom:
secretKeyRef:
name: mastodon-secrets
key: dbPassword
- name: REDIS_HOST
value: "{{ .redisHostname }}"
value: "{{ .redis.host }}"
- name: REDIS_PORT
value: "{{ .redisPort }}"
value: "{{ .redis.port }}"
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:

View File

@@ -22,7 +22,7 @@ spec:
type: RuntimeDefault
containers:
- name: sidekiq
image: {{ .image }}
image: ghcr.io/mastodon/mastodon:v4.5.3
securityContext:
allowPrivilegeEscalation: false
capabilities:
@@ -33,7 +33,7 @@ spec:
- exec
- sidekiq
- -c
- "{{ .sidekiq.concurrency }}"
- "25"
- -q
- default,8
- -q
@@ -91,13 +91,13 @@ spec:
name: mastodon-secrets
key: activeRecordKeyDerivationSalt
- name: DB_HOST
value: "{{ .dbHostname }}"
value: "{{ .db.host }}"
- name: DB_PORT
value: "{{ .dbPort }}"
value: "{{ .db.port }}"
- name: DB_NAME
value: "{{ .dbName }}"
value: "{{ .db.name }}"
- name: DB_USER
value: "{{ .dbUsername }}"
value: "{{ .db.user }}"
- name: DB_PASS
valueFrom:
secretKeyRef:
@@ -109,9 +109,9 @@ spec:
name: mastodon-secrets
key: postgres.password
- name: REDIS_HOST
value: "{{ .redisHostname }}"
value: "{{ .redis.host }}"
- name: REDIS_PORT
value: "{{ .redisPort }}"
value: "{{ .redis.port }}"
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
@@ -131,9 +131,9 @@ spec:
- name: SMTP_FROM_ADDRESS
value: "{{ .smtp.from }}"
- name: SMTP_AUTH_METHOD
value: "{{ .smtp.authMethod }}"
value: "plain"
- name: SMTP_ENABLE_STARTTLS
value: "{{ .smtp.enableStarttls }}"
value: "auto"
- name: SMTP_TLS
value: "{{ .smtp.tls }}"
volumeMounts:

View File

@@ -22,7 +22,7 @@ spec:
type: RuntimeDefault
containers:
- name: streaming
image: {{ .streamingImage }}
image: ghcr.io/mastodon/mastodon-streaming:v4.5.3
securityContext:
allowPrivilegeEscalation: false
capabilities:
@@ -30,32 +30,32 @@ spec:
readOnlyRootFilesystem: false
ports:
- name: streaming
containerPort: {{ .streamingPort }}
containerPort: 4000
protocol: TCP
env:
- name: NODE_ENV
value: production
- name: PORT
value: "{{ .streamingPort }}"
value: "4000"
- name: STREAMING_CLUSTER_NUM
value: "1"
- name: DB_HOST
value: "{{ .dbHostname }}"
value: "{{ .db.host }}"
- name: DB_PORT
value: "{{ .dbPort }}"
value: "{{ .db.port }}"
- name: DB_NAME
value: "{{ .dbName }}"
value: "{{ .db.name }}"
- name: DB_USER
value: "{{ .dbUsername }}"
value: "{{ .db.user }}"
- name: DB_PASS
valueFrom:
secretKeyRef:
name: mastodon-secrets
key: dbPassword
- name: REDIS_HOST
value: "{{ .redisHostname }}"
value: "{{ .redis.host }}"
- name: REDIS_PORT
value: "{{ .redisPort }}"
value: "{{ .redis.port }}"
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:

View File

@@ -22,7 +22,7 @@ spec:
type: RuntimeDefault
containers:
- name: web
image: {{ .image }}
image: ghcr.io/mastodon/mastodon:v4.5.3
securityContext:
allowPrivilegeEscalation: false
capabilities:
@@ -36,7 +36,7 @@ spec:
- config/puma.rb
ports:
- name: http
containerPort: {{ .webPort }}
containerPort: 3000
protocol: TCP
env:
- name: LOCAL_DOMAIN
@@ -85,13 +85,13 @@ spec:
name: mastodon-secrets
key: activeRecordKeyDerivationSalt
- name: DB_HOST
value: "{{ .dbHostname }}"
value: "{{ .db.host }}"
- name: DB_PORT
value: "{{ .dbPort }}"
value: "{{ .db.port }}"
- name: DB_NAME
value: "{{ .dbName }}"
value: "{{ .db.name }}"
- name: DB_USER
value: "{{ .dbUsername }}"
value: "{{ .db.user }}"
- name: DB_PASS
valueFrom:
secretKeyRef:
@@ -103,9 +103,9 @@ spec:
name: mastodon-secrets
key: postgres.password
- name: REDIS_HOST
value: "{{ .redisHostname }}"
value: "{{ .redis.host }}"
- name: REDIS_PORT
value: "{{ .redisPort }}"
value: "{{ .redis.port }}"
- name: REDIS_PASSWORD
valueFrom:
secretKeyRef:
@@ -125,9 +125,9 @@ spec:
- name: SMTP_FROM_ADDRESS
value: "{{ .smtp.from }}"
- name: SMTP_AUTH_METHOD
value: "{{ .smtp.authMethod }}"
value: "plain"
- name: SMTP_ENABLE_STARTTLS
value: "{{ .smtp.enableStarttls }}"
value: "auto"
- name: SMTP_TLS
value: "{{ .smtp.tls }}"
- name: STREAMING_API_BASE_URL

View File

@@ -23,11 +23,11 @@ spec:
service:
name: mastodon-streaming
port:
number: {{ .streamingPort }}
number: 4000
- path: /
pathType: Prefix
backend:
service:
name: mastodon-web
port:
number: {{ .webPort }}
number: 3000

View File

@@ -1,7 +1,7 @@
name: mastodon
is: mastodon
description: Mastodon is a free, open-source social network server based on ActivityPub.
version: 4.5.3
version: 4.5.3-2
icon: https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/mastodon.svg
requires:
- name: postgres
@@ -9,43 +9,30 @@ requires:
- name: smtp
defaultConfig:
namespace: mastodon
externalDnsDomain: "{{ .cloud.domain }}"
timezone: UTC
image: ghcr.io/mastodon/mastodon:v4.5.3
streamingImage: ghcr.io/mastodon/mastodon-streaming:v4.5.3
externalDnsDomain: '{{ .cloud.domain }}'
domain: mastodon.{{ .cloud.domain }}
locale: en
singleUserMode: false
# Database configuration
dbHostname: "{{ .apps.postgres.host }}"
dbPort: "{{ .apps.postgres.port }}"
dbName: mastodon_production
dbUsername: mastodon
# Redis configuration
redisHostname: "{{ .apps.redis.host }}"
redisPort: "{{ .apps.redis.port }}"
# Ports
webPort: 3000
streamingPort: 4000
# Storage
assetsStorage: 10Gi
systemStorage: 100Gi
# SMTP configuration
smtp:
enabled: "{{ .apps.smtp.host | ternary true false }}"
server: "{{ .apps.smtp.host }}"
port: "{{ .apps.smtp.port }}"
from: notifications@{{ .cloud.domain }}
user: "{{ .apps.smtp.user }}"
authMethod: plain
enableStarttls: auto
tls: "{{ .apps.smtp.tls }}"
# TLS
tlsSecretName: wildcard-wild-cloud-tls
# Sidekiq configuration
sidekiq:
replicas: 1
concurrency: 25
db:
host: '{{ .apps.postgres.host }}'
port: '{{ .apps.postgres.port }}'
name: mastodon_production
user: mastodon
redis:
host: '{{ .apps.redis.host }}'
port: '{{ .apps.redis.port }}'
smtp:
enabled: '{{ .apps.smtp.host | ternary true false }}'
server: '{{ .apps.smtp.host }}'
port: '{{ .apps.smtp.port }}'
from: notifications@{{ .cloud.domain }}
user: '{{ .apps.smtp.user }}'
tls: '{{ .apps.smtp.tls }}'
defaultSecrets:
- key: secretKeyBase
default: "{{ random.AlphaNum 128 }}"

View File

@@ -6,7 +6,7 @@ metadata:
spec:
type: ClusterIP
ports:
- port: {{ .streamingPort }}
- port: 4000
targetPort: streaming
protocol: TCP
name: streaming

View File

@@ -6,7 +6,7 @@ metadata:
spec:
type: ClusterIP
ports:
- port: {{ .webPort }}
- port: 3000
targetPort: http
protocol: TCP
name: http

View File

@@ -20,7 +20,7 @@ spec:
type: RuntimeDefault
containers:
- name: vapid-init
image: {{ .image }}
image: ghcr.io/mastodon/mastodon:v4.5.3
securityContext:
allowPrivilegeEscalation: false
capabilities: