Skip to content

Commit

Permalink
build: tweak dockerfile, export test group for ci
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Aug 25, 2023
1 parent b5d3f0c commit f66dbea
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ COPY pyproject.toml pdm.lock /opt/python/
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir pdm==2.6.1
RUN pdm export --prod > requirements.txt \
&& pdm export -G debug --no-default --without-hashes \
> requirements-dev.txt
&& pdm export -G debug -G test --no-default \
--without-hashes > requirements-debug.txt



Expand Down Expand Up @@ -129,13 +129,14 @@ RUN pip install pdm==2.6.1 \
FROM runtime as debug-no-odk
USER appuser
COPY --from=extract-deps --chown=appuser \
/opt/python/requirements-dev.txt /opt/python/
/opt/python/requirements-debug.txt /opt/python/
COPY --from=osm-fieldwork-whl --chown=appuser \
/repos/osm-fieldwork/dist/*.whl /opt/
RUN ls /opt/*.whl >> /opt/python/requirements-dev.txt \
RUN ls /opt/*.whl >> /opt/python/requirements-debug.txt \
&& pip uninstall -y osm-fieldwork \
&& pip install --user --upgrade --no-warn-script-location \
--no-cache-dir -r /opt/python/requirements-dev.txt
--no-cache-dir -r \
/opt/python/requirements-debug.txt
CMD ["python", "-m", "debugpy", "--listen", "0.0.0.0:5678", \
"-m", "uvicorn", "app.main:api", \
"--host", "0.0.0.0", "--port", "8000", \
Expand Down

0 comments on commit f66dbea

Please sign in to comment.