diff --git a/Dockerfile b/Dockerfile index f2de2ab9..b7052b89 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/ncigdc/apache-base:1.0.3 as build +FROM quay.io/ncigdc/apache-base:1.0.3-py3.5 as build COPY . /indexd @@ -6,18 +6,18 @@ WORKDIR /indexd RUN apt-get update \ && apt-get install -y --no-install-recommends \ - python2.7 \ - python-dev \ - python-pip \ - python-setuptools \ + python3 \ + python3-dev \ + python3-pip \ + python3-setuptools \ libpq-dev \ libpq5 \ gcc \ - && pip install wheel \ - && pip install -r build/requirements.txt \ - && python setup.py install + && pip3 install wheel \ + && pip3 install -r build/requirements.txt \ + && python3 setup.py install -FROM quay.io/ncigdc/apache-base:1.0.3 +FROM quay.io/ncigdc/apache-base:1.0.3-py3.5 LABEL org.label-schema.name="indexd" \ org.label-schema.description="indexd container image" \ @@ -33,7 +33,7 @@ RUN mkdir -p /var/www/indexd/ \ COPY wsgi.py /var/www/indexd/ COPY bin/indexd /var/www/indexd/ -COPY --from=build /usr/local/lib/python2.7/dist-packages /usr/local/lib/python2.7/dist-packages +COPY --from=build /usr/local/lib/python3.5/dist-packages /usr/local/lib/python3.5/dist-packages COPY . /indexd WORKDIR /var/www/indexd diff --git a/dockerrun.bash b/dockerrun.bash index b41b927e..fe4b28a8 100755 --- a/dockerrun.bash +++ b/dockerrun.bash @@ -14,5 +14,5 @@ if [[ -f ./wsgi.py && "$GEN3_DEBUG" == "True" ]]; then echo -e "\napplication.debug=True\n" >> ./wsgi.py fi -sudo -u www-data python wsgi.py +sudo -u www-data python3 wsgi.py /usr/sbin/apache2ctl -D FOREGROUND diff --git a/indexd/index/drivers/alchemy.py b/indexd/index/drivers/alchemy.py index 469508c0..e38c545c 100644 --- a/indexd/index/drivers/alchemy.py +++ b/indexd/index/drivers/alchemy.py @@ -20,7 +20,7 @@ or_, select, ) -from sqlalchemy.dialects.postgres import JSONB +from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy.exc import IntegrityError, ProgrammingError from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import joinedload, relationship, sessionmaker diff --git a/requirements.txt b/requirements.txt index a35a83e4..bdf0d4c8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,10 +1,10 @@ -flask==0.12.4 +flask==1.1.1 jsonschema==2.5.1 -sqlalchemy==1.0.8 +sqlalchemy==1.3.3 sqlalchemy-utils>=0.32.21 psycopg2>=2.7 -future>=0.16.0,<1.0.0 --e git+https://github.com/NCI-GDC/indexclient.git@1.5.8#egg=indexclient +future==0.18.1 +-e git+https://github.com/NCI-GDC/indexclient.git@1.5.10#egg=indexclient -e git+https://github.com/uc-cdis/cdislogging.git@0.0.2#egg=cdislogging -e git+https://github.com/uc-cdis/doiclient.git@1.0.0#egg=doiclient -e git+https://github.com/uc-cdis/dosclient.git@1.0.0#egg=dosclient diff --git a/setup.py b/setup.py index a41eb4af..95ab9250 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ setup( name='indexd', - version='2.2.0', + version='2.3.0', packages=find_packages(), package_data={ 'index': [ @@ -10,21 +10,19 @@ ] }, install_requires=[ - 'flask==0.12.4', - 'jsonschema==2.5.1', - 'sqlalchemy==1.0.8', - 'sqlalchemy-utils>=0.32.21', + 'flask<2', + 'jsonschema<3', + 'sqlalchemy==1.3.3', + 'sqlalchemy-utils<1', 'psycopg2>=2.7', - 'future>=0.16.0,<1.0.0', 'cdislogging', 'indexclient', 'doiclient', 'dosclient', + 'future<1' ], dependency_links=[ "git+https://github.com/uc-cdis/cdislogging.git@0.0.2#egg=cdislogging", - "git+https://github.com/uc-cdis/indexclient.git@1.3.1#egg=indexclient", - "git+https://github.com/uc-cdis/doiclient.git@1.0.0#egg=doiclient", - "git+https://github.com/uc-cdis/dosclient.git@1.0.0#egg=dosclient", + "git+https://github.com/NCI-GDC/indexclient.git@1.5.10#egg=indexclient", ], )