Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
pyro dev to stable

add python 3.6 support

add missing apt support

small fixes in app.json

explain more
  • Loading branch information
rking32 committed Apr 12, 2020
1 parent 28ff833 commit 25cfe86
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 19 deletions.
38 changes: 34 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ async def testing(message: Message):

## Requirements

* Python 3.8 or Higher
* Python 3.6 or Higher
* Telegram [API Keys](https://my.telegram.org/apps)
* Google Drive [API Keys](https://console.developers.google.com/)
* MongoDB [Database URL](https://cloud.mongodb.com/)
* Step 1

Expand Down Expand Up @@ -104,13 +105,42 @@ async def testing(message: Message):
![mongo help 8](resources/mongo_help/8.jpg)

**REMEMBER the password**
* Google Drive [API Keys](https://console.developers.google.com/)

## How To Deploy

> If you are using [HEROKU](https://www.heroku.com/) simply click the button below.
* [HEROKU](https://www.heroku.com/) Method.

> First click the button below.
> If you don't have HU_STRING_SESSION just ignore it.
> After Deployed to Heroku first turn off the app (resources -> turn off) and run `bash genStr` in console (more -> run console).
> After that copy the string session and past it in Config Vars (settings -> reveal config vars).
> Finally turn on the app and check the logs (settings -> view logs) :)
[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/UsergeTeam/Userge)

* Other Method.

```bash
# clone the repo
git clone https://github.com/UsergeTeam/Userge.git
cd Userge

# create virtualenv
virtualenv -p /usr/bin/python3 venv
. ./venv/bin/activate

# install requirements
pip install -r requirements.txt

# Create config.env as given config.env.sample and fill that
cp config.env.sample config.env

# get string session and add it to config.env
bash genStr

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/UsergeTeam/Userge)
# finally run the Userge ;)
bash run
```

> TODO: add Docker Support.
Expand Down
22 changes: 9 additions & 13 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,23 @@
"repository": "https://github.com/uaudith/Userge",
"env": {
"APP_ID": {
"description": "Get this value from https://my.telegram.org",
"value": ""
"description": "Get this value from https://my.telegram.org"
},
"API_HASH": {
"description": "Get this value from https://my.telegram.org",
"value": ""
"description": "Get this value from https://my.telegram.org"
},
"HU_STRING_SESSION": {
"description": "Get it by running `bash genStr` command",
"value": ""
"description": "Get it by running `bash genStr` command or ignore this",
"required": false
},
"DATABASE_URL": {
"description": "Mongodb url from https://cloud.mongodb.com/",
"value": ""
"description": "Mongodb url from https://cloud.mongodb.com/"
},
"G_DRIVE_CLIENT_ID": {
"description": "Googel Drive API Keys from https://console.developers.google.com/",
"value": ""
"description": "Googel Drive API Keys from https://console.developers.google.com/"
},
"G_DRIVE_CLIENT_SECRET": {
"description": "Googel Drive API Keys from https://console.developers.google.com/",
"value": ""
"description": "Googel Drive API Keys from https://console.developers.google.com/"
},
"G_DRIVE_IS_TD": {
"description": "Set True if it is TeamDrive",
Expand All @@ -47,7 +42,6 @@
},
"G_DRIVE_PARENT_ID": {
"description": "GDrive Folder ID",
"value": "root",
"required": false
},
"LOG_CHANNEL_ID": {
Expand All @@ -60,6 +54,8 @@
"buildpacks": [
{
"url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git"
}, {
"url": "https://github.com/heroku/heroku-buildpack-apt.git"
}, {
"url": "heroku/python"
}
Expand Down
2 changes: 1 addition & 1 deletion genStrSession.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ async def genStrSession():


if __name__ == "__main__":
asyncio.run(genStrSession())
asyncio.get_event_loop().run_until_complete(genStrSession())
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
https://github.com/pyrogram/pyrogram/archive/asyncio.zip
python-dotenv
tgcrypto
git+https://github.com/pyrogram/pyrogram.git@asyncio-dev
pymongo
dnspython
hachoir
Expand Down

0 comments on commit 25cfe86

Please sign in to comment.