diff --git a/.env.prod b/.env.prod index 38414e75..ccecadc5 100644 --- a/.env.prod +++ b/.env.prod @@ -7,18 +7,18 @@ AUTH_HUB_SECRET=var AUTH_DISPATCH_COOKIE_PREFIX=DISPATCH AUTH_HUB_COOKIE_PREFIX=HUB -AUTH_DISPATCH_URL=http://localhost:3001 -AUTH_HUB_URL=http://localhost:3000 +AUTH_DISPATCH_URL=http://premiumag.de:3001 +AUTH_HUB_URL=http://premiumag.de:3000 NEXT_PUBLIC_DISPATCH_SERVICE_ID=1 # ─────────────────────────────────────────────── # 🌐 Öffentliche URLs # ─────────────────────────────────────────────── -NEXT_PUBLIC_HUB_URL=http://localhost:3000 -NEXT_PUBLIC_HUB_SERVER_URL=http://localhost:3003 -NEXT_PUBLIC_DISPATCH_URL=http://localhost:3001 -NEXT_PUBLIC_DISPATCH_SERVER_URL=http://localhost:3002 +NEXT_PUBLIC_HUB_URL=http://premiumag.de:3000 +NEXT_PUBLIC_HUB_SERVER_URL=http://premiumag.de:3003 +NEXT_PUBLIC_DISPATCH_URL=http://premiumag.de:3001 +NEXT_PUBLIC_DISPATCH_SERVER_URL=http://premiumag.de:3002 # ─────────────────────────────────────────────── # 🗄️ Datenbank @@ -50,10 +50,10 @@ HUB_URL= # ─────────────────────────────────────────────── # 📚 Moodle # ─────────────────────────────────────────────── -MOODLE_URL=http://localhost:8081 +MOODLE_URL=http://premiumag.de:8081 MOODLE_API_TOKEN=ac346f0324647b68488d13fd52a9bbe8 MOODLE_USER_PASSWORD=var-api-user-P1 -NEXT_PUBLIC_MOODLE_URL=http://localhost:8081 +NEXT_PUBLIC_MOODLE_URL=http://premiumag.de:8081 # ─────────────────────────────────────────────── # 📧 E-Mail Einstellungen (nur HUB Server) diff --git a/apps/dispatch-server/socket-events/send-message.ts b/apps/dispatch-server/socket-events/send-message.ts index 2dbcb2e1..cafa37b2 100644 --- a/apps/dispatch-server/socket-events/send-message.ts +++ b/apps/dispatch-server/socket-events/send-message.ts @@ -40,7 +40,6 @@ export const handleSendMessage = const recvSockets = await io.in(`user:${userId}`).fetchSockets(); await io.in(`user:${senderId}`).fetchSockets(); - console.log(`Sockets in room user:${userId}:`); if (!recvSockets.length) { cb({ error: "User is not connected" }); } else { diff --git a/apps/dispatch/app/api/missions/route.ts b/apps/dispatch/app/api/missions/route.ts index acc3fd3c..8d149b40 100644 --- a/apps/dispatch/app/api/missions/route.ts +++ b/apps/dispatch/app/api/missions/route.ts @@ -6,7 +6,6 @@ export async function GET(req: NextRequest): Promise { const id = searchParams.get("id"); const filter = searchParams.get("filter"); - console.log(filter); const filterParsed = JSON.parse(filter || "{}"); try { @@ -20,9 +19,6 @@ export async function GET(req: NextRequest): Promise { return NextResponse.json(data, { status: 200 }); } catch (error) { console.error(error); - return NextResponse.json( - { error: "Failed to fetch mission" }, - { status: 500 }, - ); + return NextResponse.json({ error: "Failed to fetch mission" }, { status: 500 }); } } diff --git a/docker-compose.prod.yml b/docker-compose.prod.yml index dfac80a6..eadaf2e5 100644 --- a/docker-compose.prod.yml +++ b/docker-compose.prod.yml @@ -1,5 +1,7 @@ services: dispatch: + deploy: + replicas: 3 build: context: . dockerfile: ./apps/dispatch/Dockerfile @@ -47,6 +49,8 @@ services: postgres: condition: service_healthy dispatch-server: + deploy: + replicas: 3 build: context: . dockerfile: ./apps/dispatch-server/Dockerfile