mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 20:35:49 +00:00
Add docker-compose file that run application with database
Signed-off-by: Mihailo <mmarcetic@griddynamcis.com>
This commit is contained in:
parent
ceb2bc79db
commit
a2848f9132
1 changed files with 12 additions and 14 deletions
|
@ -1,21 +1,19 @@
|
||||||
services:
|
services:
|
||||||
mysql:
|
app:
|
||||||
image: mysql:9.1
|
image: spring-app:latest
|
||||||
ports:
|
ports:
|
||||||
- "3306:3306"
|
- "8080:8080"
|
||||||
environment:
|
|
||||||
- MYSQL_ROOT_PASSWORD=
|
|
||||||
- MYSQL_ALLOW_EMPTY_PASSWORD=true
|
|
||||||
- MYSQL_USER=petclinic
|
|
||||||
- MYSQL_PASSWORD=petclinic
|
|
||||||
- MYSQL_DATABASE=petclinic
|
|
||||||
volumes:
|
|
||||||
- "./conf.d:/etc/mysql/conf.d:ro"
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:17.0
|
image: postgres:17.0
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- "5432:5432"
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_PASSWORD=petclinic
|
POSTGRES_PASSWORD: petclinic
|
||||||
- POSTGRES_USER=petclinic
|
POSTGRES_USER: petclinic
|
||||||
- POSTGRES_DB=petclinic
|
POSTGRES_DB: petclinic
|
||||||
|
volumes:
|
||||||
|
- pgdata:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
pgdata:
|
||||||
|
|
Loading…
Reference in a new issue