-
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 #3 from Kalkuli/develop
Config Deploy
- Loading branch information
Showing
4 changed files
with
39 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,15 @@ | ||
# Base Image | ||
FROM python:3.6.5-alpine | ||
|
||
# Setting working directory | ||
WORKDIR /app | ||
|
||
# Dealing with requirements | ||
COPY ./requirements.txt /app/requirements.txt | ||
RUN pip install -r requirements.txt | ||
|
||
# Coping project | ||
COPY . /app | ||
|
||
# Running server | ||
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-gateway/web -f Dockerfile-prod . | ||
|
||
docker push registry.heroku.com/kalkuli-gateway/web | ||
|
||
heroku container:release web -a kalkuli-gateway |
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