Adds outline app.
This commit is contained in:
38
outline/versions/1/README.md
Normal file
38
outline/versions/1/README.md
Normal file
@@ -0,0 +1,38 @@
|
||||
# Outline
|
||||
|
||||
Outline is a team wiki and knowledge base with a clean, fast editor.
|
||||
|
||||
## Dependencies
|
||||
|
||||
- **PostgreSQL** - Database for storing documents and settings
|
||||
- **Redis** - Used for caching and real-time collaboration
|
||||
- **SMTP** - Required for magic link email authentication
|
||||
|
||||
## Configuration
|
||||
|
||||
Key settings in `config.yaml`:
|
||||
|
||||
- **domain** - Where Outline will be accessible
|
||||
- **storage** - Persistent volume size (default: `2Gi`)
|
||||
- **db.name** - Database name (default: `outline`)
|
||||
- **smtp** - Email settings inherited from your Wild Cloud SMTP service
|
||||
|
||||
## First-Time Setup
|
||||
|
||||
1. Add and deploy the app:
|
||||
```bash
|
||||
wild app add outline
|
||||
wild app deploy outline
|
||||
```
|
||||
|
||||
2. Visit the app URL and enter your email address.
|
||||
|
||||
3. Outline will send a magic link to your email — click it to sign in.
|
||||
|
||||
4. The first user to sign in becomes the administrator of the workspace.
|
||||
|
||||
## Notes
|
||||
|
||||
- Outline uses **magic link authentication** (email-only, no passwords) — SMTP must be working for login to function
|
||||
- The `secretKey` is derived via SHA256 from `utilsSecret` — both are auto-generated
|
||||
- Documents are stored in the database, not on the filesystem
|
||||
60
outline/versions/1/db-init-job.yaml
Normal file
60
outline/versions/1/db-init-job.yaml
Normal file
@@ -0,0 +1,60 @@
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: outline-db-init
|
||||
labels:
|
||||
component: db-init
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: db-init
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 999
|
||||
runAsGroup: 999
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: postgres-init
|
||||
image: postgres:15
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: false
|
||||
env:
|
||||
- name: PGHOST
|
||||
value: {{ .db.host }}
|
||||
- name: PGUSER
|
||||
value: postgres
|
||||
- name: PGPASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: outline-secrets
|
||||
key: postgres.password
|
||||
- name: DB_NAME
|
||||
value: {{ .db.name }}
|
||||
- name: DB_USER
|
||||
value: {{ .db.user }}
|
||||
- name: DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: outline-secrets
|
||||
key: dbPassword
|
||||
command:
|
||||
- /bin/bash
|
||||
- -c
|
||||
- |
|
||||
set -e
|
||||
until pg_isready; do sleep 2; done
|
||||
psql -c "CREATE DATABASE ${DB_NAME};" || echo "Database already exists"
|
||||
psql -c "CREATE USER ${DB_USER} WITH PASSWORD '${DB_PASSWORD}';" || echo "User already exists"
|
||||
psql -c "ALTER USER ${DB_USER} WITH PASSWORD '${DB_PASSWORD}';"
|
||||
psql -c "GRANT ALL PRIVILEGES ON DATABASE ${DB_NAME} TO ${DB_USER};"
|
||||
psql -d ${DB_NAME} -c "GRANT ALL ON SCHEMA public TO ${DB_USER};"
|
||||
psql -d ${DB_NAME} -c "CREATE EXTENSION IF NOT EXISTS unaccent;" || true
|
||||
echo "Done"
|
||||
126
outline/versions/1/deployment.yaml
Normal file
126
outline/versions/1/deployment.yaml
Normal file
@@ -0,0 +1,126 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: outline
|
||||
namespace: outline
|
||||
spec:
|
||||
replicas: 1
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
component: web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
component: web
|
||||
spec:
|
||||
securityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1001
|
||||
runAsGroup: 1001
|
||||
fsGroup: 1001
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: outline
|
||||
image: outlinewiki/outline:1.8.1
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 3000
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: NODE_ENV
|
||||
value: production
|
||||
- name: SECRET_KEY
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: outline-secrets
|
||||
key: secretKey
|
||||
- name: UTILS_SECRET
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: outline-secrets
|
||||
key: utilsSecret
|
||||
- name: DATABASE_URL
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: outline-secrets
|
||||
key: dbUrl
|
||||
- name: PGSSLMODE
|
||||
value: disable
|
||||
- name: REDIS_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: outline-secrets
|
||||
key: redis.password
|
||||
- name: REDIS_URL
|
||||
value: redis://:$(REDIS_PASSWORD)@{{ .redis.host }}:6379
|
||||
- name: URL
|
||||
value: https://{{ .domain }}
|
||||
- name: PORT
|
||||
value: "3000"
|
||||
- name: FORCE_HTTPS
|
||||
value: "false"
|
||||
- name: FILE_STORAGE
|
||||
value: local
|
||||
- name: FILE_STORAGE_LOCAL_ROOT_DIR
|
||||
value: /var/lib/outline/data
|
||||
- name: FILE_STORAGE_UPLOAD_MAX_SIZE
|
||||
value: "26214400"
|
||||
- name: SMTP_HOST
|
||||
value: {{ .smtp.host }}
|
||||
- name: SMTP_PORT
|
||||
value: "{{ .smtp.port }}"
|
||||
- name: SMTP_USERNAME
|
||||
value: {{ .smtp.user }}
|
||||
- name: SMTP_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: outline-secrets
|
||||
key: smtpPassword
|
||||
- name: SMTP_FROM_EMAIL
|
||||
value: {{ .smtp.from }}
|
||||
- name: SMTP_SECURE
|
||||
value: "true"
|
||||
- name: ENABLE_UPDATES
|
||||
value: "false"
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
ephemeral-storage: 1Gi
|
||||
memory: 768Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
ephemeral-storage: 50Mi
|
||||
memory: 256Mi
|
||||
volumeMounts:
|
||||
- name: outline-data
|
||||
mountPath: /var/lib/outline/data
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /_health
|
||||
port: 3000
|
||||
initialDelaySeconds: 60
|
||||
timeoutSeconds: 5
|
||||
periodSeconds: 15
|
||||
failureThreshold: 6
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /_health
|
||||
port: 3000
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 3
|
||||
periodSeconds: 10
|
||||
failureThreshold: 3
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: false
|
||||
volumes:
|
||||
- name: outline-data
|
||||
persistentVolumeClaim:
|
||||
claimName: outline-data
|
||||
restartPolicy: Always
|
||||
26
outline/versions/1/ingress.yaml
Normal file
26
outline/versions/1/ingress.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: outline
|
||||
namespace: outline
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/target: {{ .externalDnsDomain }}
|
||||
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
|
||||
external-dns.alpha.kubernetes.io/ttl: "60"
|
||||
spec:
|
||||
ingressClassName: traefik
|
||||
rules:
|
||||
- host: {{ .domain }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: outline
|
||||
port:
|
||||
number: 80
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .domain }}
|
||||
secretName: {{ .tlsSecretName }}
|
||||
16
outline/versions/1/kustomization.yaml
Normal file
16
outline/versions/1/kustomization.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: outline
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
app: outline
|
||||
managedBy: kustomize
|
||||
partOf: wild-cloud
|
||||
resources:
|
||||
- namespace.yaml
|
||||
- db-init-job.yaml
|
||||
- deployment.yaml
|
||||
- service.yaml
|
||||
- ingress.yaml
|
||||
- pvc.yaml
|
||||
34
outline/versions/1/manifest.yaml
Normal file
34
outline/versions/1/manifest.yaml
Normal file
@@ -0,0 +1,34 @@
|
||||
version: 1.8.1-1
|
||||
requires:
|
||||
- name: postgres
|
||||
- name: redis
|
||||
- name: smtp
|
||||
defaultConfig:
|
||||
namespace: outline
|
||||
externalDnsDomain: '{{ .cloud.domain }}'
|
||||
domain: outline.{{ .cloud.domain }}
|
||||
tlsSecretName: wildcard-wild-cloud-tls
|
||||
storage: 2Gi
|
||||
db:
|
||||
host: '{{ .apps.postgres.host }}'
|
||||
port: '{{ .apps.postgres.port }}'
|
||||
name: outline
|
||||
user: outline
|
||||
redis:
|
||||
host: '{{ .apps.redis.host }}'
|
||||
smtp:
|
||||
host: '{{ .apps.smtp.host }}'
|
||||
port: '{{ .apps.smtp.port }}'
|
||||
from: '{{ .apps.smtp.from }}'
|
||||
user: '{{ .apps.smtp.user }}'
|
||||
defaultSecrets:
|
||||
- key: utilsSecret
|
||||
- key: secretKey
|
||||
default: '{{ crypto.SHA256 .secrets.utilsSecret }}'
|
||||
- key: dbPassword
|
||||
- key: dbUrl
|
||||
default: 'postgres://{{ .app.db.user }}:{{ .secrets.dbPassword }}@{{ .app.db.host }}:{{ .app.db.port }}/{{ .app.db.name }}?sslmode=disable'
|
||||
- key: smtpPassword
|
||||
requiredSecrets:
|
||||
- postgres.password
|
||||
- redis.password
|
||||
4
outline/versions/1/namespace.yaml
Normal file
4
outline/versions/1/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: outline
|
||||
11
outline/versions/1/pvc.yaml
Normal file
11
outline/versions/1/pvc.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: outline-data
|
||||
namespace: outline
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .storage }}
|
||||
13
outline/versions/1/service.yaml
Normal file
13
outline/versions/1/service.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: outline
|
||||
namespace: outline
|
||||
spec:
|
||||
selector:
|
||||
component: web
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: 3000
|
||||
protocol: TCP
|
||||
Reference in New Issue
Block a user