Skip to content

Commit 133abdf

Browse files
committed
Set default Docker image for Compose Dev Services
1 parent c6ed472 commit 133abdf

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

docs/src/main/asciidoc/compose-dev-services.adoc

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ Let's see how to use Compose Dev Services with examples ranging from simple to m
5656
In a Quarkus project already configured to use the `quarkus-jdbc-postgresql` extension,
5757
you can create a `compose-devservices.yml` file in the root of the project and define a custom service using Compose:
5858

59-
[source, yaml]
59+
[source, yaml, subs=attributes+]
6060
----
6161
services:
6262
db:
63-
image: postgres:17
63+
image: {postgres-image}
6464
healthcheck:
6565
test: pg_isready -U myuser -d mydb
6666
interval: 5s
@@ -84,11 +84,11 @@ and the application datasource will be configured by extracting connection infor
8484

8585
For more complex scenarios, you can define custom networks and service dependencies:
8686

87-
[source, yaml]
87+
[source, yaml, subs=attributes+]
8888
----
8989
services:
9090
db:
91-
image: postgres:17
91+
image: {postgres-image}
9292
ports:
9393
- '5432'
9494
environment:
@@ -101,7 +101,7 @@ services:
101101
- postgres-data:/var/lib/postgresql/data
102102
103103
cache:
104-
image: redis:7
104+
image: {redis-image}
105105
command: redis-server --save 60 1 --loglevel warning
106106
ports:
107107
- '6379'
@@ -111,7 +111,7 @@ services:
111111
- db
112112
113113
message-broker:
114-
image: rabbitmq:3-management
114+
image: {rabbitmq-image}
115115
ports:
116116
- '5672'
117117
- '15672'
@@ -294,11 +294,11 @@ quarkus.compose.devservices.files=src/main/docker/base-compose.yml,src/main/dock
294294
With profiles, Compose files can define a set of active profiles so that started services are adjusted for various usages and environments.
295295
You can specify the profiles to activate by setting the `quarkus.compose.devservices.profiles` property in the `application.properties` file:
296296

297-
[source, yaml]
297+
[source, yaml, subs=attributes+]
298298
----
299299
services:
300300
db:
301-
image: postgres:17
301+
image: {postgres-image}
302302
profiles:
303303
- dev
304304
- local
@@ -319,11 +319,11 @@ services:
319319

320320
You can configure Compose Dev Services to not discover specific services by adding the `io.quarkus.devservices.compose.ignore` label to the service in your Compose file:
321321

322-
[source, yaml]
322+
[source, yaml, subs=attributes+]
323323
----
324324
services:
325325
db:
326-
image: postgres:17
326+
image: {postgres-image}
327327
labels:
328328
io.quarkus.devservices.compose.ignore: true
329329
ports:
@@ -345,11 +345,11 @@ Compose Dev Services provides several ways to ensure services are ready before y
345345
Compose Dev Services respects the health checks defined in your Compose file.
346346
It's recommended to configure health checks for your services to ensure they are ready before your application tries to use them:
347347

348-
[source, yaml]
348+
[source, yaml, subs=attributes+]
349349
----
350350
services:
351351
db:
352-
image: postgres:17
352+
image: {postgres-image}
353353
healthcheck:
354354
test: pg_isready -U myuser -d mydb
355355
interval: 5s
@@ -419,11 +419,11 @@ This property sets the maximum time to wait for all Dev Services to start. The d
419419
Compose Dev Services starts services in the order they are defined in the Compose file.
420420
If you need to start services in a specific order, you can use the `depends_on` attribute:
421421

422-
[source, yaml]
422+
[source, yaml, subs=attributes+]
423423
----
424424
services:
425425
db:
426-
image: postgres:17
426+
image: {postgres-image}
427427
ports:
428428
- '5432'
429429
environment:
@@ -444,11 +444,11 @@ services:
444444
Compose Dev Services automatically exposes the configuration of discovered services to your application.
445445
For example, when a database service is discovered with the following compose service description:
446446

447-
[source, yaml]
447+
[source, yaml, subs=attributes+]
448448
----
449449
services:
450450
db:
451-
image: mysql:17
451+
image: {mysql-image}
452452
ports:
453453
- '9906:3306'
454454
labels:

0 commit comments

Comments
 (0)