-
Notifications
You must be signed in to change notification settings - Fork 20
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
1 parent
02d6ed8
commit 13f6a7a
Showing
48 changed files
with
2,550 additions
and
2,353 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,9 @@ | ||
workflow "Run python formatter" { | ||
on = "pull_request" | ||
resolves = ["Run wool"] | ||
} | ||
|
||
action "Run wool" { | ||
uses = "uc-cdis/wool@master" | ||
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 |
---|---|---|
|
@@ -2,7 +2,6 @@ dist: xenial | |
language: python | ||
|
||
python: | ||
- "2.7" | ||
- "3.6" | ||
|
||
sudo: false | ||
|
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,26 +1,39 @@ | ||
# To run: docker run -v /path/to/wsgi.py:/var/www/indexd/wsgi.py --name=indexd -p 81:80 indexd | ||
# To check running container: docker exec -it indexd /bin/bash | ||
|
||
FROM quay.io/cdis/py27base:pybase2-1.0.2 | ||
FROM quay.io/cdis/python-nginx:pybase3-1.0.0 | ||
|
||
MAINTAINER CDIS <cdissupport@opensciencedatacloud.org> | ||
|
||
RUN mkdir /var/www/indexd \ | ||
&& chown www-data /var/www/indexd | ||
ENV appname=indexd | ||
|
||
COPY . /indexd | ||
COPY ./deployment/uwsgi/uwsgi.ini /etc/uwsgi/uwsgi.ini | ||
RUN apk update \ | ||
&& apk add postgresql-libs postgresql-dev libffi-dev libressl-dev \ | ||
&& apk add linux-headers musl-dev gcc \ | ||
&& apk add curl bash git vim | ||
|
||
WORKDIR /indexd | ||
COPY . /$appname | ||
COPY ./deployment/uwsgi/uwsgi.ini /etc/uwsgi/uwsgi.ini | ||
COPY ./deployment/uwsgi/wsgi.py /$appname/wsgi.py | ||
WORKDIR /$appname | ||
|
||
RUN python -m pip install -r requirements.txt | ||
RUN COMMIT=`git rev-parse HEAD` && echo "COMMIT=\"${COMMIT}\"" >indexd/index/version_data.py | ||
RUN VERSION=`git describe --always --tags` && echo "VERSION=\"${VERSION}\"" >>indexd/index/version_data.py | ||
RUN python setup.py install | ||
RUN python -m pip install --upgrade pip \ | ||
&& python -m pip install --upgrade setuptools \ | ||
&& 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/indexd | ||
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 | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from indexd import get_app | ||
import os | ||
os.environ['INDEXD_SETTINGS'] = '/var/www/indexd/' | ||
|
||
os.environ["INDEXD_SETTINGS"] = "/var/www/indexd/" | ||
application = get_app() |
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 +1 @@ | ||
from .app import get_app | ||
from .app import get_app |
Oops, something went wrong.