treetrail-backend/Containerfile
phil 1693662e75
All checks were successful
/ test (push) Successful in 17s
/ build (push) Successful in 19s
Version file added dynamically (workaround as uv does not have this feature yet)
Tag container image with playbook
Importable module with python -m treetrail
2024-11-04 03:58:58 +01:00

26 lines
595 B
Docker

# Build: podman build -t treetrail-backend-base -f Containerfile.base
FROM tiptop:5000/treetrail-backend-deps
ENV PYTHONPATH $UV_PROJECT_ENVIRONMENT/lib/python3.12/site-packages
ARG APP_VERSION=0.0.0
COPY . /src
#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
CMD [ \
"uvicorn", "treetrail.application:app", \
"--port", "8081", \
#"--log-config", "/app/config/logging.yaml", \
"--host", "0.0.0.0" \
]