feat(userbot): add Kubernetes control panel
Manage Telegram instances through Kubernetes with legacy adoption for forust and anna. Build and deploy the panel image alongside the runtime.
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
FROM node:22-alpine AS frontend
|
||||
|
||||
WORKDIR /src
|
||||
COPY frontend/package*.json ./
|
||||
RUN npm ci
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
FROM python:3.13-slim AS python-builder
|
||||
|
||||
WORKDIR /build
|
||||
COPY backend/requirements.txt ./
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends build-essential \
|
||||
&& pip install --no-cache-dir --prefix=/install -r requirements.txt \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
FROM python:3.13-slim
|
||||
|
||||
ENV PYTHONDONTWRITEBYTECODE=1 \
|
||||
PYTHONUNBUFFERED=1 \
|
||||
PANEL_STATIC_DIR=/app/static
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=python-builder /install /usr/local
|
||||
COPY backend/app ./app
|
||||
COPY --from=frontend /src/dist ./static
|
||||
|
||||
USER 65532:65532
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]
|
||||
Reference in New Issue
Block a user