---
title: "Comment by Bernardo Galvao on \"Run Multi-container apps with Docker  Compose\" | Hashnode"
description: "Hey, great primer! But as a newb to docker-compose, I have a question about connecting the db to the ghost application. I guess it depends on the frontend appli"
url: "https://hashnode.com/posts/run-multi-container-apps-with-docker-compose/60ba68d4fffc4c13b9cd4c2b/comment/61aced18a375fb2266f3e7fd"
---

[Discussion](https://hashnode.com/posts/run-multi-container-apps-with-docker-compose/60ba68d4fffc4c13b9cd4c2b)

Comment [Run Multi-container apps with Docker Compose](https://hashnode.com/posts/run-multi-container-apps-with-docker-compose/60ba68d4fffc4c13b9cd4c2b)

[Bernardo Galvao](https://hashnode.com/@brnrdo)

[Dec 5, 2021](https://hashnode.com/posts/run-multi-container-apps-with-docker-compose/60ba68d4fffc4c13b9cd4c2b/comment/61aced18a375fb2266f3e7fd)

Hey, great primer!

But as a newb to docker-compose, I have a question about connecting the db to the ghost application. I guess it depends on the frontend application, but is it always the case that passing env variables to the frontend container the way to connect to the db container?

What could be other ways I may encounter?
