Настройка запуска на Ubuntu + tmux и доступ извне (Арсен.)

- Добавлены инструкции `docs/UBUNTU_SETUP.md` и секции в README.
- Добавлены скрипты `scripts/setup-postgres-ubuntu.sh` и `scripts/start-tmux.sh` (tmux: front/back).
- Для доступа снаружи: Vite `allowedHosts: true`, бэкенд слушает `0.0.0.0`.
- Добавлен сид демо-пользователя портала `demo` / `demo123` с ролью DIRECTOR (как `its`).
- `.env` файлы добавлены в `.gitignore`, чтобы не коммитить секреты.

Выполнил: Арсен.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-10 11:55:20 +05:00
parent de94ad707b
commit 4993816a95
10 changed files with 305 additions and 9 deletions

View File

@@ -374,8 +374,8 @@ async function startServer() {
process.exit(1);
}
}
app.listen(PORT, () => {
console.log(`Backend API running on http://localhost:${PORT}${API_PREFIX}`);
app.listen(PORT, '0.0.0.0', () => {
console.log(`Backend API running on http://0.0.0.0:${PORT}${API_PREFIX}`);
if (DATABASE_URL) {
ensureEmployeeResponsibilityTable()
.then(() => console.log('[backend] Таблица employee_responsibility проверена/создана'))