Container: add containerfiles
All checks were successful
/ test (push) Successful in 31s

This commit is contained in:
phil 2024-12-16 19:41:16 +01:00
parent f7cd1fabbc
commit ab717e798d
2 changed files with 29 additions and 0 deletions

19
Containerfile Normal file
View file

@ -0,0 +1,19 @@
# Build: podman build -t code.philo.ydns.eu/philorg/gisaf-backend -f Containerfile
FROM code.philo.ydns.eu/philorg/gisaf-backend-deps
ENV PYTHONPATH $UV_PROJECT_ENVIRONMENT/lib/python3.12/site-packages
ENV GISAF__BACKEND__PORT 8898
ENV GISAF__BACKEND__BIND__ADDR 0.0.0.0
ARG APP_VERSION=0.0.0
COPY . /src
RUN uv pip install \
--python=$UV_PROJECT_ENVIRONMENT \
--no-deps \
/src
RUN echo $APP_VERSION > /app/version.txt
CMD uvicorn gisaf.application:app --port ${GISAF__BACKEND__PORT} --host ${GISAF__BACKEND__BIND__ADDR}

10
Containerfile.deps Normal file
View file

@ -0,0 +1,10 @@
# Build: podman build -t code.philo.ydns.eu/philorg/gisaf-backend-deps -f Containerfile.deps
FROM code.philo.ydns.eu/philorg/trixie_python
COPY ./pyproject.toml ./README.md ./uv.lock /_lock/
RUN --mount=type=cache,target=/root/.cache <<EOT
cd /_lock
uv sync --locked --no-dev --no-install-project
EOT