@@ -57,7 +57,7 @@ natively. The port numbers on the diagram are the same for Docker on Linux.
5757
5858### Volumes, Configs, and Network
5959
60- We will break down the [ docker- compose.yml ] ( docker- compose.yml ) into parts and explain how
60+ We will break down the [ compose.yaml ] ( compose.yaml ) into parts and explain how
6161each part works.
6262
6363``` yaml
@@ -76,7 +76,7 @@ settings across container restarts.
7676
7777Docker Compose v2.23.1+ supports inline config files using the top-level `configs` section
7878with a `content` field. This lets you define small configuration files directly inside
79- ` docker- compose.yml ` instead of maintaining separate files on disk. Compose mounts the
79+ ` compose.yaml ` instead of maintaining separate files on disk. Compose mounts the
8080content as a read-only file inside the container at the path specified by `target`.
8181
8282` ` ` yaml
@@ -114,11 +114,11 @@ Docker compose will automatically create a single network that all the container
114114to and register them in DNS using the docker compose service name. This means that the pgAdmin
115115container can find the postgres server using its docker-compose service name which is `postgres`.
116116Docker compose derives the network name from the directory name containing the
117- ` docker- compose.yml ` file. In this example the network name is `docker-compose-postgres_default`.
117+ ` compose.yaml ` file. In this example the network name is `docker-compose-postgres_default`.
118118
119119# ## PostgreSQL Container
120120
121- The `docker- compose.yml ` contains a service named `postgres` defined below.
121+ The `compose.yaml ` contains a service named `postgres` defined below.
122122
123123` ` ` yml
124124services:
@@ -163,7 +163,7 @@ The `demo1` database does not have pgvector enabled, keeping it as a standard Po
163163database for the Spring Boot sample application.
164164
165165To switch back to standard PostgreSQL without pgvector, swap the image lines in
166- `docker- compose.yml ` :
166+ `compose.yaml ` :
167167
168168` ` ` yaml
169169image: "postgres:18"
@@ -315,7 +315,7 @@ shown below.
315315<img src="diagrams/pgAdminConnect.png" width="400" height="500" title="PgAdmin">
316316
317317To avoid having to enter the connection settings we define the connection details using an
318- inline config in `docker- compose.yml ` that pgAdmin will import into its configuration.
318+ inline config in `compose.yaml ` that pgAdmin will import into its configuration.
319319Setting `PGADMIN_REPLACE_SERVERS_ON_STARTUP : " True" ` ensures the server definitions are
320320reloaded on every container restart, not just the first launch.
321321
@@ -471,7 +471,7 @@ to `localhost:8080/` should return a random quote similar to the one below
471471Spring Boot 3.1 introduced built-in Docker Compose support via the `spring-boot-docker-compose`
472472dependency. When you run `./mvnw spring-boot:run`, Spring Boot automatically :
473473
474- 1. Detects the `docker- compose.yml ` in the project directory
474+ 1. Detects the `compose.yaml ` in the project directory
4754752. Starts the containers if they aren't already running
4764763. Reads each container's labels, ports, and environment variables
4774774. Auto-configures connection details (datasource URL, username, password, database name)
@@ -491,7 +491,7 @@ services:
491491This label tells Spring Boot that this container provides a PostgreSQL service connection.
492492Spring Boot reads the container's mapped port (which may vary if `PG_PORT` is customized)
493493and the `POSTGRES_USER`, `POSTGRES_PASSWORD`, and `POSTGRES_DB` environment variables to
494- configure the datasource automatically. Changing these values in `docker- compose.yml ` is
494+ configure the datasource automatically. Changing these values in `compose.yaml ` is
495495the only step needed — no `application.yml` changes required.
496496
497497The pgadmin service has a different label to opt out of this auto-configuration :
0 commit comments