96de2d2573
Manage Telegram instances through Kubernetes with legacy adoption for forust and anna. Build and deploy the panel image alongside the runtime.
33 lines
752 B
Docker
33 lines
752 B
Docker
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"]
|