deploy backend
This commit is contained in:
parent
c1fe5f2884
commit
498492bb91
28
.gitea/kubernetes/backend/deployment.yaml
Normal file
28
.gitea/kubernetes/backend/deployment.yaml
Normal file
@ -0,0 +1,28 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: scoresaber-reloaded-backend
|
||||
namespace: public-services
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: scoresaber-reloaded-backend
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: scoresaber-reloaded-backend
|
||||
spec:
|
||||
containers:
|
||||
- name: scoresaber-reloaded-backend-container
|
||||
image: git.fascinated.cc/fascinated/scoresaber-reloaded-backend:latest
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 1000m # 1 vCPU
|
||||
memory: 512Mi
|
24
.gitea/kubernetes/backend/ingress.yaml
Normal file
24
.gitea/kubernetes/backend/ingress.yaml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRoute
|
||||
metadata:
|
||||
name: scoresaber-reloaded-backend-ingress
|
||||
namespace: public-services
|
||||
annotations:
|
||||
kubernetes.io/ingress.class: traefik-external
|
||||
spec:
|
||||
entryPoints:
|
||||
- websecure
|
||||
routes:
|
||||
- match: Host(`ssr.fascinated.cc`) && PathPrefix(`/api`)
|
||||
kind: Rule
|
||||
middlewares:
|
||||
- name: default-headers
|
||||
namespace: traefik
|
||||
- name: compress
|
||||
namespace: traefik
|
||||
services:
|
||||
- name: scoresaber-reloaded-backend-service
|
||||
port: 3000
|
||||
tls:
|
||||
secretName: fascinated-cc
|
13
.gitea/kubernetes/backend/service.yaml
Normal file
13
.gitea/kubernetes/backend/service.yaml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: scoresaber-reloaded-backend-service
|
||||
namespace: public-services
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 8080
|
||||
targetPort: 8080
|
||||
selector:
|
||||
app: scoresaber-reloaded-backend
|
@ -7,6 +7,8 @@ on:
|
||||
- master
|
||||
paths:
|
||||
- backend/**
|
||||
- .gitea/kubernetes/backend/**
|
||||
- .gitea/workflows/deploy-backend.yml
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
@ -47,15 +49,15 @@ jobs:
|
||||
with:
|
||||
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||
|
||||
# - name: Deploy to Kubernetes
|
||||
# uses: Azure/k8s-deploy@v5
|
||||
# with:
|
||||
# action: deploy
|
||||
# namespace: public-services
|
||||
# manifests: |
|
||||
# .gitea/kubernetes/sealed-secrets.yaml
|
||||
# .gitea/kubernetes/deployment.yaml
|
||||
# .gitea/kubernetes/service.yaml
|
||||
# .gitea/kubernetes/ingress.yaml
|
||||
# images: |
|
||||
# git.fascinated.cc/fascinated/scoresaber-reloaded-backend:${{ github.sha }}
|
||||
- name: Deploy to Kubernetes
|
||||
uses: Azure/k8s-deploy@v5
|
||||
with:
|
||||
action: deploy
|
||||
namespace: public-services
|
||||
manifests: |
|
||||
.gitea/kubernetes/backend/sealed-secrets.yaml
|
||||
.gitea/kubernetes/backend/deployment.yaml
|
||||
.gitea/kubernetes/backend/service.yaml
|
||||
.gitea/kubernetes/backend/ingress.yaml
|
||||
images: |
|
||||
git.fascinated.cc/fascinated/scoresaber-reloaded-backend:${{ github.sha }}
|
||||
|
@ -7,6 +7,8 @@ on:
|
||||
- master
|
||||
paths:
|
||||
- website/**
|
||||
- .gitea/kubernetes/website/**
|
||||
- .gitea/workflows/deploy-website.yml
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
@ -53,9 +55,9 @@ jobs:
|
||||
action: deploy
|
||||
namespace: public-services
|
||||
manifests: |
|
||||
.gitea/kubernetes/sealed-secrets.yaml
|
||||
.gitea/kubernetes/deployment.yaml
|
||||
.gitea/kubernetes/service.yaml
|
||||
.gitea/kubernetes/ingress.yaml
|
||||
.gitea/kubernetes/website/sealed-secrets.yaml
|
||||
.gitea/kubernetes/website/deployment.yaml
|
||||
.gitea/kubernetes/website/service.yaml
|
||||
.gitea/kubernetes/website/ingress.yaml
|
||||
images: |
|
||||
git.fascinated.cc/fascinated/scoresaber-reloaded-website:${{ github.sha }}
|
||||
|
Reference in New Issue
Block a user