-
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.
* chore(py3): run 2to3 and fix sorting * use uc-cdis psqlgraph * bump travis py3 * chore(py3): fix dependencies * chore(py3): bump versions * chore(py3): update dockerfile * chore(py3): remove unused imports * fix dependencies * fix dockerfile * edit uswgi file to use nginx * dictionaryutils * update uwsgi.ini * python path * update dockerfile * ran black * change docker cmd * fix chown * Remove editable vcs * use pypi dependencies * fix cdispyutils * feedback py3 * TestDockerfile builds py3 * fix tests * ran black
- Loading branch information
Jiaqi Liu
authored
Jan 6, 2020
1 parent
feece74
commit e74f55f
Showing
51 changed files
with
2,643 additions
and
1,993 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,17 @@ | ||
on: | ||
pull_request: | ||
issue_comment: | ||
types: [created, edited] | ||
|
||
name: Wool | ||
|
||
jobs: | ||
runWool: | ||
name: Run black | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
|
||
- uses: uc-cdis/wool@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ sudo: false | |
language: python | ||
|
||
python: | ||
- "2.7" | ||
- "3.6" | ||
|
||
cache: | ||
- pip | ||
|
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,39 @@ | ||
# 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 | ||
ENV appname=peregrine | ||
|
||
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 . /$appname | ||
COPY ./deployment/uwsgi/uwsgi.ini /etc/uwsgi/uwsgi.ini | ||
WORKDIR /peregrine | ||
WORKDIR /$appname | ||
|
||
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/$appname \ | ||
&& mkdir -p /var/www/.cache/Python-Eggs/ \ | ||
&& mkdir /run/nginx/ \ | ||
&& ln -sf /dev/stdout /var/log/nginx/access.log \ | ||
&& ln -sf /dev/stderr /var/log/nginx/error.log \ | ||
&& chown nginx -R /var/www/.cache/Python-Eggs/ \ | ||
&& chown nginx /var/www/$appname | ||
|
||
EXPOSE 80 | ||
|
||
WORKDIR /var/www/peregrine | ||
RUN COMMIT=`git rev-parse HEAD` && echo "COMMIT=\"${COMMIT}\"" >$appname/version_data.py \ | ||
&& VERSION=`git describe --always --tags` && echo "VERSION=\"${VERSION}\"" >>$appname/version_data.py \ | ||
&& python setup.py install | ||
|
||
|
||
WORKDIR /var/www/$appname | ||
|
||
ENTRYPOINT [ "/bin/sh", "/dockerrun.sh" ] | ||
CMD [] | ||
CMD /dockerrun.sh |
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
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
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
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
Oops, something went wrong.