-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mastodon.dist.yaml
200 lines (197 loc) · 5.09 KB
/
mastodon.dist.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
---
apiVersion: v1
kind: Namespace
metadata:
name: mastodon-server
---
apiVersion: v1
kind: Service
metadata:
name: mastodon
namespace: mastodon-server
spec:
selector:
app: mastodon
ports:
- name: mastodon-plain
protocol: TCP
port: 80
- name: mastodon-secure
protocol: TCP
port: 443
---
apiVersion: v1
kind: Secret
metadata:
namespace: mastodon-server
name: mastodon-secret
type: Opaque
stringData:
SECRET_KEY_BASE: <CHANGE-ME>
OTP_SECRET: <CHANGE-ME>
VAPID_PRIVATE_KEY: <CHANGE-ME>
VAPID_PUBLIC_KEY: <CHANGE-ME>
SMTP_LOGIN: <CHANGE-ME>
SMTP_PASSWORD: <CHANGE-ME>
SMTP_FROM_ADDRESS: <CHANGE-ME>
AWS_ACCESS_KEY_ID: <CHANGE-ME>
AWS_SECRET_ACCESS_KEY: <CHANGE-ME>
S3_ENDPOINT: <CHANGE-ME>
SMTP_FROM_ADDRESS: <CHANGE-ME>
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mastodon
namespace: mastodon-server
labels:
app: mastodon
spec:
replicas: 3
selector:
matchLabels:
app: mastodon
template:
metadata:
labels:
app: mastodon
name: mastodon
spec:
topologySpreadConstraints:
- maxSkew: 1
topologyKey: kubernetes.io/hostname
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
app: mastodon
containers:
- name: mastodon
image: lscr.io/linuxserver/mastodon:latest
imagePullPolicy: Always
ports:
- name: plain
containerPort: 80
- name: secure
containerPort: 443
env:
- name: PUID
value: "1000"
- name: GUID
value: "1000"
- name: TZ
value: Europe/Istanbul
- name: LOCAL_DOMAIN
value: <CHANGE-ME> # domain.com
- name: WEB_DOMAIN
value: <CHANGE-ME> # domain.com
- name: REDIS_HOST
value: redis.redis-server
- name: REDIS_PORT
value: "6379"
- name: DB_NAME
value: mastodon
- name: DB_HOST
value: postgres.postgres-server
- name: DB_USER
valueFrom:
secretKeyRef:
name: db_secrets
key: POSTGRES_NON_ROOT_USER
- name: DB_PASS
valueFrom:
secretKeyRef:
name: db_secrets
key: POSTGRES_NON_ROOT_PASSWORD
- name: DB_PORT
value: "5432"
- name: ES_ENABLED
value: "false"
- name: SECRET_KEY_BASE
valueFrom:
secretKeyRef:
name: secrets
key: SECRET_KEY_BASE
- name: OTP_SECRET
valueFrom:
secretKeyRef:
name: secrets
key: OTP_SECRET
- name: VAPID_PRIVATE_KEY
valueFrom:
secretKeyRef:
name: secrets
key: VAPID_PRIVATE_KEY
- name: VAPID_PUBLIC_KEY
valueFrom:
secretKeyRef:
name: secrets
key: VAPID_PUBLIC_KEY
- name: RAILS_SERVE_STATIC_FILES
value: "false"
- name: SMTP_SERVER
valueFrom:
secretKeyRef:
name: secrets
key: SMTP_SERVER
- name: SMTP_PORT
value: "587" # change this one accordenly
- name: SMTP_LOGIN
valueFrom:
secretKeyRef:
name: secrets
key: SMTP_LOGIN
- name: SMTP_PASSWORD
valueFrom:
secretKeyRef:
name: secrets
key: SMTP_PASSWORD
- name: SMTP_FROM_ADDRESS
valueFrom:
secretKeyRef:
name: secrets
key: SMTP_FROM_ADDRESS
- name: S3_ENABLED
value: "true"
- name: CDN_HOST
value: <CHANGE-ME>
- name: S3_BUCKET
value: "mastodon"
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: secrets
key: AWS_ACCESS_KEY_ID
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: secrets
key: AWS_SECRET_ACCESS_KEY
- name: S3_REGION
value: auto
- name: S3_ENDPOINT
valueFrom:
secretKeyRef:
name: secrets
key: S3_ENDPOINT
- name: S3_HOSTNAME
value: <CHANGE-ME> # assets.domain.com
- name: S3_FORCE_SINGLE_REQUEST
value: "true"
- name: S3_READ_TIMEOUT
value: "15"
- name: S3_OPEN_TIMEOUT
value: "15"
resources:
limits:
cpu: "1.0"
memory: "2560Mi"
requests:
cpu: "0.5"
memory: "2560Mi"
volumes:
- name: db_secrets
secret:
secretName: postgres-secret
- name: secrets
secret:
secretName: mastodon-secret