deploying to heroku

This commit is contained in:
2022-05-15 16:38:08 +03:00
parent aa7bb5087c
commit 7d6f6035ea
9 changed files with 37 additions and 16 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
{ {
"python.linting.pylintEnabled": true, "python.linting.pylintEnabled": true,
"python.linting.enabled": true "python.linting.enabled": true,
"cSpell.words": ["dotenv", "wsgi"]
} }
+1
View File
@@ -7,6 +7,7 @@ name = "pypi"
flask = "*" flask = "*"
pytelegrambotapi = "*" pytelegrambotapi = "*"
python-dotenv = "*" python-dotenv = "*"
gunicorn = "*"
[dev-packages] [dev-packages]
black = "*" black = "*"
Generated
+26 -10
View File
@@ -1,7 +1,7 @@
{ {
"_meta": { "_meta": {
"hash": { "hash": {
"sha256": "cbb3e6170d64d57e8b7b6902b88c292dff7241868ddc303f01b2e1d7a50e817d" "sha256": "aee3ee0717c62e54765dc9d959241e798a86492d2d74566a9a5f5635eeb06ada"
}, },
"pipfile-spec": 6, "pipfile-spec": 6,
"requires": { "requires": {
@@ -55,6 +55,14 @@
"index": "pypi", "index": "pypi",
"version": "==2.1.2" "version": "==2.1.2"
}, },
"gunicorn": {
"hashes": [
"sha256:9dcc4547dbb1cb284accfb15ab5667a0e5d1881cc443e0677b4882a4067a807e",
"sha256:e0a968b5ba15f8a328fdfd7ab1fcb5af4470c28aaf7e55df02a99bc13138e6e8"
],
"index": "pypi",
"version": "==20.1.0"
},
"idna": { "idna": {
"hashes": [ "hashes": [
"sha256:84d9dd047ffa80596e0f246e2eab0b391788b0503584e8945f2368256d2735ff", "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'", "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" "version": "==2.27.1"
}, },
"setuptools": {
"hashes": [
"sha256:5534570b9980fc650d45c62877ff603c7aaaf24893371708736cc016bd221c3c",
"sha256:ca6ba73b7fd5f734ae70ece8c4c1f7062b07f3352f6428f6277e27c8f5c64237"
],
"markers": "python_version >= '3.7'",
"version": "==62.2.0"
},
"urllib3": { "urllib3": {
"hashes": [ "hashes": [
"sha256:44ece4d53fb1706f667c9bd1c648f5469a2ec925fcf3a776667042d645472c14", "sha256:44ece4d53fb1706f667c9bd1c648f5469a2ec925fcf3a776667042d645472c14",
@@ -168,11 +184,11 @@
"develop": { "develop": {
"astroid": { "astroid": {
"hashes": [ "hashes": [
"sha256:561dc6015eecce7e696ff7e3b40434bc56831afeff783f0ea853e19c4f635c06", "sha256:14ffbb4f6aa2cf474a0834014005487f7ecd8924996083ab411e7fa0b508ce0b",
"sha256:da0632b7c046d8361dfe1b1abb2e085a38624961fabe2997565a9c06c1be9d9a" "sha256:f4e4ec5294c4b07ac38bab9ca5ddd3914d4bf46f9006eb5c0ae755755061044e"
], ],
"markers": "python_full_version >= '3.6.2'", "markers": "python_full_version >= '3.6.2'",
"version": "==2.11.4" "version": "==2.11.5"
}, },
"black": { "black": {
"hashes": [ "hashes": [
@@ -310,19 +326,19 @@
}, },
"pylint": { "pylint": {
"hashes": [ "hashes": [
"sha256:ced8968c3b699df0615e2a709554dec3ddac2f5cd06efadb69554a69eeca364a", "sha256:095567c96e19e6f57b5b907e67d265ff535e588fe26b12b5ebe1fc5645b2c731",
"sha256:f87e863a0b08f64b5230e7e779bcb75276346995737b2c0dc2793070487b1ff6" "sha256:705c620d388035bdd9ff8b44c5bcdd235bfb49d276d488dd2c8ff1736aa42526"
], ],
"index": "pypi", "index": "pypi",
"version": "==2.13.8" "version": "==2.13.9"
}, },
"setuptools": { "setuptools": {
"hashes": [ "hashes": [
"sha256:26ead7d1f93efc0f8c804d9fafafbe4a44b179580a7105754b245155f9af05a8", "sha256:5534570b9980fc650d45c62877ff603c7aaaf24893371708736cc016bd221c3c",
"sha256:47c7b0c0f8fc10eec4cf1e71c6fdadf8decaa74ffa087e68cd1c20db7ad6a592" "sha256:ca6ba73b7fd5f734ae70ece8c4c1f7062b07f3352f6428f6277e27c8f5c64237"
], ],
"markers": "python_version >= '3.7'", "markers": "python_version >= '3.7'",
"version": "==62.1.0" "version": "==62.2.0"
}, },
"tomli": { "tomli": {
"hashes": [ "hashes": [
+1 -1
View File
@@ -1 +1 @@
web: python src/server.py web: gunicorn wsgi:app
BIN
View File
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
python-3.10.4
+2
View File
@@ -14,6 +14,8 @@ bot.set_webhook(
os.getenv("PROJECT_NAME"), os.getenv("TELEGRAM_TOKEN") os.getenv("PROJECT_NAME"), os.getenv("TELEGRAM_TOKEN")
) )
) )
print(os.getenv("PROJECT_NAME"))
print(os.getenv("TELEGRAM_TOKEN"))
@bot.message_handler(commands=["start"]) @bot.message_handler(commands=["start"])
-4
View File
@@ -18,7 +18,3 @@ def webhook():
return "" return ""
else: else:
flask.abort(403) flask.abort(403)
if __name__ == "__main__":
app.run()
+4
View File
@@ -0,0 +1,4 @@
from src.server import app
if __name__ == "__main__":
app.run()