Add traefik middleware for phantom-tokens

This commit is contained in:
2025-03-21 19:54:45 +01:00
parent 808ee3a8c2
commit 631967567f
6 changed files with 201 additions and 3 deletions
+2
View File
@@ -1,6 +1,8 @@
# vi: ft=sh
# shellcheck disable=SC2034
KYOO_PREFIX=/api
# either an hard-coded secret to decode jwts or empty to use keibi's public secret.
# this should only be used in tests
JWT_SECRET=
+1 -1
View File
@@ -24,6 +24,6 @@ WORKDIR /app
COPY --from=builder /app/server server
ENV NODE_ENV=production
EXPOSE 3000
EXPOSE 3567
CMD ["./server"]
+10
View File
@@ -0,0 +1,10 @@
FROM oven/bun AS builder
WORKDIR /app
COPY package.json bun.lock .
COPY patches patches
RUN bun install --production
EXPOSE 3567
CMD ["bun", "dev"]
+1 -1
View File
@@ -46,7 +46,7 @@ export const base = new Elysia({ name: "base" })
})
.as("plugin");
export const app = new Elysia()
export const app = new Elysia({ prefix: process.env.KYOO_PREFIX })
.use(base)
.use(showsH)
.use(movies)
+1 -1
View File
@@ -77,6 +77,6 @@ app
},
}),
)
.listen(3000);
.listen(3567);
console.log(`Api running at ${app.server?.hostname}:${app.server?.port}`);