I am writing a chat bot in php using Telegraph. Since weghook telegram requires https connection I use ngrok. There is a problem when I use the postgres image I get the error 'host name "pgsql" to address: Name or service not known' in the env file host name postgres specified container name pgsql. But at the same time web hook telegram work. When changing the host name in the env file to localhost the telegram hooks do not work. How can fix it?
postgres section from .evn file
DB_CONNECTION=pgsql
DB_HOST=pgsql
DB_PORT=5432
DB_DATABASE=telegram_bot
DB_USERNAME=sail
DB_PASSWORD=password
I tried changing DB_HOST=localhost, but webhook stops working
postgres section from .evn file
DB_CONNECTION=pgsql
DB_HOST=pgsql
DB_PORT=5432
DB_DATABASE=telegram_bot
DB_USERNAME=sail
DB_PASSWORD=password
I tried changing DB_HOST=localhost, but webhook stops working