mirror of
https://github.com/tgdrive/teldrive.git
synced 2024-09-20 08:15:55 +08:00
update readme
This commit is contained in:
parent
b41b261890
commit
0cdc35ba63
41
README.md
41
README.md
|
@ -23,6 +23,8 @@
|
|||
|
||||
![demo](./public/demo.png)
|
||||
|
||||
[UI Repo ](https://github.com/divyam234/teldrive-ui)
|
||||
|
||||
### Deploy using docker-compose
|
||||
First clone the repository
|
||||
```sh
|
||||
|
@ -31,10 +33,12 @@ cd teldrive
|
|||
```
|
||||
now create the `.env` file with your variables. and start your container:
|
||||
**If you are deploying without https replace nginx.conf with nginx_nossl.conf
|
||||
in docker-compose.yml.It should look like this**
|
||||
in docker-compose.yml.It should look like this.Replace #DBURL with POSTGRES URL to RUN first time migrations**
|
||||
```yml
|
||||
volumes:
|
||||
- ./nginx_nossl.conf:/etc/nginx/conf.d/default.conf
|
||||
ports:
|
||||
- 8000:8000
|
||||
```
|
||||
```sh
|
||||
docker compose up -d
|
||||
|
@ -46,18 +50,15 @@ If you're locally hosting, create a file named `.env` in the root directory and
|
|||
An example of `.env` file:
|
||||
|
||||
```sh
|
||||
API_ID=452525
|
||||
API_HASH=esx576f8738x883f3sfzx83
|
||||
API_ID=1234
|
||||
API_HASH=abc
|
||||
CHANNEL_ID=1234
|
||||
JWT_SECRET=abc
|
||||
DATABASE_URL=abc
|
||||
MULTI_CLIENT=true # true or false here
|
||||
MULTI_TOKEN1=55838383:yourfirstmulticlientbottokenhere
|
||||
MULTI_TOKEN2=55838383:yoursecondmulticlientbottokenhere
|
||||
MULTI_TOKEN3=55838383:yourthirdmulticlientbottokenhere
|
||||
BIN_CHANNEL=-100
|
||||
PORT=8080
|
||||
FQDN=yourserverhost
|
||||
HTTPS=1
|
||||
DATABASE_URL='postgres_url'
|
||||
JWT_SECRET=
|
||||
DATABASE_NAME=drive
|
||||
```
|
||||
### Mandatory Vars
|
||||
Before running the bot, you will need to set up the following mandatory variables:
|
||||
|
@ -70,19 +71,13 @@ Before running the bot, you will need to set up the following mandatory variable
|
|||
|
||||
- `DATABASE_URL` : Connection String obtained from Postgres DB (you can use Neon db as free alternative fro postgres)
|
||||
|
||||
- `BIN_CHANNEL` : This is the channel ID for the log channel where the bot will forward media messages and store these files to make the generated direct links work. To obtain a channel ID, create a new telegram channel (public or private), post something in the channel, forward the message to [@missrose_bot](https://telegram.dog/MissRose_bot) and **reply the forwarded message** with the /id command. Copy the forwarded channel ID and paste it into the this field.
|
||||
- `CHANNEL_ID` : This is the channel ID for the log channel where the bot will forward media messages and store these files to make the generated direct links work. To obtain a channel ID, create a new telegram channel (public or private), post something in the channel, forward the message to [@missrose_bot](https://telegram.dog/MissRose_bot) and **reply the forwarded message** with the /id command. Copy the forwarded channel ID and paste it into the this field.
|
||||
|
||||
### Optional Vars
|
||||
In addition to the mandatory variables, you can also set the following optional variables:
|
||||
|
||||
- `WORKERS` : This sets the maximum number of concurrent workers for handling incoming updates. The default value is 3.
|
||||
|
||||
- `PORT` : This sets the port that your webapp will listen to. The default value is 8080.
|
||||
|
||||
- `HTTPS` : Enable HTTPS support on nginx
|
||||
|
||||
- `USE_SESSION_FILE` : Use session files for client(s) rather than storing the pyrogram sqlite database in the memory
|
||||
|
||||
- `MULTI_CLIENT` : Enable or Disable Multi Token mode. If true you have pass atleast one Multi Token
|
||||
- `MULTI_TOKEN[1....]` : Recommended to add atleast 10-12 tokens
|
||||
### For making use of Multi-Client support
|
||||
|
||||
> **Note**
|
||||
|
@ -99,15 +94,15 @@ you may also add as many as bots you want. (max limit is not tested yet)
|
|||
`MULTI_TOKEN3`, `MULTI_TOKEN4`, etc.
|
||||
|
||||
> **Warning**
|
||||
> Don't forget to add all these bots to the `BIN_CHANNEL` for the proper functioning
|
||||
> Don't forget to add all these bots to the `CHANNEL_ID` as admin for the proper functioning
|
||||
|
||||
## FAQ
|
||||
|
||||
- How long the links will remain valid or is there any expiration time for the links generated by the bot?
|
||||
> The links will will be valid as longs as your bot is alive and you haven't deleted the log channel.
|
||||
- How to get Postgres DB url ?
|
||||
> You spin up local postgres instance but its not recommended as there is lot of hassle in backup and transfering data.Recommended way is to use any free cloud postgres DB.I will recommend to use [Neon DB](https://neon.tech/).
|
||||
|
||||
## Contributing
|
||||
|
||||
Feel free to contribute to this project if you have any further ideas
|
||||
Feel free to contribute to this project if you have any further ideas.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue