This commit is contained in:
parent
a8c40f50d6
commit
37b491a0b5
@ -24,3 +24,29 @@ spec:
|
|||||||
port: 8080
|
port: 8080
|
||||||
tls:
|
tls:
|
||||||
secretName: fascinated-cc
|
secretName: fascinated-cc
|
||||||
|
---
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: IngressRoute
|
||||||
|
metadata:
|
||||||
|
name: scoresaber-reloaded-backend-swagger-ingress
|
||||||
|
namespace: public-services
|
||||||
|
annotations:
|
||||||
|
kubernetes.io/ingress.class: traefik-external
|
||||||
|
spec:
|
||||||
|
entryPoints:
|
||||||
|
- websecure
|
||||||
|
routes:
|
||||||
|
- match: Host(`ssr.fascinated.cc`) && PathPrefix(`/swagger`)
|
||||||
|
kind: Rule
|
||||||
|
middlewares:
|
||||||
|
- name: default-headers
|
||||||
|
namespace: traefik
|
||||||
|
- name: compress
|
||||||
|
namespace: traefik
|
||||||
|
- name: scoresaber-reloaded-backend-strip-swagger-prefix
|
||||||
|
namespace: public-services
|
||||||
|
services:
|
||||||
|
- name: scoresaber-reloaded-backend-service
|
||||||
|
port: 8080
|
||||||
|
tls:
|
||||||
|
secretName: fascinated-cc
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: Middleware
|
||||||
|
metadata:
|
||||||
|
name: scoresaber-reloaded-backend-strip-swagger-prefix
|
||||||
|
namespace: public-services
|
||||||
|
spec:
|
||||||
|
stripPrefix:
|
||||||
|
prefixes:
|
||||||
|
- "/swagger"
|
@ -59,6 +59,7 @@ jobs:
|
|||||||
.gitea/kubernetes/backend/deployment.yaml
|
.gitea/kubernetes/backend/deployment.yaml
|
||||||
.gitea/kubernetes/backend/service.yaml
|
.gitea/kubernetes/backend/service.yaml
|
||||||
.gitea/kubernetes/backend/strip-api-prefix-middleware.yaml
|
.gitea/kubernetes/backend/strip-api-prefix-middleware.yaml
|
||||||
|
.gitea/kubernetes/backend/strip-swagger-prefix-middleware.yaml
|
||||||
.gitea/kubernetes/backend/ingress.yaml
|
.gitea/kubernetes/backend/ingress.yaml
|
||||||
images: |
|
images: |
|
||||||
git.fascinated.cc/fascinated/scoresaber-reloaded-backend:${{ github.sha }}
|
git.fascinated.cc/fascinated/scoresaber-reloaded-backend:${{ github.sha }}
|
||||||
|
@ -24,6 +24,7 @@ import ScoresController from "./controller/scores.controller";
|
|||||||
import LeaderboardController from "./controller/leaderboard.controller";
|
import LeaderboardController from "./controller/leaderboard.controller";
|
||||||
import { DiscordChannels, initDiscordBot, logToChannel } from "./bot/bot";
|
import { DiscordChannels, initDiscordBot, logToChannel } from "./bot/bot";
|
||||||
import { EmbedBuilder } from "discord.js";
|
import { EmbedBuilder } from "discord.js";
|
||||||
|
import { getAppVersion } from "./common/app.util";
|
||||||
|
|
||||||
// Load .env file
|
// Load .env file
|
||||||
dotenv.config({
|
dotenv.config({
|
||||||
@ -163,7 +164,12 @@ app.use(
|
|||||||
*/
|
*/
|
||||||
app.use(
|
app.use(
|
||||||
swagger({
|
swagger({
|
||||||
path: isProduction() ? "/api/swagger" : "/swagger",
|
documentation: {
|
||||||
|
info: {
|
||||||
|
title: "ScoreSaber Reloaded Documentation",
|
||||||
|
version: await getAppVersion(),
|
||||||
|
},
|
||||||
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user