ilyarolf / AiogramShopBot

Aiogram Telegram bot shop with ways to deposit in USDT,LTC,BTC
MIT License
25 stars 8 forks source link

cant bind default address..... #40

Open baz0okq opened 3 weeks ago

baz0okq commented 3 weeks ago

Hi.

ngrok running

20240611_011340

In env

20240611_011415

And i have that error

20240611_011534

Anyone have idea?

ilyarolf commented 3 weeks ago

Hello @baz0okq, now you no longer need to run ngrok manually, it runs when you run the bot in the ngrok_executor.py file. I think this is not the main problem when running the bot, according to the console, you still have some problems in the db.py file

ilyarolf commented 2 weeks ago

@baz0okq Is your problem still relevant?

baz0okq commented 2 weeks ago

Yes mate. Still the same, broke all my head cant find any mistake.

ilyarolf commented 2 weeks ago

@baz0okq have you tried deploying the bot through docker?

baz0okq commented 1 week ago

Fill the docker-compose.yaml and run docker-compose up and its solve problem but give me another one :D

20240619_132558

20240619_133822

ilyarolf commented 1 week ago

@baz0okq By the logs you have some other version of Aiogram even in the docker image, although it should be 3.1.1. You can try not to build the docker image from source, but use the image from Dockerhub.

https://hub.docker.com/r/ilyarolf/aiogram-shop-bot

or

https://hub.docker.com/r/ilyarolf/aiogram-shop-bot-encrypted

In this case your docker-compose.yml will look like this:

version: "3.8"
services:
  bot:
    image: "ilyarolf/aiogram-shop-bot"
    container_name: 'AiogramShopBot'
    environment:
      WEBHOOK_PATH: ""
      WEBAPP_HOST: "0.0.0.0" # Don't touch this
      WEBAPP_PORT: 5000 # Here your port
      TOKEN: "1234567890:QWER.....TYI" # Here your bot token from botfather
      NGROK_TOKEN: 'NGROK_TOKEN_HERE' # Here your ngrok token from ngrok.com
      ADMIN_ID_LIST: "12345678,87654321" # Telegram ID's for admins;
      SUPPORT_LINK: "https://t.me/YourUsername"
      DB_NAME: "database.db" # Here your database name
      PAGE_ENTRIES: 20 # Items per page
    ports:
      - "4040:4040"
      - "5000:5000" # ${WEBAPP_PORT}:${WEBAPP_PORT}
    expose:
      - 4040
      - 5000 # ${WEBAPP_PORT}
    volumes:
      - /AiogramShopBot:/bot/data
    command: ["python", "-u", "run.py"]

volumes:
  AiogramShopBot:
ilyarolf commented 1 day ago

@baz0okq Is your problem still relevant?