This commit is contained in:
9qeklajc
2026-05-30 17:20:16 +02:00
parent ed2c8c9fe2
commit ee79a305ba
3 changed files with 12 additions and 12 deletions
+5 -5
View File
@@ -1,7 +1,5 @@
FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
@@ -15,9 +13,11 @@ RUN apt-get update \
COPY uv.lock pyproject.toml ./
RUN mkdir -p /routstr
COPY . .
RUN uv sync --frozen --no-dev --no-install-project
RUN uv sync --frozen --no-dev
WORKDIR /app
COPY . .
ARG GIT_COMMIT=""
ARG GIT_TAG=""
@@ -28,4 +28,4 @@ ENV PYTHONUNBUFFERED=1
EXPOSE 8000
CMD ["/app/.venv/bin/fastapi", "run", "routstr", "--host", "0.0.0.0"]
CMD ["/.venv/bin/fastapi", "run", "routstr", "--host", "0.0.0.0"]
+7 -6
View File
@@ -18,8 +18,6 @@ RUN pnpm run build
# Stage 2: Build the Routstr Node
FROM ghcr.io/astral-sh/uv:python3.11-bookworm-slim AS runner
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
@@ -30,10 +28,13 @@ RUN apt-get update \
libtool \
&& rm -rf /var/lib/apt/lists/*
# Copy the rest of the application (required for uv sync to find the package)
COPY . .
COPY uv.lock pyproject.toml ./
RUN uv sync --no-dev
RUN uv sync --no-dev --no-install-project
WORKDIR /app
COPY . .
# Copy the built UI from the ui-builder stage
COPY --from=ui-builder /app/ui/out ./ui_out
@@ -48,4 +49,4 @@ ENV PYTHONUNBUFFERED=1
EXPOSE 8000
# Run the application
CMD ["/app/.venv/bin/fastapi", "run", "routstr", "--host", "0.0.0.0"]
CMD ["/.venv/bin/fastapi", "run", "routstr", "--host", "0.0.0.0"]
-1
View File
@@ -20,7 +20,6 @@ services:
- ui
volumes:
- .:/app:z
- /app/.venv
- ./logs:/app/logs:z
- tor-data:/var/lib/tor:ro
- ./ui_out:/app/ui_out:ro,z