Split 1878-line server.py into 15 focused modules: - config.py: all env vars and constants - database.py: schema, init, seed logic - sessions.py: session/token CRUD - proxy.py: proxy_request, SERVICE_MAP, resolve_service - responses.py: ResponseMixin for handler helpers - auth.py: login/logout/register handlers - dashboard.py: dashboard, apps, connections, pinning - command.py: AI command bar - integrations/booklore.py: auth, books, cover, import - integrations/kindle.py: send-to-kindle, file finder - integrations/karakeep.py: save/delete bookmarks - integrations/qbittorrent.py: download status - integrations/image_proxy.py: external image proxy server.py is now thin routing only (~344 lines). All routes, methods, status codes, and responses preserved exactly. Added PYTHONUNBUFFERED=1 to Dockerfile for live logging.
8 lines
240 B
Docker
8 lines
240 B
Docker
FROM python:3.12-slim
|
|
WORKDIR /app
|
|
COPY server.py config.py database.py sessions.py proxy.py responses.py auth.py dashboard.py command.py ./
|
|
COPY integrations/ ./integrations/
|
|
EXPOSE 8100
|
|
ENV PYTHONUNBUFFERED=1
|
|
CMD ["python3", "server.py"]
|