treetrail-backend/Containerfile.backend_deps
2024-10-23 16:19:51 +02:00

36 lines
1.4 KiB
Text

FROM localhost/trixie_python
MAINTAINER philo email phil.dev@philome.mooo.com
#ENV PROJ_DIR=/usr
ENV PYTHONDONTWRITEBYTECODE 1
ENV PDM_CHECK_UPDATE=false
#RUN apk add --no-cache make cmake clang gdal-dev geos-dev proj-dev proj-util gcc musl-dev bash
#RUN apk add --no-cache gdal-dev geos-dev proj-dev proj-util gcc musl-dev bash
WORKDIR /usr/src/treetrail
COPY ./pyproject.toml ./README.md ./pdm.lock .
# Cheating pdm with the app version to allow install of dependencies
RUN PDM_BUILD_SCM_VERSION=1.0 pdm install --check --prod --no-editable
## Instances should populate these dirs below
RUN mkdir -p /usr/local/treetrail/osm \
/usr/local/treetrail/sprite \
/usr/local/treetrail/cache/plantekey/img \
/usr/local/treetrail/cache/plantekey/thumbnails \
/usr/local/treetrail/cache/plantekey/type \
/usr/local/treetrail/map/sprite \
/usr/local/treetrail/map/osm \
/usr/local/treetrail/attachments/tree \
/usr/local/treetrail/attachments/trail \
/usr/local/treetrail/attachments/poi
#COPY ./sprite /usr/local/treetrail
#COPY ./osm /usr/local/treetrail
#RUN python -c 'import _version as v;print(v.__version__)' > version.txt
#RUN PDM_BUILD_SCM_VERSION=$(cat version.txt) pdm install --check --prod --no-editable
#
# Clear some space (caches)
#RUN pdm cache clear
#RUN rm -rf .mypy_cache
#RUN rm -rf __pycache__