From 7d6f6035ea3ddff46b2aafd37a97a27c7212d290 Mon Sep 17 00:00:00 2001 From: Ian Andwati Date: Sun, 15 May 2022 16:38:08 +0300 Subject: [PATCH] deploying to heroku --- .vscode/settings.json | 3 ++- Pipfile | 1 + Pipfile.lock | 36 ++++++++++++++++++++++++++---------- Procfile | 2 +- requirements.txt | Bin 890 -> 1374 bytes runtime.txt | 1 + src/bot.py | 2 ++ src/server.py | 4 ---- wsgi.py | 4 ++++ 9 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 runtime.txt create mode 100644 wsgi.py diff --git a/.vscode/settings.json b/.vscode/settings.json index 0b52060..0b341f9 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,5 @@ { "python.linting.pylintEnabled": true, - "python.linting.enabled": true + "python.linting.enabled": true, + "cSpell.words": ["dotenv", "wsgi"] } diff --git a/Pipfile b/Pipfile index 73c9d61..ce81435 100644 --- a/Pipfile +++ b/Pipfile @@ -7,6 +7,7 @@ name = "pypi" flask = "*" pytelegrambotapi = "*" python-dotenv = "*" +gunicorn = "*" [dev-packages] black = "*" diff --git a/Pipfile.lock b/Pipfile.lock index f38578f..cd19a3f 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "cbb3e6170d64d57e8b7b6902b88c292dff7241868ddc303f01b2e1d7a50e817d" + "sha256": "aee3ee0717c62e54765dc9d959241e798a86492d2d74566a9a5f5635eeb06ada" }, "pipfile-spec": 6, "requires": { @@ -55,6 +55,14 @@ "index": "pypi", "version": "==2.1.2" }, + "gunicorn": { + "hashes": [ + "sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e", + "sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8" + ], + "index": "pypi", + "version": "==20.1.0" + }, "idna": { "hashes": [ "sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff", @@ -148,6 +156,14 @@ "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", "version": "==2.27.1" }, + "setuptools": { + "hashes": [ + "sha256:5534570b9980fc650d45c62877ff603c7aaaf24893371708736cc016bd221c3c", + "sha256:ca6ba73b7fd5f734ae70ece8c4c1f7062b07f3352f6428f6277e27c8f5c64237" + ], + "markers": "python_version >= '3.7'", + "version": "==62.2.0" + }, "urllib3": { "hashes": [ "sha256:44ece4d53fb1706f667c9bd1c648f5469a2ec925fcf3a776667042d645472c14", @@ -168,11 +184,11 @@ "develop": { "astroid": { "hashes": [ - "sha256:561dc6015eecce7e696ff7e3b40434bc56831afeff783f0ea853e19c4f635c06", - "sha256:da0632b7c046d8361dfe1b1abb2e085a38624961fabe2997565a9c06c1be9d9a" + "sha256:14ffbb4f6aa2cf474a0834014005487f7ecd8924996083ab411e7fa0b508ce0b", + "sha256:f4e4ec5294c4b07ac38bab9ca5ddd3914d4bf46f9006eb5c0ae755755061044e" ], "markers": "python_full_version >= '3.6.2'", - "version": "==2.11.4" + "version": "==2.11.5" }, "black": { "hashes": [ @@ -310,19 +326,19 @@ }, "pylint": { "hashes": [ - "sha256:ced8968c3b699df0615e2a709554dec3ddac2f5cd06efadb69554a69eeca364a", - "sha256:f87e863a0b08f64b5230e7e779bcb75276346995737b2c0dc2793070487b1ff6" + "sha256:095567c96e19e6f57b5b907e67d265ff535e588fe26b12b5ebe1fc5645b2c731", + "sha256:705c620d388035bdd9ff8b44c5bcdd235bfb49d276d488dd2c8ff1736aa42526" ], "index": "pypi", - "version": "==2.13.8" + "version": "==2.13.9" }, "setuptools": { "hashes": [ - "sha256:26ead7d1f93efc0f8c804d9fafafbe4a44b179580a7105754b245155f9af05a8", - "sha256:47c7b0c0f8fc10eec4cf1e71c6fdadf8decaa74ffa087e68cd1c20db7ad6a592" + "sha256:5534570b9980fc650d45c62877ff603c7aaaf24893371708736cc016bd221c3c", + "sha256:ca6ba73b7fd5f734ae70ece8c4c1f7062b07f3352f6428f6277e27c8f5c64237" ], "markers": "python_version >= '3.7'", - "version": "==62.1.0" + "version": "==62.2.0" }, "tomli": { "hashes": [ diff --git a/Procfile b/Procfile index b185d16..fc272ab 100644 --- a/Procfile +++ b/Procfile @@ -1 +1 @@ -web: python src/server.py \ No newline at end of file +web: gunicorn wsgi:app \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 3e1784e058677a8b470bc234c2a32e0874e247b7..a630759fd97a512399cdbbacde85d9e73d88874b 100644 GIT binary patch literal 1374 zcmbVLO^@0z5WQF0|1i=XxNIB<>_=(STYGGK*lLd}lT3oa@wm1FWq*BV0=p`RqN+$Z ziu3&D&3m4!t9S6n?@0$|Tsw!yC4!}D4UN?;WFgP8fIoW^utS$3Y>l zG9@49dA=uBe&@9^l%vZntBNVt^+vl2>-@S!he0RqFVjceWa(Erq5b;p@$-C;c1{*} z9U?~fZhT`bs==w6&8d>zu{UW+eFBf6q0n(X&~A59K#s^4Viap47Zv>Q^&pSwtF>;q zKx86Y4@Q$iSnMG5P7-=GQfN+?`Sn`ORrI3yzIB_ulQ#5FdE`2u+}F zFu?~}adV@$mTyGJ{H+vUp+mBR6~~w5fZ|7H;4QD6H;O`=N7H#Lsa6=0X-rub<6@#F zWAz}LOL017j*ZmTykOw(YOE&32k<-g**zcb8hk2YG#$wqYpQiwKB$SBo=2(s0Y{dC z?sQp>)lAJ8%2!4bdyc!9u!E8rpNy+%8wJm!5Sh1N-hyA--kFMm6T!SS<}Fh@W}E)4 ztdN)#YwcPL)W-wYC59Fp7)D7-gCzrtN99nF-`2{8I+4GsYRTGxC z_cW_1@tBG++?#YJQ^3;R<*QzwCgUi{#E+(Gd;{ExEQKsnS!S}_iZ>i| w?-P;bGIxdIoG&%e2W!n@T9)k0oqB&3`k#u(4fE)xBSLPkn&3~#W~KfK#4grd<>}Y3D3yT3_00>>=lpmN7N8MWle(FP`9B< zN4K2S7pUpjq2gUh-riKAyI3hTp)XJlhbjM9xYz^e?``*uXk8cDI>ZVP$eY| z-(yAP)_ili1lH8-zM!Xmr52O*G+HVJY>2hiW30G2D7KbxU^l*L?LzyHohd=zv3&Ik zYAQxFwdDQn2!EqX$+M=0wtY|4fIGb4(Ky<