spacerace.systems moved
This commit is contained in:
1 parent
fa11315a0c
commit
b63e21587f
13 files changed
+470
-150
No files matched your search
@@ -0,0 +1,27 @@
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: spacerace-api
|
||||
annotations:
|
||||
cert-manager.io/issuer: "letsencrypt-prod"
|
||||
# don't do this again
|
||||
nginx.ingress.kubernetes.io/use-regex: "true"
|
||||
nginx.ingress.kubernetes.io/rewrite-target: /$2
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- spacerace.systems
|
||||
secretName: spacerace-systems-tls
|
||||
rules:
|
||||
- host: spacerace.systems
|
||||
http:
|
||||
paths:
|
||||
- path: /api(/|$)(.*)
|
||||
pathType: ImplementationSpecific
|
||||
backend:
|
||||
service:
|
||||
name: spacerace-api
|
||||
port:
|
||||
number: 80
|
||||
@@ -0,0 +1,132 @@
|
||||
# -----------------------------------------------------------------------
|
||||
# VOLUMES
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: spacerace-postgres-pv
|
||||
spec:
|
||||
storageClassName: ""
|
||||
capacity:
|
||||
storage: 1Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
claimRef:
|
||||
namespace: default
|
||||
name: spacerace-postgres-pvc
|
||||
hostPath:
|
||||
path: "/var/lib/rancher/k3s/storage/spacerace-postgres-pv"
|
||||
type: DirectoryOrCreate
|
||||
|
||||
---
|
||||
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: spacerace-postgres-pvc
|
||||
spec:
|
||||
volumeName: spacerace-postgres-pv
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 1Gi
|
||||
|
||||
---
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# DEPLOYMENTS
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: spacerace-postgres
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: spacerace-postgres
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: spacerace-postgres
|
||||
spec:
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:latest
|
||||
ports:
|
||||
- containerPort: 5432
|
||||
env:
|
||||
- name: POSTGRES_DB
|
||||
value: spacerace
|
||||
- name: POSTGRES_USER
|
||||
value: spacerace
|
||||
- name: POSTGRES_PASSWORD
|
||||
value: zoomzoom
|
||||
volumeMounts:
|
||||
- name: spacerace-postgres-storage
|
||||
mountPath: /var/lib/postgresql/data
|
||||
|
||||
volumes:
|
||||
- name: spacerace-postgres-storage
|
||||
persistentVolumeClaim:
|
||||
claimName: spacerace-postgres-pvc
|
||||
|
||||
---
|
||||
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: spacerace-api
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: spacerace-api
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: spacerace-api
|
||||
spec:
|
||||
containers:
|
||||
- name: spacerace-api
|
||||
image: registry.strix.systems/spacerace-api
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 80
|
||||
env:
|
||||
- name: CONNECTIONSTRINGS__SPACERACE
|
||||
value: "Server=spacerace-postgres;Port=5432;Database=spacerace;User Id=spacerace;Password=zoomzoom"
|
||||
|
||||
---
|
||||
|
||||
# -----------------------------------------------------------------------
|
||||
# SERVICES
|
||||
# -----------------------------------------------------------------------
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: spacerace-api
|
||||
spec:
|
||||
selector:
|
||||
app: spacerace-api
|
||||
ports:
|
||||
- port: 80
|
||||
|
||||
---
|
||||
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: spacerace-postgres
|
||||
spec:
|
||||
selector:
|
||||
app: spacerace-postgres
|
||||
ports:
|
||||
- port: 5432
|
||||
Reference in new issue
Block a user