mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 14:55:50 +00:00
feat: added docker compose with modified apps
This commit is contained in:
parent
22a7dd454d
commit
2b2328b384
1 changed files with 19 additions and 17 deletions
|
@ -1,25 +1,27 @@
|
||||||
services:
|
services:
|
||||||
mysql:
|
app:
|
||||||
image: mysql:9.0
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- "3306:3306"
|
- 8000:8000
|
||||||
|
- 8080:80
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=
|
- SERVER_PORT=8080
|
||||||
- MYSQL_ALLOW_EMPTY_PASSWORD=true
|
- DATABASE_URL=jdbc:postgresql://postgresdb/petclinic
|
||||||
- MYSQL_USER=petclinic
|
|
||||||
- MYSQL_PASSWORD=petclinic
|
|
||||||
- MYSQL_DATABASE=petclinic
|
|
||||||
volumes:
|
volumes:
|
||||||
- "./conf.d:/etc/mysql/conf.d:ro"
|
- ./:/app
|
||||||
profiles:
|
depends_on:
|
||||||
- mysql
|
- postgresdb
|
||||||
postgres:
|
postgresdb:
|
||||||
image: postgres:17.0
|
image: postgres:14
|
||||||
ports:
|
ports:
|
||||||
- "5432:5432"
|
- 5432:5432
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_PASSWORD=petclinic
|
|
||||||
- POSTGRES_USER=petclinic
|
- POSTGRES_USER=petclinic
|
||||||
|
- POSTGRES_PASSWORD=petclinic
|
||||||
- POSTGRES_DB=petclinic
|
- POSTGRES_DB=petclinic
|
||||||
profiles:
|
volumes:
|
||||||
- postgres
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
volumes:
|
||||||
|
postgres_data:
|
Loading…
Reference in a new issue