-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jiaqi Liu
committed
Dec 3, 2019
1 parent
67b197a
commit 4e19db7
Showing
2 changed files
with
21 additions
and
11 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 |
---|---|---|
@@ -1,24 +1,34 @@ | ||
# To run: docker run -v /path/to/wsgi.py:/var/www/peregrine/wsgi.py --name=peregrine -p 81:80 peregrine | ||
# To check running container: docker exec -it peregrine /bin/bash | ||
# To check running container: docker exec -it peregrine /bin/bash | ||
|
||
FROM quay.io/cdis/py27base:pybase2-1.0.2 | ||
FROM quay.io/cdis/python-nginx:pybase3-1.1.0 | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN mkdir /var/www/peregrine \ | ||
&& chown www-data /var/www/peregrine | ||
RUN apk update \ | ||
&& apk add postgresql-libs postgresql-dev libffi-dev libressl-dev \ | ||
&& apk add linux-headers musl-dev gcc libxml2-dev libxslt-dev \ | ||
&& apk add curl bash git vim | ||
|
||
COPY . /peregrine | ||
COPY ./deployment/uwsgi/uwsgi.ini /etc/uwsgi/uwsgi.ini | ||
WORKDIR /peregrine | ||
|
||
RUN pip install -r requirements.txt \ | ||
&& COMMIT=`git rev-parse HEAD` && echo "COMMIT=\"${COMMIT}\"" >peregrine/version_data.py \ | ||
&& VERSION=`git describe --always --tags` && echo "VERSION=\"${VERSION}\"" >>peregrine/version_data.py | ||
RUN python -m pip install --upgrade pip \ | ||
&& python -m pip install --upgrade setuptools \ | ||
&& pip --version \ | ||
&& pip install -r requirements.txt | ||
|
||
RUN mkdir -p /var/www/peregrine \ | ||
&& mkdir /run/ngnix/ \ | ||
&& chown www-data /var/www/peregrine | ||
|
||
EXPOSE 80 | ||
|
||
WORKDIR /var/www/peregrine | ||
RUN COMMIT=`git rev-parse HEAD` && echo "COMMIT=\"${COMMIT}\"" >peregrine/version_data.py \ | ||
&& VERSION=`git describe --always --tags` && echo "VERSION=\"${VERSION}\"" >>peregrine/version_data.py \ | ||
&& python setup.py install | ||
|
||
|
||
WORKDIR /var/www/peregrine | ||
|
||
ENTRYPOINT [ "/bin/sh", "/dockerrun.sh" ] | ||
CMD [] |
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