-
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.
Merge pull request #9 from Kalkuli/develop
Config Deploy
- Loading branch information
Showing
4 changed files
with
50 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Our base image already includes tesseract. This should be the case only for | ||
# this service. | ||
FROM tesseractshadow/tesseract4re | ||
|
||
RUN mkdir /usr/src/app | ||
WORKDIR /usr/src/app | ||
|
||
# Making sure we are using Python 3.6 | ||
RUN add-apt-repository ppa:jonathonf/python-3.6 | ||
RUN apt-get update | ||
RUN apt-get install -y poppler-utils | ||
RUN apt-get install -y python3.6 libpython3.6 | ||
|
||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 2 | ||
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1 | ||
RUN rm /usr/bin/python3 | ||
RUN ln -s python3.6 /usr/bin/python3 | ||
|
||
RUN apt-get install -y python3-pip | ||
|
||
COPY ./requirements.txt /usr/src/app/requirements.txt | ||
RUN pip3 install -r requirements.txt | ||
|
||
COPY . /usr/src/app | ||
|
||
CMD gunicorn -b 0.0.0.0:$PORT manage: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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -u | ||
|
||
if [ $TRAVIS_PULL_REQUEST != "false" -o $TRAVIS_BRANCH != "master" ] | ||
then | ||
echo "Skipping deployment on branch=$TRAVIS_BRANCH, PR=$TRAVIS_PULL_REQUEST" | ||
exit 0; | ||
fi | ||
|
||
docker login -u _ -p "$HEROKU_TOKEN" registry.heroku.com | ||
|
||
docker build -t registry.heroku.com/kalkuli-extraction/web -f Dockerfile-prod . | ||
|
||
docker push registry.heroku.com/kalkuli-extraction/web | ||
|
||
heroku container:release web -a kalkuli-extraction |
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 |
---|---|---|
|
@@ -4,4 +4,5 @@ Pillow | |
pytesseract | ||
opencv-python | ||
Flask-Testing==0.6.2 | ||
coverage==4.5.1 | ||
coverage==4.5.1 | ||
gunicorn==19.8.1 |