Skip to content

Commit

Permalink
Update osm-fieldwork --> 0.16.9 for new entity creation fix (#1826)
Browse files Browse the repository at this point in the history
* fix: dockerfile warning such as Casing and whitespace separator

* build: update osm-fieldwork --> 0.16.9 for new entity fix

---------

Co-authored-by: Sujan Adhikari <[email protected]>
  • Loading branch information
spwoodcock and Sujanadh authored Oct 18, 2024
1 parent 9b7e9b6 commit 6b467de
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
24 changes: 12 additions & 12 deletions src/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
#
ARG PYTHON_IMG_TAG=3.11
ARG MINIO_TAG=${MINIO_TAG:-RELEASE.2024-06-06T09-36-42Z}
FROM docker.io/minio/minio:${MINIO_TAG} as minio
FROM docker.io/minio/minio:${MINIO_TAG} AS minio


# Includes all labels and timezone info to extend from
FROM docker.io/python:${PYTHON_IMG_TAG}-slim-bookworm as base
FROM docker.io/python:${PYTHON_IMG_TAG}-slim-bookworm AS base
ARG APP_VERSION
ARG COMMIT_REF
ARG PYTHON_IMG_TAG
Expand All @@ -39,13 +39,13 @@ RUN set -ex \
&& update-ca-certificates
# Set locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US:en
ENV LC_ALL=en_US.UTF-8


# Extract dependencies from PDM lock to standard requirements.txt
FROM base as extract-deps
FROM base AS extract-deps
WORKDIR /opt/python
COPY pyproject.toml pdm.lock /opt/python/
RUN pip install --no-cache-dir --upgrade pip \
Expand All @@ -61,7 +61,7 @@ RUN pdm export --prod > requirements.txt \


# Build stage will all dependencies required to build Python wheels
FROM base as build
FROM base AS build
# NOTE this argument is specified during production build on Github workflow
# NOTE only the production API image contains the monitoring dependencies
ARG MONITORING
Expand Down Expand Up @@ -92,7 +92,7 @@ RUN pip install --user --no-warn-script-location --no-cache-dir \


# Run stage will minimal dependencies required to run Python libraries
FROM base as runtime
FROM base AS runtime
ARG PYTHON_IMG_TAG
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
Expand Down Expand Up @@ -146,7 +146,7 @@ HEALTHCHECK --start-period=10s --interval=5s --retries=20 --timeout=5s \


# Add certificates to use ODK Central over SSL (HTTPS, required)
FROM runtime as add-odk-certs
FROM runtime AS add-odk-certs
USER root
# Add the SSL cert for debug odkcentral
COPY --from=ghcr.io/hotosm/fmtm/proxy:debug \
Expand All @@ -155,7 +155,7 @@ RUN update-ca-certificates


# Stage to use during local development
FROM add-odk-certs as debug
FROM add-odk-certs AS debug
USER appuser
COPY --from=extract-deps --chown=appuser \
/opt/python/requirements-debug.txt \
Expand All @@ -173,7 +173,7 @@ CMD ["python", "-Xfrozen_modules=off", "-m", "debugpy", \


# Used during CI workflows (as root), with docs/test dependencies pre-installed
FROM add-odk-certs as ci
FROM add-odk-certs AS ci
ARG PYTHON_IMG_TAG
COPY --from=extract-deps \
/opt/python/requirements-ci.txt /opt/python/
Expand Down Expand Up @@ -201,7 +201,7 @@ CMD ["sleep", "infinity"]


# Final stage used during deployment
FROM runtime as prod
FROM runtime AS prod
# Pre-compile packages to .pyc (init speed gains)
RUN python -c "import compileall; compileall.compile_path(maxlevels=10, quiet=1)"
# Note: 1 worker (process) per container, behind load balancer
Expand Down
20 changes: 10 additions & 10 deletions src/backend/pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ dependencies = [
"cryptography>=42.0.8",
"pyjwt>=2.8.0",
"async-lru>=2.0.4",
"osm-fieldwork==0.16.8",
"osm-fieldwork==0.16.9",
"osm-login-python==2.0.0",
"osm-rawdata==0.3.2",
"fmtm-splitter==1.3.1",
"osm-rawdata==0.3.3",
"fmtm-splitter==1.3.2",
]
requires-python = ">=3.11"
readme = "../../README.md"
Expand Down

0 comments on commit 6b467de

Please sign in to comment.