feat: migrate realtime-collab from Docker Compose to k3s

Add k3s manifests for postgres, redis, and backend

Fix users table constraint and init.sql
This commit is contained in:
M1ngdaXie
2026-03-25 01:11:10 +00:00
parent 9c19769eb0
commit afb04e5cd3
7 changed files with 390 additions and 1 deletions

25
k3s/secret.example.yaml Normal file
View File

@@ -0,0 +1,25 @@
apiVersion: v1
kind: Secret
metadata:
name: realtime-collab-secret
type: Opaque
stringData:
# Postgres
POSTGRES_USER: "replace"
POSTGRES_PASSWORD: "replace"
POSTGRES_DB: "replace"
# Backend
DATABASE_URL: "postgres://user:pass@postgres:5432/dbname?sslmode=disable"
REDIS_URL: "redis://redis:6379"
JWT_SECRET: "replace"
PORT: "8080"
ENVIRONMENT: "production"
BACKEND_URL: "https://collab.m1ngdaxie.com"
FRONTEND_URL: "https://collab.m1ngdaxie.com"
ALLOWED_ORIGINS: "https://collab.m1ngdaxie.com"
GOOGLE_CLIENT_ID: "replace"
GOOGLE_CLIENT_SECRET: "replace"
GOOGLE_REDIRECT_URL: "https://collab.m1ngdaxie.com/api/auth/google/callback"
GITHUB_CLIENT_ID: "replace"
GITHUB_CLIENT_SECRET: "replace"
GITHUB_REDIRECT_URL: "https://collab.m1ngdaxie.com/api/auth/github/callback"