Update docker-compose.yml

This commit is contained in:
Reuben George 2024-03-26 00:08:42 +05:30 committed by GitHub
parent 971fbf4f9d
commit 7f2ebda3e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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