mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-27 01:45:49 +00:00
Introduce ergomake
This commit is contained in:
parent
0962ed7e8f
commit
bba30542b1
2 changed files with 60 additions and 0 deletions
7
.ergomake/Dockerfile
Normal file
7
.ergomake/Dockerfile
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
FROM openjdk:18
|
||||||
|
ARG DATABASE
|
||||||
|
WORKDIR app
|
||||||
|
COPY . .
|
||||||
|
EXPOSE 8080
|
||||||
|
ENV DATABASE ${DATABASE}
|
||||||
|
CMD sh -c '/app/mvnw spring-boot:run -Dspring-boot.run.profiles=$DATABASE'
|
53
.ergomake/docker-compose.yml
Normal file
53
.ergomake/docker-compose.yml
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
version: '3.8'
|
||||||
|
|
||||||
|
services:
|
||||||
|
h2-app:
|
||||||
|
build:
|
||||||
|
context: ..
|
||||||
|
dockerfile: .ergomake/Dockerfile
|
||||||
|
args:
|
||||||
|
- DATABASE=h2
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
postgres-app:
|
||||||
|
build:
|
||||||
|
context: ..
|
||||||
|
dockerfile: .ergomake/Dockerfile
|
||||||
|
args:
|
||||||
|
- DATABASE=postgres
|
||||||
|
ports:
|
||||||
|
- "8081:8080"
|
||||||
|
environment:
|
||||||
|
- POSTGRES_URL=jdbc:postgresql://postgres/petclinic
|
||||||
|
- POSTGRES_USER=petclinic
|
||||||
|
- POSTGRES_PASS=petclinic
|
||||||
|
mysql-app:
|
||||||
|
build:
|
||||||
|
context: ..
|
||||||
|
dockerfile: .ergomake/Dockerfile
|
||||||
|
args:
|
||||||
|
- DATABASE=mysql
|
||||||
|
ports:
|
||||||
|
- "8082:8080"
|
||||||
|
environment:
|
||||||
|
- MYSQL_URL=jdbc:mysql://mysql/petclinic
|
||||||
|
- MYSQL_USER=petclinic
|
||||||
|
- MYSQL_PASS=petclinic
|
||||||
|
mysql:
|
||||||
|
image: mysql
|
||||||
|
ports:
|
||||||
|
- "3306"
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=
|
||||||
|
- MYSQL_ALLOW_EMPTY_PASSWORD=true
|
||||||
|
- MYSQL_USER=petclinic
|
||||||
|
- MYSQL_PASSWORD=petclinic
|
||||||
|
- MYSQL_DATABASE=petclinic
|
||||||
|
postgres:
|
||||||
|
image: postgres
|
||||||
|
ports:
|
||||||
|
- "5432"
|
||||||
|
environment:
|
||||||
|
- POSTGRES_PASSWORD=petclinic
|
||||||
|
- POSTGRES_USER=petclinic
|
||||||
|
- POSTGRES_DB=petclinic
|
Loading…
Reference in a new issue