CI: build container from plain Python image
This commit is contained in:
parent
ea7e3087cd
commit
7105edecd1
2 changed files with 6 additions and 16 deletions
|
@ -1,5 +1,4 @@
|
|||
.venv
|
||||
.git
|
||||
dist
|
||||
.pytest_cache
|
||||
.forgejo
|
||||
|
|
|
@ -1,22 +1,13 @@
|
|||
# Build: podman build -t code.philo.ydns.eu/philorg/treetrail-backend -f Containerfile
|
||||
FROM docker.io/library/python:latest
|
||||
|
||||
FROM code.philo.ydns.eu/philorg/treetrail-backend-deps
|
||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
|
||||
|
||||
ENV PYTHONPATH $UV_PROJECT_ENVIRONMENT/lib/python3.12/site-packages
|
||||
ARG APP_VERSION=0.0.0
|
||||
COPY . /app
|
||||
|
||||
COPY . /src
|
||||
# Sync the project into a new environment, using the frozen lockfile
|
||||
WORKDIR /app
|
||||
|
||||
#RUN --mount=type=cache,target=/root/.cache \
|
||||
# cd /src && \
|
||||
# uv sync --locked --no-dev --no-editable
|
||||
|
||||
RUN uv pip install \
|
||||
--python=$UV_PROJECT_ENVIRONMENT \
|
||||
--no-deps \
|
||||
/src
|
||||
|
||||
RUN echo $APP_VERSION > /app/version.txt
|
||||
RUN uv pip install --system .
|
||||
|
||||
CMD [ \
|
||||
"uvicorn", "treetrail.application:app", \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue