Skip to content

Commit

Permalink
Merge pull request #6 from okfde/develop
Browse files Browse the repository at this point in the history
Add geocoding cache to docker container
  • Loading branch information
simonwoerpel authored Mar 25, 2023
2 parents bbdbda9 + 1efc7fd commit 4299e97
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/simonwoerpel/ftm-geocode
FROM ghcr.io/simonwoerpel/ftm-geocode:main

RUN apt-get update && apt-get install -y parallel

Expand All @@ -8,13 +8,16 @@ COPY setup.cfg /farmsubsidy/setup.cfg
COPY VERSION /farmsubsidy/VERSION
COPY Makefile /farmsubsidy/Makefile

ENV DEBUG=0
ENV PARALLEL=-j`nproc`
WORKDIR /farmsubsidy
RUN wget -O cache.db.gz https://cdn.investigativedata.org/farmsubsidy/cache.db.gz
RUN gunzip cache.db.gz

RUN pip install -U pip setuptools
RUN pip install gunicorn uvicorn
RUN pip install -e ".[geo]"

ENV DEBUG=0
ENV PARALLEL=-j`nproc`

# Run the green unicorn with 1 worker (scale via docker then)
CMD ["uvicorn", "farmsubsidy_store.api:app", "--proxy-headers", "--host", "0.0.0.0", "--port", "8000"]

0 comments on commit 4299e97

Please sign in to comment.