Initial TafsirQuran app with Gitea CI/CD deploy to k3s.
build-and-deploy / deploy (push) Successful in 10m50s

Blazor UI + ASP.NET API + Postgres; push to main builds images and rolls out namespace tafsirquran.
This commit is contained in:
2026-10-09 21:50:37 +03:30
commit 7f06856f45
124 changed files with 4729 additions and 0 deletions
+210
View File
@@ -0,0 +1,210 @@
apiVersion: v1
kind: Namespace
metadata:
name: tafsirquran
---
apiVersion: v1
kind: Secret
metadata:
name: tafsirquran-secrets
namespace: tafsirquran
type: Opaque
stringData:
POSTGRES_PASSWORD: tafsir_pg_2026
Jwt__Key: TafsirQuran-Prod-Secret-Key-Change-Me-32chars
---
apiVersion: v1
kind: ConfigMap
metadata:
name: tafsirquran-api-env
namespace: tafsirquran
data:
ASPNETCORE_URLS: "http://+:5080"
ConnectionStrings__Default: "Host=tafsirquran-postgres;Port=5432;Database=tafsirquran;Username=tafsir;Password=tafsir_pg_2026"
Jwt__Issuer: "TafsirQuran"
Jwt__Audience: "TafsirQuran"
Jwt__ExpireMinutes: "43200"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: tafsirquran-web-env
namespace: tafsirquran
data:
ASPNETCORE_URLS: "http://+:8080"
ApiBaseAddress: "http://185.252.31.44:30821/"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: tafsirquran-pg-data
namespace: tafsirquran
spec:
accessModes: ["ReadWriteOnce"]
storageClassName: local-path
resources:
requests:
storage: 5Gi
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tafsirquran-postgres
namespace: tafsirquran
spec:
replicas: 1
selector:
matchLabels:
app: tafsirquran-postgres
template:
metadata:
labels:
app: tafsirquran-postgres
spec:
containers:
- name: postgres
image: postgres:16-alpine
ports:
- containerPort: 5432
env:
- name: POSTGRES_USER
value: tafsir
- name: POSTGRES_DB
value: tafsirquran
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: tafsirquran-secrets
key: POSTGRES_PASSWORD
volumeMounts:
- name: data
mountPath: /var/lib/postgresql/data
readinessProbe:
exec:
command: ["pg_isready", "-U", "tafsir", "-d", "tafsirquran"]
initialDelaySeconds: 5
periodSeconds: 5
volumes:
- name: data
persistentVolumeClaim:
claimName: tafsirquran-pg-data
---
apiVersion: v1
kind: Service
metadata:
name: tafsirquran-postgres
namespace: tafsirquran
spec:
selector:
app: tafsirquran-postgres
ports:
- port: 5432
targetPort: 5432
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tafsirquran-api
namespace: tafsirquran
spec:
replicas: 1
selector:
matchLabels:
app: tafsirquran-api
template:
metadata:
labels:
app: tafsirquran-api
spec:
containers:
- name: api
image: tafsirquran-api:latest
imagePullPolicy: Never
ports:
- containerPort: 5080
envFrom:
- configMapRef:
name: tafsirquran-api-env
env:
- name: Jwt__Key
valueFrom:
secretKeyRef:
name: tafsirquran-secrets
key: Jwt__Key
readinessProbe:
httpGet:
path: /
port: 5080
initialDelaySeconds: 10
periodSeconds: 10
livenessProbe:
httpGet:
path: /
port: 5080
initialDelaySeconds: 30
periodSeconds: 20
---
apiVersion: v1
kind: Service
metadata:
name: tafsirquran-api
namespace: tafsirquran
spec:
type: NodePort
selector:
app: tafsirquran-api
ports:
- port: 5080
targetPort: 5080
nodePort: 30821
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: tafsirquran-web
namespace: tafsirquran
spec:
replicas: 1
selector:
matchLabels:
app: tafsirquran-web
template:
metadata:
labels:
app: tafsirquran-web
spec:
containers:
- name: web
image: tafsirquran-web:latest
imagePullPolicy: Never
ports:
- containerPort: 8080
envFrom:
- configMapRef:
name: tafsirquran-web-env
readinessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 10
periodSeconds: 10
livenessProbe:
httpGet:
path: /
port: 8080
initialDelaySeconds: 30
periodSeconds: 20
---
apiVersion: v1
kind: Service
metadata:
name: tafsirquran-web
namespace: tafsirquran
spec:
type: NodePort
selector:
app: tafsirquran-web
ports:
- port: 8080
targetPort: 8080
nodePort: 30820