Add CI/CD pipeline, Dockerfiles, and k8s/ArgoCD manifests
- Gitea Actions workflow: build sor-host + sor-admin, push to Harbor, auto-update image tags in k8s manifests (GitOps — ArgoCD watches deploy/k8s/) - Dockerfile.host / Dockerfile.admin: multi-stage .NET 8 builds, non-root runtime - deploy/k8s/: configmap, deployments, services, nginx ingress - hub.aeternalisgames.com → sor-host (WebSocket gateway) - admin.aeternalisgames.com → sor-admin (Blazor admin portal) - hub-tls for hub, cert-manager auto-provisions admin-tls - deploy/secrets/: README + *.yaml.template files to populate (gitignored) - deploy/argo/application.yaml: ArgoCD Application (namespace stone-server) - Root .gitignore: excludes deploy/secrets/*.yaml (never commit populated secrets) Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: sor-admin
|
||||
namespace: stone-server
|
||||
labels:
|
||||
app: sor-admin
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: sor-admin
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: sor-admin
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: harbor-credentials
|
||||
|
||||
containers:
|
||||
- name: sor-admin
|
||||
# CI updates this image tag on every push to master.
|
||||
# TODO: replace with your actual Harbor hostname/project before first deploy.
|
||||
image: harbor.aeternalisgames.com/sor/sor-admin:latest
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
name: sor-config
|
||||
|
||||
env:
|
||||
# Postgres — same database, admin-specific schema access.
|
||||
- name: ConnectionStrings__Default
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: sor-app-secrets
|
||||
key: ConnectionStrings__Default
|
||||
|
||||
# CDN — needed for asset uploads in the admin portal.
|
||||
- name: Cdn__PublicBaseUrl
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: sor-app-secrets
|
||||
key: Cdn__PublicBaseUrl
|
||||
- name: Cdn__UploadBaseUrl
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: sor-app-secrets
|
||||
key: Cdn__UploadBaseUrl
|
||||
- name: Cdn__ApiKey
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: sor-app-secrets
|
||||
key: Cdn__ApiKey
|
||||
|
||||
# ASP.NET Core Data Protection — persists Blazor auth cookies across restarts.
|
||||
# TODO: generate a strong random value and store in sor-app-secrets.
|
||||
- name: DataProtection__ApplicationName
|
||||
value: "sor-admin"
|
||||
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 3
|
||||
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: 8080
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 3
|
||||
failureThreshold: 3
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: "100m"
|
||||
memory: "128Mi"
|
||||
limits:
|
||||
cpu: "500m"
|
||||
memory: "512Mi"
|
||||
Reference in New Issue
Block a user