generated from coulomb/repo-seed
Deploy issue-core 0.2.1 image
This commit is contained in:
22
Dockerfile
22
Dockerfile
@@ -1,15 +1,10 @@
|
||||
# issue-core REST ingestion service image.
|
||||
#
|
||||
# Installs the published issue-core[api] package from the Coulomb Gitea PyPI
|
||||
# index (no sibling-checkout build context) and runs the FastAPI ingestion
|
||||
# server on :8765. Built and pushed to gitea.coulomb.social/coulomb/issue-core.
|
||||
# Builds the checked-out issue-core[api] package and runs the FastAPI ingestion
|
||||
# server on :8765. The image is published to
|
||||
# gitea.coulomb.social/coulomb/issue-core.
|
||||
FROM python:3.12-slim AS runtime
|
||||
|
||||
ARG ISSUE_CORE_VERSION=">=0.2,<0.3"
|
||||
# Do not name this PIP_INDEX_URL — Docker exposes ARGs as env vars during RUN,
|
||||
# and pip treats PIP_INDEX_URL as the sole primary index (excluding PyPI).
|
||||
ARG GITEA_PYPI_INDEX_URL=https://gitea.coulomb.social/api/packages/coulomb/pypi/simple/
|
||||
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
HOME=/home/app
|
||||
@@ -18,10 +13,11 @@ ENV PYTHONUNBUFFERED=1 \
|
||||
# (~/.config/issue-tracker/backends.json).
|
||||
RUN useradd --create-home --home-dir /home/app --uid 10001 app
|
||||
|
||||
RUN pip install --no-cache-dir \
|
||||
--index-url https://pypi.org/simple \
|
||||
--extra-index-url "${GITEA_PYPI_INDEX_URL}" \
|
||||
"issue-core[api]${ISSUE_CORE_VERSION}"
|
||||
WORKDIR /src
|
||||
COPY pyproject.toml README.md LICENSE ./
|
||||
COPY issue_core ./issue_core
|
||||
RUN pip install --no-cache-dir --index-url https://pypi.org/simple ".[api]" \
|
||||
&& rm -rf /src
|
||||
|
||||
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
@@ -30,4 +26,4 @@ USER app
|
||||
EXPOSE 8765
|
||||
|
||||
# Entrypoint renders backends.json from env, then execs the server.
|
||||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|
||||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
|
||||
@@ -23,7 +23,7 @@ spec:
|
||||
# docs). Add imagePullSecrets: [{name: gitea-registry}] if it becomes private.
|
||||
containers:
|
||||
- name: issue-core
|
||||
image: gitea.coulomb.social/coulomb/issue-core:0.2.0
|
||||
image: gitea.coulomb.social/coulomb/issue-core:0.2.1
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- name: http
|
||||
|
||||
Reference in New Issue
Block a user