I have two containers: for main website and for forum. Both have their own databases. But I need to fetch some information within forum (Laravel) from website-database.
I tried everything in my .env: SECOND_DB_HOST=
- 172.20.0.2 (website docker container ip adress)
- localhost
- 127.0.0.1
- site-db (website docker container name)
SECOND_DB_PORT= should be 3306 in any case, I suppose?
Every time I get "connection refused". Within the website-container the first database works great.
Do I need to some sort of bridge or how is it possible?