Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 80daf24

Browse files
committed
deployment
1 parent 8473723 commit 80daf24

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

.github/workflows/deploy.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: akhileshns/[email protected] # This is the action
14+
with:
15+
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
16+
heroku_app_name: "call--drop" #Must be unique in Heroku
17+
heroku_email: "[email protected]"

Procfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: python app.py

app.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
#!/usr/bin/env python3
2+
import os
3+
24
from flask import Flask, request
35

46
from db import db_cursor, db_connection
@@ -62,7 +64,8 @@ def sms_log_for_num(phn_num):
6264
return sms_log
6365

6466
if __name__ == '__main__':
65-
app.run()
67+
port = os.getenv('PORT', '8000')
68+
app.run(debug=False, host='0.0.0.0', port=int(port))
6669

6770
#
6871
# // ticket page

0 commit comments

Comments
 (0)