Easy
Consider the following docker-compose.yml file:
services:
app:
image: my-app:latest
environment:
- DB_HOST=db
- DB_PORT=5432
ports:
- "8080:80"
db:
image: postgres:latest
ports:
- "5432:5432"
How does the app
application connect to the db
database?
Author: AxelStatus: PublishedQuestion passed 136 times
Edit
1
Community EvaluationsNo one has reviewed this question yet, be the first!
Similar QuestionsMore questions about Docker
5
Find the errors in the `docker-compose.yml` file.4
Which file takes precedence if services or options are redefined in several files?2
What is the main use of Docker Compose?2
Is it possible to specify a maximum number of restart attempts with the `on-failure` policy?2
Connect a service to a network in Docker Compose