fix: add docker push step to build.yml
Build and Deploy Backend / build-and-deploy (push) Failing after 32s
Build and Deploy Backend / build-and-deploy (push) Failing after 32s
This commit is contained in:
+17
@@ -1,6 +1,12 @@
|
||||
FROM ghcr.io/astral-sh/uv:python3.12-alpine AS builder
|
||||
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
|
||||
WORKDIR /app
|
||||
|
||||
# Аргументы для метаданных
|
||||
ARG BUILD_VERSION=unknown
|
||||
ARG BUILD_DATE=unknown
|
||||
ARG VCS_REF=unknown
|
||||
|
||||
RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
--mount=type=bind,source=uv.lock,target=uv.lock \
|
||||
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
||||
@@ -8,7 +14,18 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
|
||||
FROM python:3.12-alpine
|
||||
WORKDIR /app
|
||||
|
||||
# Метки для образа
|
||||
LABEL org.opencontainers.image.title="uVPN Backend"
|
||||
LABEL org.opencontainers.image.description="uVPN Shop Backend Service"
|
||||
LABEL org.opencontainers.image.version="${BUILD_VERSION}"
|
||||
LABEL org.opencontainers.image.created="${BUILD_DATE}"
|
||||
LABEL org.opencontainers.image.revision="${VCS_REF}"
|
||||
LABEL org.opencontainers.image.source="https://git.uvpn.shop/${{ gitea.repository }}"
|
||||
LABEL org.opencontainers.image.licenses="MIT"
|
||||
|
||||
COPY --from=builder /app/.venv /app/.venv
|
||||
COPY . /app
|
||||
|
||||
ENV PATH="/app/.venv/bin:$PATH"
|
||||
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
||||
|
||||
Reference in New Issue
Block a user