generated from coulomb/repo-seed
fixes
This commit is contained in:
21
Dockerfile
21
Dockerfile
@@ -2,11 +2,12 @@
|
|||||||
#
|
#
|
||||||
# Build:
|
# Build:
|
||||||
# docker build \
|
# docker build \
|
||||||
# --build-context issue-core=/home/worsch/issue-core \
|
# --secret id=gitea_pypi_user,env=GITEA_PYPI_USER \
|
||||||
|
# --secret id=gitea_pypi_password,env=GITEA_PYPI_TOKEN \
|
||||||
# -t gitea.coulomb.social/coulomb/vergabe-teilnahme:<tag> .
|
# -t gitea.coulomb.social/coulomb/vergabe-teilnahme:<tag> .
|
||||||
#
|
#
|
||||||
# The `issue-core` named context is required because pyproject.toml has
|
# The optional secrets let uv authenticate to the Gitea Python package
|
||||||
# a path dependency on a sibling repo; uv.lock pins it as "../issue-core".
|
# registry when resolving issue-core.
|
||||||
|
|
||||||
|
|
||||||
# ─── Stage 1 ─── Vite + Tailwind asset build ────────────────────────────────
|
# ─── Stage 1 ─── Vite + Tailwind asset build ────────────────────────────────
|
||||||
@@ -38,10 +39,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
|
|
||||||
COPY --from=ghcr.io/astral-sh/uv:0.5.11 /uv /usr/local/bin/uv
|
COPY --from=ghcr.io/astral-sh/uv:0.5.11 /uv /usr/local/bin/uv
|
||||||
|
|
||||||
COPY --from=issue-core . /issue-core/
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY pyproject.toml uv.lock ./
|
COPY pyproject.toml uv.lock ./
|
||||||
RUN uv sync --frozen --no-dev --no-install-project
|
RUN --mount=type=secret,id=gitea_pypi_user,required=false \
|
||||||
|
--mount=type=secret,id=gitea_pypi_password,required=false \
|
||||||
|
sh -eu -c '\
|
||||||
|
if [ -f /run/secrets/gitea_pypi_user ]; then \
|
||||||
|
export UV_INDEX_GITEA_USERNAME="$(cat /run/secrets/gitea_pypi_user)"; \
|
||||||
|
fi; \
|
||||||
|
if [ -f /run/secrets/gitea_pypi_password ]; then \
|
||||||
|
export UV_INDEX_GITEA_PASSWORD="$(cat /run/secrets/gitea_pypi_password)"; \
|
||||||
|
fi; \
|
||||||
|
uv sync --no-dev --no-install-project \
|
||||||
|
'
|
||||||
|
|
||||||
|
|
||||||
# ─── Stage 3 ─── Runtime image ──────────────────────────────────────────────
|
# ─── Stage 3 ─── Runtime image ──────────────────────────────────────────────
|
||||||
@@ -60,7 +70,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY --from=python-deps /issue-core /issue-core
|
|
||||||
COPY --from=python-deps /app/.venv ./.venv
|
COPY --from=python-deps /app/.venv ./.venv
|
||||||
|
|
||||||
COPY --chown=app:app manage.py pyproject.toml ./
|
COPY --chown=app:app manage.py pyproject.toml ./
|
||||||
|
|||||||
@@ -10,10 +10,18 @@ dependencies = [
|
|||||||
"whitenoise>=6.7",
|
"whitenoise>=6.7",
|
||||||
"python-decouple>=3.8",
|
"python-decouple>=3.8",
|
||||||
"dj-database-url>=2.1",
|
"dj-database-url>=2.1",
|
||||||
"issue-core @ file:///home/worsch/issue-core",
|
"issue-core>=0.2,<0.3",
|
||||||
"gunicorn>=22.0",
|
"gunicorn>=22.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[tool.uv.sources]
|
||||||
|
issue-core = { index = "gitea" }
|
||||||
|
|
||||||
|
[[tool.uv.index]]
|
||||||
|
name = "gitea"
|
||||||
|
url = "https://gitea.coulomb.social/api/packages/coulomb/pypi/simple/"
|
||||||
|
explicit = true
|
||||||
|
|
||||||
[dependency-groups]
|
[dependency-groups]
|
||||||
dev = [
|
dev = [
|
||||||
"pytest-django>=4.8",
|
"pytest-django>=4.8",
|
||||||
|
|||||||
Reference in New Issue
Block a user