mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 14:55:50 +00:00
Add deployment automation scripts and configuration
This commit is contained in:
parent
3510815b58
commit
4cf9ecf251
4 changed files with 19 additions and 22 deletions
BIN
.DS_Store
vendored
BIN
.DS_Store
vendored
Binary file not shown.
BIN
.github/.DS_Store
vendored
Normal file
BIN
.github/.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
FROM openjdk:17-jdk-slim
|
||||
COPY target/spring-petclinic-*.jar /app/spring-petclinic.jar
|
||||
ENTRYPOINT ["java", "-jar", "/app/spring-petclinic.jar"]
|
||||
|
||||
FROM mysql:8.0
|
||||
|
|
|
@ -1,25 +1,22 @@
|
|||
services:
|
||||
mysql:
|
||||
image: mysql:8.4
|
||||
petclinic:
|
||||
image: samanthayeep/petclinic:latest
|
||||
ports:
|
||||
- "3306:3306"
|
||||
- "8082:8082"
|
||||
depends_on:
|
||||
- db
|
||||
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"
|
||||
profiles:
|
||||
- mysql
|
||||
postgres:
|
||||
image: postgres:16.3
|
||||
- SPRING_PROFILES_ACTIVE=dev
|
||||
- DATABASE_URL=jdbc:mysql://db:3307/petclinic
|
||||
- DATABASE_USERNAME=petclinic
|
||||
- DATABASE_PASSWORD=petclinicpassword
|
||||
|
||||
db:
|
||||
image: my-mysql-image
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpassword
|
||||
MYSQL_DATABASE: petclinic
|
||||
MYSQL_USER: petclinic
|
||||
MYSQL_PASSWORD: petclinicpassword
|
||||
ports:
|
||||
- "5432:5432"
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=petclinic
|
||||
- POSTGRES_USER=petclinic
|
||||
- POSTGRES_DB=petclinic
|
||||
profiles:
|
||||
- postgres
|
||||
- "3307:3306"
|
||||
|
|
Loading…
Reference in a new issue