Skip to content

Commit

Permalink
build: apply dockerfile updates from PR #6436
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Sep 4, 2024
1 parent 6ca1394 commit 2508ae0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
- run: sudo apt-get update
- run: sudo apt-get -y install libgeos-dev # Required for shapely
- run: sudo apt-get -y install proj-bin libproj-dev
- run: pip install --upgrade pip pdm==2.7.4
- run: pip install --upgrade pip pdm==2.18.1
- run: pdm export --dev --without-hashes > requirements.txt
- run: pip install -r requirements.txt
- run: mkdir --mode 766 -p /tmp/logs
Expand Down
13 changes: 7 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ FROM base as extract-deps
RUN pip install --no-cache-dir --upgrade pip
WORKDIR /opt/python
COPY pyproject.toml pdm.lock README.md /opt/python/
RUN pip install --no-cache-dir pdm==2.7.4
RUN pip install --no-cache-dir pdm==2.18.1
RUN pdm export --prod --without-hashes > requirements.txt


Expand All @@ -34,9 +34,8 @@ FROM base as build
RUN pip install --no-cache-dir --upgrade pip
WORKDIR /opt/python
# Setup backend build-time dependencies
RUN apt-get update
RUN apt-get install --no-install-recommends -y build-essential
RUN apt-get install --no-install-recommends -y \
RUN apt-get update && apt-get install --no-install-recommends -y \
build-essential \
postgresql-server-dev-15 \
python3-dev \
libffi-dev \
Expand Down Expand Up @@ -79,7 +78,7 @@ COPY manage.py .

FROM runtime as debug
RUN pip install --user --no-warn-script-location \
--no-cache-dir debugpy==1.6.7
--no-cache-dir debugpy==1.8.5
EXPOSE 5678/tcp
CMD ["python", "-m", "debugpy", "--wait-for-client", "--listen", "0.0.0.0:5678", \
"-m", "gunicorn", "-c", "python:backend.gunicorn", "manage:application", \
Expand All @@ -98,5 +97,7 @@ RUN python -c "import compileall; compileall.compile_path(maxlevels=10, quiet=1)
RUN python -m compileall .
EXPOSE 5000/tcp
USER appuser:appuser
# Default gunicorn worker count is 1
# For prod the WEB_CONCURRENCY env var can be used to set this
CMD ["gunicorn", "-c", "python:backend.gunicorn", "manage:application", \
"--workers", "1", "--log-level", "error"]
"--log-level", "error"]
2 changes: 1 addition & 1 deletion scripts/aws/cloudformation/tasking-manager.template.js
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ const Resources = {
'git clone --recursive https://github.com/hotosm/tasking-manager.git /opt/tasking-manager',
'cd /opt/tasking-manager/',
cf.sub('git reset --hard ${GitSha}'),
'pip install --upgrade pip pdm==2.7.4',
'pip install --upgrade pip pdm==2.18.1',
'pdm export --prod > requirements.txt',
'wget -6 https://s3.dualstack.us-east-1.amazonaws.com/cloudformation-examples/aws-cfn-bootstrap-py3-latest.tar.gz -O /tmp/aws-cfn-bootstrap-py3-latest.tar.gz',
'pip install /tmp/aws-cfn-bootstrap-py3-latest.tar.gz',
Expand Down

0 comments on commit 2508ae0

Please sign in to comment.