Back to questionsWhat does
JuniorTheoryVery common
What does docker compose up -d create for this compose.yaml in the folder shop?
services:
web:
image: nginx:1.27.3
ports: ["8080:80"]
db:
image: postgres:17
environment: { POSTGRES_PASSWORD: secret }
volumes: ["dbdata:/var/lib/postgresql/data"]
volumes:
dbdata:A network shop_default that both containers join, the containers shop-web-1 and shop-db-1, and the volume shop_dbdata; web reaches the database as db, and host port 8080 leads to nginx.
- Expecting Compose services to run on the default bridge network, where names do not resolve
- Thinking you must create the volumes from
volumes:by hand beforeup
- How do you change the project name so that the prefix is not the folder name?
- What does
docker compose psshow thatdocker psdoes not?