I'm a bit confused on how to setup my environment with docker-compose. I want to have the following:
- docker-compose file for an ELK stack
- docker-compose file for web application A with filebeat
- docker-compose file for web application B with filebeat
I want to stop/start/build the ELK stack container independently from the containers of the web applications A/B. But i would like to link the containers to the ELK stack container to open the connection for filebeat.
What I'm looking for would be like this:
- No container is running
- docker-compose up in the web app A folder. No elk container is running. Starts ELK stack and then web app A container.
- docker-compose up in the web app B folder. Elk container is already running (from 1). Does not start an additional ELK stack. Starts web app B.
- docker-compose stop in elk stack container works
- docker-compose start in elk stack container works and "reconnects".
Is this somehow possible. I did not get it to work with extends or link.
Thanks in advance