-
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.
fix: Changes according to PR comments
- Loading branch information
Showing
25 changed files
with
415 additions
and
411 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
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,45 +1,47 @@ | ||
# To run: docker run -v /path/to/wsgi.py:/var/www/manifest_service/wsgi.py --name=manifest_service -p 81:80 manifest_service | ||
# To check running container: docker exec -it manifest_service /bin/bash | ||
# To run: docker run -v /path/to/wsgi.py:/var/www/manifestservice/wsgi.py --name=manifestservice -p 81:80 manifestservice | ||
# To check running container: docker exec -it manifestservice /bin/bash | ||
|
||
|
||
FROM quay.io/cdis/python-nginx:master | ||
|
||
|
||
ENV appname=manifest_service | ||
RUN echo "7" && ls | ||
ENV appname=manifestservice | ||
|
||
# number of uwsgi worker processes | ||
ENV UWSGI_CHEAPER 2 | ||
|
||
ENV WORKON_HOME=/.venv | ||
|
||
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 | ||
|
||
RUN echo "17" && ls | ||
COPY . /$appname | ||
COPY ./deployment/uwsgi/uwsgi.ini /etc/uwsgi/uwsgi.ini | ||
COPY ./deployment/uwsgi/wsgi.py /$appname/wsgi.py | ||
COPY ./deployment/nginx/nginx.conf /etc/nginx/ | ||
COPY ./deployment/nginx/uwsgi.conf /etc/nginx/conf.d/nginx.conf | ||
WORKDIR /$appname | ||
RUN echo "24" && ls | ||
|
||
RUN python -m pip install --upgrade pip \ | ||
&& python -m pip install --upgrade setuptools \ | ||
&& pip install -r requirements.txt --src /usr/local/lib/python3.6/site-packages/ | ||
RUN python -m pip install --upgrade pip && pip install pipenv && pipenv install | ||
|
||
RUN echo "26" && ls | ||
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 | ||
|
||
RUN echo "34" && ls | ||
EXPOSE 80 | ||
|
||
RUN echo "36" | ||
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 | ||
|
||
RUN echo "42" && ls | ||
CMD /$appname/dockerrun.bash |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"aws_access_key_id": "", | ||
"aws_secret_access_key": "", | ||
"manifest_bucket_name" : "", | ||
"hostname": "" | ||
} |
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,2 +1,2 @@ | ||
from manifest_service.api import app | ||
from manifestservice.api import app | ||
application = 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
Oops, something went wrong.