added replicas for docker swarm
This commit is contained in:
16
.env.prod
16
.env.prod
@@ -7,18 +7,18 @@ AUTH_HUB_SECRET=var
|
|||||||
AUTH_DISPATCH_COOKIE_PREFIX=DISPATCH
|
AUTH_DISPATCH_COOKIE_PREFIX=DISPATCH
|
||||||
AUTH_HUB_COOKIE_PREFIX=HUB
|
AUTH_HUB_COOKIE_PREFIX=HUB
|
||||||
|
|
||||||
AUTH_DISPATCH_URL=http://localhost:3001
|
AUTH_DISPATCH_URL=http://premiumag.de:3001
|
||||||
AUTH_HUB_URL=http://localhost:3000
|
AUTH_HUB_URL=http://premiumag.de:3000
|
||||||
NEXT_PUBLIC_DISPATCH_SERVICE_ID=1
|
NEXT_PUBLIC_DISPATCH_SERVICE_ID=1
|
||||||
|
|
||||||
|
|
||||||
# ───────────────────────────────────────────────
|
# ───────────────────────────────────────────────
|
||||||
# 🌐 Öffentliche URLs
|
# 🌐 Öffentliche URLs
|
||||||
# ───────────────────────────────────────────────
|
# ───────────────────────────────────────────────
|
||||||
NEXT_PUBLIC_HUB_URL=http://localhost:3000
|
NEXT_PUBLIC_HUB_URL=http://premiumag.de:3000
|
||||||
NEXT_PUBLIC_HUB_SERVER_URL=http://localhost:3003
|
NEXT_PUBLIC_HUB_SERVER_URL=http://premiumag.de:3003
|
||||||
NEXT_PUBLIC_DISPATCH_URL=http://localhost:3001
|
NEXT_PUBLIC_DISPATCH_URL=http://premiumag.de:3001
|
||||||
NEXT_PUBLIC_DISPATCH_SERVER_URL=http://localhost:3002
|
NEXT_PUBLIC_DISPATCH_SERVER_URL=http://premiumag.de:3002
|
||||||
|
|
||||||
# ───────────────────────────────────────────────
|
# ───────────────────────────────────────────────
|
||||||
# 🗄️ Datenbank
|
# 🗄️ Datenbank
|
||||||
@@ -50,10 +50,10 @@ HUB_URL=
|
|||||||
# ───────────────────────────────────────────────
|
# ───────────────────────────────────────────────
|
||||||
# 📚 Moodle
|
# 📚 Moodle
|
||||||
# ───────────────────────────────────────────────
|
# ───────────────────────────────────────────────
|
||||||
MOODLE_URL=http://localhost:8081
|
MOODLE_URL=http://premiumag.de:8081
|
||||||
MOODLE_API_TOKEN=ac346f0324647b68488d13fd52a9bbe8
|
MOODLE_API_TOKEN=ac346f0324647b68488d13fd52a9bbe8
|
||||||
MOODLE_USER_PASSWORD=var-api-user-P1
|
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)
|
# 📧 E-Mail Einstellungen (nur HUB Server)
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ export const handleSendMessage =
|
|||||||
const recvSockets = await io.in(`user:${userId}`).fetchSockets();
|
const recvSockets = await io.in(`user:${userId}`).fetchSockets();
|
||||||
await io.in(`user:${senderId}`).fetchSockets();
|
await io.in(`user:${senderId}`).fetchSockets();
|
||||||
|
|
||||||
console.log(`Sockets in room user:${userId}:`);
|
|
||||||
if (!recvSockets.length) {
|
if (!recvSockets.length) {
|
||||||
cb({ error: "User is not connected" });
|
cb({ error: "User is not connected" });
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ export async function GET(req: NextRequest): Promise<NextResponse> {
|
|||||||
const id = searchParams.get("id");
|
const id = searchParams.get("id");
|
||||||
const filter = searchParams.get("filter");
|
const filter = searchParams.get("filter");
|
||||||
|
|
||||||
console.log(filter);
|
|
||||||
const filterParsed = JSON.parse(filter || "{}");
|
const filterParsed = JSON.parse(filter || "{}");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -20,9 +19,6 @@ export async function GET(req: NextRequest): Promise<NextResponse> {
|
|||||||
return NextResponse.json(data, { status: 200 });
|
return NextResponse.json(data, { status: 200 });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
return NextResponse.json(
|
return NextResponse.json({ error: "Failed to fetch mission" }, { status: 500 });
|
||||||
{ error: "Failed to fetch mission" },
|
|
||||||
{ status: 500 },
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
dispatch:
|
dispatch:
|
||||||
|
deploy:
|
||||||
|
replicas: 3
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./apps/dispatch/Dockerfile
|
dockerfile: ./apps/dispatch/Dockerfile
|
||||||
@@ -47,6 +49,8 @@ services:
|
|||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
dispatch-server:
|
dispatch-server:
|
||||||
|
deploy:
|
||||||
|
replicas: 3
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./apps/dispatch-server/Dockerfile
|
dockerfile: ./apps/dispatch-server/Dockerfile
|
||||||
|
|||||||
Reference in New Issue
Block a user