- .env.example: полный шаблон, защита секретов - .gitignore: явное исключение .env.* и секретов - layout.tsx: XSS — заменён dangerouslySetInnerHTML на next/script для SW - ESLint: no-console error (allow warn/error), ignore scripts/ - scripts/remove-console-logs.js: очистка console.log без glob - backend/routes/modules: README с планом рефакторинга крупных файлов - SECURITY.md: гид по секретам, XSS, CORS, auth, линту - .husky/pre-commit: запуск npm run lint + прочие правки приложения и бэкенда Co-authored-by: Cursor <cursoragent@cursor.com>
26 lines
660 B
Docker
26 lines
660 B
Docker
# КЛГ АСУ ТК — Backend (FastAPI)
|
||
FROM python:3.12-slim
|
||
|
||
WORKDIR /app
|
||
|
||
# System dependencies
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||
libpq-dev gcc curl && \
|
||
rm -rf /var/lib/apt/lists/*
|
||
|
||
# Python dependencies
|
||
COPY requirements.txt .
|
||
RUN pip install --no-cache-dir -r requirements.txt && \
|
||
pip install --no-cache-dir openpyxl reportlab psutil
|
||
|
||
# Application code
|
||
COPY . .
|
||
|
||
# Health check
|
||
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s \
|
||
CMD curl -f http://localhost:8000/api/v1/health || exit 1
|
||
|
||
EXPOSE 8000
|
||
|
||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--workers", "4"]
|