Skip to content

Commit

Permalink
feat: pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
bacciotti committed May 14, 2024
1 parent 02c306b commit 95a3849
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 4 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,13 @@ jobs:
pip install -r requirements.txt
pip install flake8 pytest
deploy:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Deploy to Heroku
run: make heroku
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM python:3.9.12-alpine3.15
FROM --platform=linux/amd64 python:3.9.12-alpine3.15
#FROM python:3.9.12-alpine3.15

EXPOSE 5000

Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,8 @@ test:

compose:
@docker-compose build
@docker-compose up
@docker-compose up

heroku:
@heroku container:push -a flask-restapi-lbm web
@heroku container:release -a flask-restapi-lbm web
Binary file added application/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
9 changes: 9 additions & 0 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ class DevConfig():
}


class ProdConfig():
MONGODB_SETTINGS = {
'db': os.getenv('MONGODB_DB'),
'host': os.getenv('MONGODB_HOST'),
'username': os.getenv('MONGODB_USER'),
'password': os.getenv('MONGODB_PASSWORD')
}


class MockConfig():
MONGODB_SETTINGS = {
'db': 'users',
Expand Down
2 changes: 1 addition & 1 deletion wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
app = create_app('config.ProdConfig')

if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0')
app.run(debug=True, host='0.0.0.0', port=os.getenv('PORT', 5000))

0 comments on commit 95a3849

Please sign in to comment.