Update docker-compose.yml

This commit is contained in:
Reuben George 2024-03-25 23:35:16 +05:30 committed by GitHub
parent 1549a4a598
commit 2e5b33328a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,20 +1,22 @@
version: "2.2"
services:
webapp:
build: .
ports:
- "8080:8080"
mysql:
image: mysql:8.2
ports:
- "3306:3306"
environment:
- MYSQL_ROOT_PASSWORD=
- MYSQL_ROOT_PASSWORD=root
- MYSQL_ALLOW_EMPTY_PASSWORD=true
- MYSQL_USER=petclinic
- MYSQL_PASSWORD=petclinic
- MYSQL_DATABASE=petclinic
volumes:
- "./conf.d:/etc/mysql/conf.d:ro"
profiles:
- mysql
- mysql_data:/var/lib/mysql
postgres:
image: postgres:16.1
ports:
@ -23,5 +25,9 @@ services:
- POSTGRES_PASSWORD=petclinic
- POSTGRES_USER=petclinic
- POSTGRES_DB=petclinic
profiles:
- postgres
volumes:
- postgres_data:/var/lib/postgresql
volumes:
mysql_data:
postgres_data: