mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-22 07:45:49 +00:00
Created a docker compose file to run the application and database
This commit is contained in:
parent
378bb21c37
commit
5793f450d5
1 changed files with 20 additions and 0 deletions
20
my-compose-file.yml
Normal file
20
my-compose-file.yml
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: mysql:latest
|
||||||
|
environment:
|
||||||
|
MYSQL_DATABASE: petclinic
|
||||||
|
MYSQL_USER: petclinic_user
|
||||||
|
MYSQL_PASSWORD: petclinic_password
|
||||||
|
MYSQL_ROOT_PASSWORD: root_password
|
||||||
|
app:
|
||||||
|
image: iancumatei67/spring-petclinic:v2
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
environment:
|
||||||
|
SPRING_DATASOURCE_URL: jdbc:mysql://db:3306/petclinic
|
||||||
|
SPRING_DATASOURCE_USERNAME: petclinic_user
|
||||||
|
SPRING_DATASOURCE_PASSWORD: petclinic_password
|
||||||
|
depends_on:
|
||||||
|
- db
|
Loading…
Reference in a new issue