forked from hotosm/osm-tasking-manager2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
From hotosm#980
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
FROM python:2.7.12 | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
--no-install-recommends \ | ||
libgeos-dev \ | ||
software-properties-common \ | ||
python-software-properties \ | ||
transifex-client \ | ||
wget \ | ||
&& apt-get clean \ | ||
&& apt-get autoremove \ | ||
&& rm -r /var/lib/apt/lists/* | ||
|
||
RUN add-apt-repository "deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main" | ||
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - | ||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
--no-install-recommends \ | ||
postgresql-client-common \ | ||
postgresql-client-9.6 \ | ||
&& apt-get clean \ | ||
&& apt-get autoremove \ | ||
&& rm -r /var/lib/apt/lists/* | ||
|
||
ADD requirements.txt /opt/app/requirements.txt | ||
ADD setup.py /opt/app/setup.py | ||
ADD setup.cfg /opt/app/setup.cfg | ||
ADD README.md /opt/app/README.md | ||
ADD CHANGELOG.md /opt/app/CHANGELOG.md | ||
|
||
WORKDIR /opt/app | ||
|
||
RUN easy_install virtualenv | ||
RUN virtualenv --no-site-packages env | ||
RUN ./env/bin/pip install -r requirements.txt | ||
|
||
ADD . /opt/app | ||
|
||
RUN ./env/bin/python setup.py extract_messages | ||
RUN ./env/bin/python setup.py init_catalog -l en | ||
RUN ./env/bin/python setup.py compile_catalog | ||
|
||
CMD ./env/bin/pserve --reload development.ini | ||
|
||
EXPOSE 6543 |