If you would like to connect web-only and data Discourse docker containers.
There is optional setting for this, which is, you could specify a links key in container configuration (yaml file) to link those containers together ( i.e. linking web-only and data container ).
This way is also known as Docker --link flag.
Usage:
If you are trying to link database container to your web container
I’ve been trying this approach, as I’m familiar with using --link and found this in the web-only config, but then what are you supposed to indicate for DISCOURSE_DB_HOST/REDIS_HOST etc? db:migrate keeps failing on bootstrap for me, even though the data container is already running!