From 0a8698ca50b64d54bd471cb83ce33fecf61d8c95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=BC=D0=B8=D1=82=D1=80=D0=B8=D0=B9=20=D0=9C=D0=B0?= =?UTF-8?q?=D0=BC=D0=B5=D0=B4=D0=BE=D0=B2?= Date: Wed, 10 Jun 2026 18:05:04 +0300 Subject: [PATCH] commit 10 --- .env.example | 2 +- install.sh | 12 ++++++------ src/main.ts | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.env.example b/.env.example index 52a6b91..6fcd821 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,7 @@ # Сервис # ────────────────────────────────────────────── NODE_ENV=development -PORT=3000 +PORT=3010 HOST=0.0.0.0 TRUST_PROXY=1 diff --git a/install.sh b/install.sh index b6889ef..0115bdc 100644 --- a/install.sh +++ b/install.sh @@ -327,14 +327,14 @@ if command -v pm2 &>/dev/null; then pm2 save 2>/dev/null || true info "Started with PM2" else - PORT="${PORT:-3000}" nohup node dist/main > "$INSTALL_DIR/sso.log" 2>&1 & + PORT="${PORT:-3010}" nohup node dist/main > "$INSTALL_DIR/sso.log" 2>&1 & echo $! > "$INSTALL_DIR/.sso.pid" info "Started in background (PID $(cat "$INSTALL_DIR/.sso.pid")) — logs: $INSTALL_DIR/sso.log" fi sleep 3 -if curl -sfo /dev/null "http://localhost:${PORT:-3000}/metrics" 2>/dev/null; then - info "Service is running on http://localhost:${PORT:-3000}" +if curl -sfo /dev/null "http://localhost:${PORT:-3010}/metrics" 2>/dev/null; then + info "Service is running on http://localhost:${PORT:-3010}" else warn "Service may still be starting... check: $INSTALL_DIR/sso.log" fi @@ -345,9 +345,9 @@ echo -e "${GREEN}═════════════════════ echo -e "${GREEN} SSO Service installed and running!${NC}" echo -e "${GREEN}════════════════════════════════════════════════${NC}" echo "" -echo -e " ${CYAN}Web panel:${NC} http://localhost:${PORT:-3000}" +echo -e " ${CYAN}Web panel:${NC} http://localhost:${PORT:-3010}" echo -e " ${CYAN}Admin login:${NC} admin@sso.local / admin123!" -echo -e " ${CYAN}Metrics:${NC} http://localhost:${PORT:-3000}/metrics" +echo -e " ${CYAN}Metrics:${NC} http://localhost:${PORT:-3010}/metrics" echo -e " ${CYAN}RabbitMQ UI:${NC} http://localhost:15672 (${RABBITMQ_USER:-sso} / ${RABBITMQ_PASSWORD:-sso_secret})" echo "" echo -e " ${YELLOW}Install dir:${NC} $INSTALL_DIR" @@ -357,5 +357,5 @@ echo -e " ${YELLOW}Stop:${NC} $(command -v pm2 &>/dev/null && echo 'p echo -e " ${YELLOW}Update:${NC} cd $INSTALL_DIR && git pull && npm ci && npm run build && npm run start:prod" echo -e " ${YELLOW}Re-run:${NC} curl -fsSL https://${GIT_HOST}/${REPO}/raw/branch/${BRANCH}/install.sh | bash" echo "" -echo -e " ${GREEN}Open http://localhost:${PORT:-3000} in your browser${NC}" +echo -e " ${GREEN}Open http://localhost:${PORT:-3010} in your browser${NC}" echo "" diff --git a/src/main.ts b/src/main.ts index 9b1d183..c14edb4 100644 --- a/src/main.ts +++ b/src/main.ts @@ -33,7 +33,7 @@ async function bootstrap(): Promise { app.use(cookieParser()); app.enableCors({ - origin: (process.env.CORS_ORIGINS ?? 'http://localhost:3000').split(','), + origin: (process.env.CORS_ORIGINS ?? 'http://localhost:3010').split(','), credentials: true, }); @@ -75,7 +75,7 @@ async function bootstrap(): Promise { // eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access instance.set('trust proxy', trustProxy); - const port = parseInt(process.env.PORT ?? '3000', 10); + const port = parseInt(process.env.PORT ?? '3010', 10); const host = process.env.HOST ?? '0.0.0.0'; await app.listen(port, host);