first commit

This commit is contained in:
sttlab
2026-07-22 14:41:10 +00:00
commit e1577fe061
35 changed files with 1847 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
# One-off Job to create the "n8n" database on the shared Postgres instance.
# Mirrors k8s/miniflux/create-db-job.yaml.
apiVersion: batch/v1
kind: Job
metadata:
name: create-db-n8n
namespace: postgres
spec:
backoffLimit: 3
template:
spec:
restartPolicy: Never
containers:
- name: create-db
image: postgres:18-alpine
envFrom:
- secretRef:
name: postgres-admin
command:
- sh
- -c
- |
set -e
psql "postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres-postgresql:5432/postgres" \
-tc "SELECT 1 FROM pg_database WHERE datname = 'n8n'" | grep -q 1 \
|| psql "postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres-postgresql:5432/postgres" \
-c "CREATE DATABASE n8n"