minor changes to Deployment
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
node_modules
|
||||
apps/dispatch/node_modules
|
||||
apps/dispatch-server/node_modules
|
||||
apps/hub/node_modules
|
||||
apps/hub-server/node_modules
|
||||
packages/database/node_modules
|
||||
packages/eslint-config/node_modules
|
||||
Dockerfile
|
||||
.dockerignore
|
||||
.eslint.config.msj
|
||||
|
||||
12
.env.prod
12
.env.prod
@@ -1,12 +0,0 @@
|
||||
NEXTAUTH_SECRET=dispatch
|
||||
NEXTAUTH_HUB_SECRET=var
|
||||
NEXTAUTH_COOKIE_PREFIX=DISPATCH
|
||||
NEXT_PUBLIC_DISPATCH_SERVER_URL=http://localhost:3002
|
||||
NEXTAUTH_URL=http://localhost:3001
|
||||
NEXT_PUBLIC_HUB_URL=http://localhost:3000
|
||||
NEXT_PUBLIC_PUBLIC_URL=http://localhost:3001
|
||||
NEXT_PUBLIC_SERVICE_ID=1
|
||||
DATABASE_URL=postgresql://persistant-data:persistant-data-pw@postgres:5432/var
|
||||
NEXT_PUBLIC_LIVEKIT_URL=ws://localhost:7880
|
||||
LIVEKIT_API_KEY=APIAnsGdtdYp2Ho
|
||||
LIVEKIT_API_SECRET=tdPjVsYUx8ddC7K9NvdmVAeLRF9GeADD6Fedm1x63fWC
|
||||
@@ -1,24 +1,18 @@
|
||||
FROM node:22-alpine AS base
|
||||
|
||||
|
||||
ENV PNPM_HOME="/usr/local/pnpm"
|
||||
ENV PATH="${PNPM_HOME}:${PATH}"
|
||||
RUN corepack enable && corepack prepare pnpm@latest --activate
|
||||
|
||||
RUN pnpm add -g turbo@^2.5
|
||||
|
||||
ARG DATABASE_URL
|
||||
ENV DATABASE_URL=${DATABASE_URL}
|
||||
|
||||
FROM base AS builder
|
||||
RUN apk update
|
||||
RUN apk add --no-cache libc6-compat
|
||||
|
||||
WORKDIR /usr/app
|
||||
|
||||
|
||||
COPY . .
|
||||
RUN cat .env.prod
|
||||
|
||||
RUN turbo prune dispatch --docker
|
||||
|
||||
@@ -34,9 +28,6 @@ RUN pnpm install --frozen-lockfile
|
||||
# Build the project
|
||||
COPY --from=builder /usr/app/out/full/ .
|
||||
|
||||
COPY --from=builder /usr/app/.env.prod ./apps/dispatch/.env
|
||||
COPY --from=builder /usr/app/.env.prod ./packages/databse/.env
|
||||
|
||||
RUN turbo run build
|
||||
|
||||
FROM base AS runner
|
||||
@@ -52,6 +43,6 @@ USER nextjs
|
||||
COPY --from=installer --chown=nextjs:nodejs /usr/app/ ./
|
||||
|
||||
# Expose the application port
|
||||
EXPOSE 3000
|
||||
EXPOSE 3001
|
||||
|
||||
CMD ["pnpm", "--dir", "apps/dispatch", "run", "start"]
|
||||
@@ -4,20 +4,18 @@ import { AccessToken } from "livekit-server-sdk";
|
||||
import { NextRequest } from "next/server";
|
||||
import { prisma } from "@repo/db";
|
||||
|
||||
if (!process.env.LIVEKIT_API_KEY) throw new Error("LIVEKIT_API_KEY not set");
|
||||
/* if (!process.env.LIVEKIT_API_KEY) throw new Error("LIVEKIT_API_KEY not set");
|
||||
if (!process.env.LIVEKIT_API_SECRET)
|
||||
throw new Error("LIVEKIT_API_SECRET not set");
|
||||
throw new Error("LIVEKIT_API_SECRET not set"); */
|
||||
|
||||
export const GET = async (request: NextRequest) => {
|
||||
const roomName = request.nextUrl.searchParams.get("roomName");
|
||||
|
||||
if (!roomName)
|
||||
return Response.json({ message: "Missing roomName" }, { status: 400 });
|
||||
if (!roomName) return Response.json({ message: "Missing roomName" }, { status: 400 });
|
||||
|
||||
const session = await getServerSession();
|
||||
|
||||
if (!session)
|
||||
return Response.json({ message: "Unauthorized" }, { status: 401 });
|
||||
if (!session) return Response.json({ message: "Unauthorized" }, { status: 401 });
|
||||
const user = await prisma.user.findUnique({
|
||||
where: {
|
||||
id: session.user.id,
|
||||
@@ -29,15 +27,11 @@ export const GET = async (request: NextRequest) => {
|
||||
|
||||
const participantName = user.publicId;
|
||||
|
||||
const at = new AccessToken(
|
||||
process.env.LIVEKIT_API_KEY,
|
||||
process.env.LIVEKIT_API_SECRET,
|
||||
{
|
||||
identity: participantName,
|
||||
// Token to expire after 10 minutes
|
||||
ttl: "1d",
|
||||
},
|
||||
);
|
||||
const at = new AccessToken(process.env.LIVEKIT_API_KEY, process.env.LIVEKIT_API_SECRET, {
|
||||
identity: participantName,
|
||||
// Token to expire after 10 minutes
|
||||
ttl: "1d",
|
||||
});
|
||||
|
||||
at.addGrant({
|
||||
room: roomName,
|
||||
|
||||
64
pnpm-lock.yaml
generated
64
pnpm-lock.yaml
generated
@@ -31,7 +31,7 @@ importers:
|
||||
version: 1.1.6
|
||||
'@livekit/track-processors':
|
||||
specifier: ^0.5.6
|
||||
version: 0.5.6(livekit-client@2.13.3(@types/dom-mediacapture-record@1.0.22))
|
||||
version: 0.5.7(@types/dom-mediacapture-transform@0.1.11)(livekit-client@2.13.3(@types/dom-mediacapture-record@1.0.22))
|
||||
'@next-auth/prisma-adapter':
|
||||
specifier: ^1.0.7
|
||||
version: 1.0.7(@prisma/client@6.8.2(prisma@6.8.2(typescript@5.8.3))(typescript@5.8.3))(next-auth@4.24.11(next@15.3.2(@babel/core@7.27.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(nodemailer@6.10.1)(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
|
||||
@@ -46,7 +46,7 @@ importers:
|
||||
version: 4.1.7
|
||||
'@tanstack/react-query':
|
||||
specifier: ^5.75.4
|
||||
version: 5.77.0(react@19.1.0)
|
||||
version: 5.77.2(react@19.1.0)
|
||||
'@types/jsonwebtoken':
|
||||
specifier: ^9.0.9
|
||||
version: 9.0.9
|
||||
@@ -234,7 +234,7 @@ importers:
|
||||
version: link:../../packages/database
|
||||
'@tanstack/react-query':
|
||||
specifier: ^5.67.2
|
||||
version: 5.77.0(react@19.1.0)
|
||||
version: 5.77.2(react@19.1.0)
|
||||
'@tanstack/react-table':
|
||||
specifier: ^8.20.6
|
||||
version: 8.21.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
@@ -282,7 +282,7 @@ importers:
|
||||
version: 19.1.0
|
||||
react-datepicker:
|
||||
specifier: ^8.1.0
|
||||
version: 8.3.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
version: 8.4.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
react-day-picker:
|
||||
specifier: ^9.6.2
|
||||
version: 9.7.0(react@19.1.0)
|
||||
@@ -634,8 +634,8 @@ packages:
|
||||
react: '>=16.8.0'
|
||||
react-dom: '>=16.8.0'
|
||||
|
||||
'@floating-ui/react@0.27.8':
|
||||
resolution: {integrity: sha512-EQJ4Th328y2wyHR3KzOUOoTW2UKjFk53fmyahfwExnFQ8vnsMYqKc+fFPOkeYtj5tcp1DUMiNJ7BFhed7e9ONw==}
|
||||
'@floating-ui/react@0.27.9':
|
||||
resolution: {integrity: sha512-Y0aCJBNtfVF6ikI1kVzA0WzSAhVBz79vFWOhvb5MLCRNODZ1ylGSLTuncchR7JsLyn9QzV6JD44DyZhhOtvpRw==}
|
||||
peerDependencies:
|
||||
react: '>=17.0.0'
|
||||
react-dom: '>=17.0.0'
|
||||
@@ -839,9 +839,10 @@ packages:
|
||||
'@livekit/protocol@1.38.0':
|
||||
resolution: {integrity: sha512-XX6ulvsE1XCN18LVf3ydHN7Ri1Z1M1P5dQdjnm5nVDsSqUL12Vbo/4RKcRlCEXAg2qB62mKjcaVLXVwkfXggkg==}
|
||||
|
||||
'@livekit/track-processors@0.5.6':
|
||||
resolution: {integrity: sha512-TlzObrSlp2PKor4VXqg6iefLRFVEb2T1lXwddBFdkPod60XVgYoMOj7V5xJm+UTE2MEtlE0003vUli9PyQGB1g==}
|
||||
'@livekit/track-processors@0.5.7':
|
||||
resolution: {integrity: sha512-/2SkuVAF+YiPNtOi9zQJz/yH1WGaK53XZ3PaESpLOiEYUBsYky13BrriXCXUf6kwn5R5+7ZsYWc2k3XSsAuLtg==}
|
||||
peerDependencies:
|
||||
'@types/dom-mediacapture-transform': ^0.1.9
|
||||
livekit-client: ^1.12.0 || ^2.1.0
|
||||
|
||||
'@mediapipe/tasks-vision@0.10.14':
|
||||
@@ -1249,11 +1250,11 @@ packages:
|
||||
'@tailwindcss/postcss@4.1.7':
|
||||
resolution: {integrity: sha512-88g3qmNZn7jDgrrcp3ZXEQfp9CVox7xjP1HN2TFKI03CltPVd/c61ydn5qJJL8FYunn0OqBaW5HNUga0kmPVvw==}
|
||||
|
||||
'@tanstack/query-core@5.77.0':
|
||||
resolution: {integrity: sha512-PFeWjgMQjOsnxBwnW/TJoO0pCja2dzuMQoZ3Diho7dPz7FnTUwTrjNmdf08evrhSE5nvPIKeqV6R0fvQfmhGeg==}
|
||||
'@tanstack/query-core@5.77.2':
|
||||
resolution: {integrity: sha512-1lqJwPsR6GX6nZFw06erRt518O19tWU6Q+x0fJUygl4lxHCYF2nhzBPwLKk2NPjYOrpR0K567hxPc5K++xDe9Q==}
|
||||
|
||||
'@tanstack/react-query@5.77.0':
|
||||
resolution: {integrity: sha512-jX52ot8WxWzWnAknpRSEWj6PTR/7nkULOfoiaVPk6nKu0otwt30UMBC9PTg/m1x0uhz1g71/imwjViTm/oYHxA==}
|
||||
'@tanstack/react-query@5.77.2':
|
||||
resolution: {integrity: sha512-BRHxWdy1mHmgAcYA/qy2IPLylT81oebLgkm9K85viN2Qol/Vq48t1dzDFeDIVQjTWDV96AmqsLNPlH5HjyKCxA==}
|
||||
peerDependencies:
|
||||
react: ^18 || ^19
|
||||
|
||||
@@ -1294,6 +1295,12 @@ packages:
|
||||
'@types/dom-mediacapture-record@1.0.22':
|
||||
resolution: {integrity: sha512-mUMZLK3NvwRLcAAT9qmcK+9p7tpU2FHdDsntR3YI4+GY88XrgG4XiE7u1Q2LAN2/FZOz/tdMDC3GQCR4T8nFuw==}
|
||||
|
||||
'@types/dom-mediacapture-transform@0.1.11':
|
||||
resolution: {integrity: sha512-Y2p+nGf1bF2XMttBnsVPHUWzRRZzqUoJAKmiP10b5umnO6DDrWI0BrGDJy1pOHoOULVmGSfFNkQrAlC5dcj6nQ==}
|
||||
|
||||
'@types/dom-webcodecs@0.1.15':
|
||||
resolution: {integrity: sha512-omOlCPvTWyPm4ZE5bZUhlSvnHM2ZWM2U+1cPiYFL/e8aV5O9MouELp+L4dMKNTON0nTeHqEg+KWDfFQMY5Wkaw==}
|
||||
|
||||
'@types/eslint-scope@3.7.7':
|
||||
resolution: {integrity: sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg==}
|
||||
|
||||
@@ -3594,8 +3601,8 @@ packages:
|
||||
resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==}
|
||||
engines: {node: '>= 0.8'}
|
||||
|
||||
react-datepicker@8.3.0:
|
||||
resolution: {integrity: sha512-DhfrIJnTPJTUVRtXU7c7zooug40rD6q+Fc8UTCt19dYEotLpDQgTN98MfocY6Rc4S99oOFFEoxyanOM/TKauuw==}
|
||||
react-datepicker@8.4.0:
|
||||
resolution: {integrity: sha512-6nPDnj8vektWCIOy9ArS3avus9Ndsyz5XgFCJ7nBxXASSpBdSL6lG9jzNNmViPOAOPh6T5oJyGaXuMirBLECag==}
|
||||
peerDependencies:
|
||||
react: ^16.9.0 || ^17 || ^18 || ^19 || ^19.0.0-rc
|
||||
react-dom: ^16.9.0 || ^17 || ^18 || ^19 || ^19.0.0-rc
|
||||
@@ -4027,8 +4034,8 @@ packages:
|
||||
engines: {node: '>=10'}
|
||||
hasBin: true
|
||||
|
||||
tinyglobby@0.2.13:
|
||||
resolution: {integrity: sha512-mEwzpUgrLySlveBwEVDMKk5B57bhLPYovRfPAXD5gA/98Opn0rCDj3GtLwFvCvH5RK9uPCExUROW5NjDwvqkxw==}
|
||||
tinyglobby@0.2.14:
|
||||
resolution: {integrity: sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
|
||||
to-regex-range@5.0.1:
|
||||
@@ -4622,7 +4629,7 @@ snapshots:
|
||||
react: 19.1.0
|
||||
react-dom: 19.1.0(react@19.1.0)
|
||||
|
||||
'@floating-ui/react@0.27.8(react-dom@19.1.0(react@19.1.0))(react@19.1.0)':
|
||||
'@floating-ui/react@0.27.9(react-dom@19.1.0(react@19.1.0))(react@19.1.0)':
|
||||
dependencies:
|
||||
'@floating-ui/react-dom': 2.1.2(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
'@floating-ui/utils': 0.2.9
|
||||
@@ -4783,9 +4790,10 @@ snapshots:
|
||||
dependencies:
|
||||
'@bufbuild/protobuf': 1.10.1
|
||||
|
||||
'@livekit/track-processors@0.5.6(livekit-client@2.13.3(@types/dom-mediacapture-record@1.0.22))':
|
||||
'@livekit/track-processors@0.5.7(@types/dom-mediacapture-transform@0.1.11)(livekit-client@2.13.3(@types/dom-mediacapture-record@1.0.22))':
|
||||
dependencies:
|
||||
'@mediapipe/tasks-vision': 0.10.14
|
||||
'@types/dom-mediacapture-transform': 0.1.11
|
||||
livekit-client: 2.13.3(@types/dom-mediacapture-record@1.0.22)
|
||||
|
||||
'@mediapipe/tasks-vision@0.10.14': {}
|
||||
@@ -5136,11 +5144,11 @@ snapshots:
|
||||
postcss: 8.5.3
|
||||
tailwindcss: 4.1.7
|
||||
|
||||
'@tanstack/query-core@5.77.0': {}
|
||||
'@tanstack/query-core@5.77.2': {}
|
||||
|
||||
'@tanstack/react-query@5.77.0(react@19.1.0)':
|
||||
'@tanstack/react-query@5.77.2(react@19.1.0)':
|
||||
dependencies:
|
||||
'@tanstack/query-core': 5.77.0
|
||||
'@tanstack/query-core': 5.77.2
|
||||
react: 19.1.0
|
||||
|
||||
'@tanstack/react-table@8.21.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0)':
|
||||
@@ -5181,6 +5189,12 @@ snapshots:
|
||||
|
||||
'@types/dom-mediacapture-record@1.0.22': {}
|
||||
|
||||
'@types/dom-mediacapture-transform@0.1.11':
|
||||
dependencies:
|
||||
'@types/dom-webcodecs': 0.1.15
|
||||
|
||||
'@types/dom-webcodecs@0.1.15': {}
|
||||
|
||||
'@types/eslint-scope@3.7.7':
|
||||
dependencies:
|
||||
'@types/eslint': 9.6.1
|
||||
@@ -6218,7 +6232,7 @@ snapshots:
|
||||
get-tsconfig: 4.10.1
|
||||
is-bun-module: 2.0.0
|
||||
stable-hash: 0.0.5
|
||||
tinyglobby: 0.2.13
|
||||
tinyglobby: 0.2.14
|
||||
unrs-resolver: 1.7.2
|
||||
optionalDependencies:
|
||||
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.32.1(eslint@9.27.0(jiti@2.4.2))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.27.0(jiti@2.4.2))
|
||||
@@ -7897,9 +7911,9 @@ snapshots:
|
||||
iconv-lite: 0.4.24
|
||||
unpipe: 1.0.0
|
||||
|
||||
react-datepicker@8.3.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0):
|
||||
react-datepicker@8.4.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0):
|
||||
dependencies:
|
||||
'@floating-ui/react': 0.27.8(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
'@floating-ui/react': 0.27.9(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
|
||||
clsx: 2.1.1
|
||||
date-fns: 4.1.0
|
||||
react: 19.1.0
|
||||
@@ -8530,7 +8544,7 @@ snapshots:
|
||||
commander: 2.20.3
|
||||
source-map-support: 0.5.21
|
||||
|
||||
tinyglobby@0.2.13:
|
||||
tinyglobby@0.2.14:
|
||||
dependencies:
|
||||
fdir: 6.4.4(picomatch@4.0.2)
|
||||
picomatch: 4.0.2
|
||||
|
||||
Reference in New Issue
Block a user