This commit is contained in:
parent
d2e826c83f
commit
d891d0be13
@ -1,21 +0,0 @@
|
|||||||
name: "Deploy SSR"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- name: Cloning repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Push to dokku
|
|
||||||
uses: dokku/github-action@master
|
|
||||||
with:
|
|
||||||
git_remote_url: "ssh://dokku@10.0.50.65:22/ssr"
|
|
||||||
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
29
.drone.yml
29
.drone.yml
@ -1,29 +0,0 @@
|
|||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: kubernetes
|
|
||||||
name: ssr-deploy
|
|
||||||
|
|
||||||
steps:
|
|
||||||
# - name: Build Docker Image
|
|
||||||
# image: plugins/docker
|
|
||||||
# settings:
|
|
||||||
# registry: git.fascinated.cc
|
|
||||||
# repo: git.fascinated.cc/fascinated/scoresaber-reloaded
|
|
||||||
# username:
|
|
||||||
# from_secret: username
|
|
||||||
# password:
|
|
||||||
# from_secret: token
|
|
||||||
# tags:
|
|
||||||
# - latest
|
|
||||||
|
|
||||||
- name: Deploy SSR
|
|
||||||
image: danielgormly/drone-plugin-kube:0.2.0
|
|
||||||
settings:
|
|
||||||
build_number: ${DRONE_BUILD_NUMBER}
|
|
||||||
template: deployment.yaml
|
|
||||||
ca:
|
|
||||||
from_secret: k8s_crt
|
|
||||||
server:
|
|
||||||
from_secret: k8s_server
|
|
||||||
token:
|
|
||||||
from_secret: k8s_token
|
|
@ -29,38 +29,3 @@ spec:
|
|||||||
limits:
|
limits:
|
||||||
cpu: 1000m # 1 vCPU
|
cpu: 1000m # 1 vCPU
|
||||||
memory: 200Mi
|
memory: 200Mi
|
||||||
---
|
|
||||||
apiVersion: traefik.io/v1alpha1
|
|
||||||
kind: IngressRoute
|
|
||||||
metadata:
|
|
||||||
name: scoresaber-reloaded-ingress
|
|
||||||
namespace: public-services
|
|
||||||
annotations:
|
|
||||||
kubernetes.io/ingress.class: traefik-external
|
|
||||||
spec:
|
|
||||||
entryPoints:
|
|
||||||
- websecure
|
|
||||||
routes:
|
|
||||||
- match: Host(`ssr-staging.fascinated.cc`)
|
|
||||||
kind: Rule
|
|
||||||
middlewares:
|
|
||||||
- name: default-headers
|
|
||||||
namespace: traefik
|
|
||||||
services:
|
|
||||||
- name: scoresaber-reloaded-service
|
|
||||||
port: 3000
|
|
||||||
tls:
|
|
||||||
secretName: fascinated-cc
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: scoresaber-reloaded-service
|
|
||||||
namespace: public-services
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
ports:
|
|
||||||
- port: 3000
|
|
||||||
targetPort: 3000
|
|
||||||
selector:
|
|
||||||
app: scoresaber-reloaded
|
|
22
.gitea/kubernetes/ingress.yaml
Normal file
22
.gitea/kubernetes/ingress.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: scoresaber-reloaded-ingress
|
||||||
|
namespace: public-services
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik-external
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
- match: Host(`ssr-staging.fascinated.cc`)
|
||||||
|
kind: Rule
|
||||||
|
middlewares:
|
||||||
|
- name: default-headers
|
||||||
|
namespace: traefik
|
||||||
|
services:
|
||||||
|
- name: scoresaber-reloaded-service
|
||||||
|
port: 3000
|
||||||
|
tls:
|
||||||
|
secretName: fascinated-cc
|
13
.gitea/kubernetes/service.yaml
Normal file
13
.gitea/kubernetes/service.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: scoresaber-reloaded-service
|
||||||
|
namespace: public-services
|
||||||
|
spec:
|
||||||
|
type: ClusterIP
|
||||||
|
ports:
|
||||||
|
- port: 3000
|
||||||
|
targetPort: 3000
|
||||||
|
selector:
|
||||||
|
app: scoresaber-reloaded
|
40
.gitea/workflows/deploy.yml
Normal file
40
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
name: "Deploy"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||||
|
registry: git.fascinated.cc
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
push: true
|
||||||
|
tags: fascinated/scoresaber-reloaded:latest
|
||||||
|
|
||||||
|
- name: Set up Kubectl
|
||||||
|
uses: azure/k8s-set-context@v1
|
||||||
|
with:
|
||||||
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
||||||
|
|
||||||
|
- name: Deploy
|
||||||
|
run: |
|
||||||
|
kubectl apply -f ./gitea/kubernetes/deployment.yaml
|
||||||
|
kubectl apply -f ./gitea/kubernetes/service.yaml
|
||||||
|
kubectl apply -f ./gitea/kubernetes/ingress.yaml
|
Reference in New Issue
Block a user