From b1563e8c4ed2cb42ec85b2c5440ea8d2874edab3 Mon Sep 17 00:00:00 2001 From: Daniel Junior Date: Fri, 9 Dec 2022 06:59:24 +0000 Subject: [PATCH] - fixed typo on yml file. - added quotes to ports identification as per good practices --- language/java/develop.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/language/java/develop.md b/language/java/develop.md index a39d65c962..4119281824 100644 --- a/language/java/develop.md +++ b/language/java/develop.md @@ -128,25 +128,25 @@ Open the `petclinic` in your IDE or a text editor and create a new file named `d ```yaml version: '3.8' services: - petclinic: - build: - context: . - target: development - ports: - - 8000:8000 - - 8080:8080 - environment: - - SERVER_PORT=8080 - - MYSQL_URL=jdbc:mysql://mysqlserver/petclinic - volumes: - - ./:/app + petclinic: + build: + context: . + target: development + ports: + - "8000:8000" + - "8080:8080" + environment: + - SERVER_PORT=8080 + - MYSQL_URL=jdbc:mysql://mysqlserver/petclinic + volumes: + - ./:/app depends_on: - mysqlserver - mysqlserver: + mysqlserver: image: mysql:8.0 ports: - - 3306:3306 + - "3306:3306" environment: - MYSQL_ROOT_PASSWORD= - MYSQL_ALLOW_EMPTY_PASSWORD=true @@ -157,8 +157,8 @@ services: - mysql_data:/var/lib/mysql - mysql_config:/etc/mysql/conf.d volumes: - mysql_data: - mysql_config: + mysql_data: + mysql_config: ``` This Compose file is super convenient as we do not have to type all the parameters to pass to the `docker run` command. We can declaratively do that using a Compose file.