I deploy my application using docker, and I have django-app and a telegram bot (webhook) in the same container, how can I make my webhook work? (attached screenshots)
This is what I get when I run the bot without docker, it's correct and it works:
* Running on all addresses (0.0.0.0)
* Running on https://127.0.0.1:8443
* Running on https://81.87.198.222:8443 (Press CTRL C to quit) and etc...
With docker:
* Running on all addresses (0.0.0.0)
* Running on https://127.0.0.1:8443
* Running on https://172.19.0.3:8443 (Press CTRL C to quit) and etc...
I understand that my webhook should be given to the white address, but in the case of docker, I have the address of the docker container, but how to do this?
CodePudding user response:
The 8443 port need to be exposed onto the host, using -p 8443: 8443
on docker run command, or
ports:
- 8443:8443
on docker-compose manifest.
PS: Also I would advise having a container for each processes, but as long as it works.
CodePudding user response:
Run your docker run
command with --network=host