meanii / downly

downly is a simple telegram bot that can download files from the internet and upload them to telegram.
MIT License
13 stars 2 forks source link

is it possible to use it without docker #2

Closed N30Z3N closed 10 months ago

N30Z3N commented 11 months ago

I wish to run on a server but don't want to use docker any other way ?

meanii commented 11 months ago

yes, you can use it without docker

follow these steps

  1. deploy your postgresql instance
  2. install ffmpeg
  3. install dependencies pip install -r requirements.txt
  4. python3 -m downly
N30Z3N commented 11 months ago

what to write in config.yaml any example

meanii commented 11 months ago

what to write in config.yaml any example

downly:
  app_name: "downly"

  telegram:
    api_id: "your_telegram_api_id"
    api_hash: "your_telegram_api_hash"
    bot_token: "your_telegram_bot_token"

  configs:
    owner: "your_telegram_bot_owner_userid"
    channel_id: "your_telegram_channel_id"
    public: "true"
    cobalt_base_url: "https://co.wuk.sh"

  database:
    postgres_url: "postgres://downly:downly@localhost:5432/downly"
    redis_url: "redis://localhost:6379"
N30Z3N commented 11 months ago

postgres error


2023-12-06 08:06:48,192 - downly.database - ERROR - [PostgreSQL] Failed to connect due to Can't load plugin: sqlalchemy.dialects:postgres
Traceback (most recent call last):
  File "/root/downly/downly/database/__init__.py", line 28, in <module>
    SESSION = start()
              ^^^^^^^
  File "/root/downly/downly/database/__init__.py", line 15, in start
    engine = create_engine(postgres_url, client_encoding="utf8")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 2, in create_engine
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/deprecations.py", line 281, in warned
    return fn(*args, **kwargs)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/create.py", line 552, in create_engine
    entrypoint = u._get_entrypoint()
                 ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/url.py", line 754, in _get_entrypoint
    cls = registry.load(name)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 374, in load
    raise exc.NoSuchModuleError(
sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgres ```
meanii commented 11 months ago

postgres error

2023-12-06 08:06:48,192 - downly.database - ERROR - [PostgreSQL] Failed to connect due to Can't load plugin: sqlalchemy.dialects:postgres
Traceback (most recent call last):
  File "/root/downly/downly/database/__init__.py", line 28, in <module>
    SESSION = start()
              ^^^^^^^
  File "/root/downly/downly/database/__init__.py", line 15, in start
    engine = create_engine(postgres_url, client_encoding="utf8")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 2, in create_engine
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/deprecations.py", line 281, in warned
    return fn(*args, **kwargs)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/create.py", line 552, in create_engine
    entrypoint = u._get_entrypoint()
                 ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/engine/url.py", line 754, in _get_entrypoint
    cls = registry.load(name)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/sqlalchemy/util/langhelpers.py", line 374, in load
    raise exc.NoSuchModuleError(
sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:postgres ```
  1. Verify the status of your PostgreSQL instance.
  2. Confirm that the provided PostgreSQL connection URL is correct and valid.