mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 15:25:49 +00:00
Docker compose assesment
This commit is contained in:
parent
d0728a3ebd
commit
909dea471b
2 changed files with 24 additions and 28 deletions
|
@ -18,4 +18,4 @@ WORKDIR /app
|
||||||
|
|
||||||
COPY --from=build /project/target/spring-petclinic-${app_version}.jar /app/java-application.jar
|
COPY --from=build /project/target/spring-petclinic-${app_version}.jar /app/java-application.jar
|
||||||
|
|
||||||
ENTRYPOINT ["java", "-jar", "java-application.jar"]
|
ENTRYPOINT [ "java", "-Dspring.profiles.active=postgres", "-jar", "java-application.jar"]
|
||||||
|
|
50
compose.yaml
50
compose.yaml
|
@ -20,30 +20,26 @@ services:
|
||||||
# database data between container restarts. The `db-password` secret is used
|
# database data between container restarts. The `db-password` secret is used
|
||||||
# to set the database password. You must create `db/password.txt` and add
|
# to set the database password. You must create `db/password.txt` and add
|
||||||
# a password of your choosing to it before running `docker-compose up`.
|
# a password of your choosing to it before running `docker-compose up`.
|
||||||
# depends_on:
|
depends_on:
|
||||||
# db:
|
db:
|
||||||
# condition: service_healthy
|
condition: service_healthy
|
||||||
# db:
|
environment:
|
||||||
# image: postgres
|
- POSTGRES_URL=jdbc:postgresql://db:5432/petclinic
|
||||||
# restart: always
|
db:
|
||||||
# user: postgres
|
image: postgres
|
||||||
# secrets:
|
restart: always
|
||||||
# - db-password
|
volumes:
|
||||||
# volumes:
|
- db-data:/var/lib/postgresql/data
|
||||||
# - db-data:/var/lib/postgresql/data
|
environment:
|
||||||
# environment:
|
- POSTGRES_DB=petclinic
|
||||||
# - POSTGRES_DB=example
|
- POSTGRES_USER=petclinic
|
||||||
# - POSTGRES_PASSWORD_FILE=/run/secrets/db-password
|
- POSTGRES_PASSWORD=petclinic
|
||||||
# expose:
|
ports:
|
||||||
# - 5432
|
- 5432:5432
|
||||||
# healthcheck:
|
healthcheck:
|
||||||
# test: [ "CMD", "pg_isready" ]
|
test: [ "CMD", "pg_isready", "-U", "petclinic" ]
|
||||||
# interval: 10s
|
interval: 10s
|
||||||
# timeout: 5s
|
timeout: 5s
|
||||||
# retries: 5
|
retries: 5
|
||||||
# volumes:
|
volumes:
|
||||||
# db-data:
|
db-data:
|
||||||
# secrets:
|
|
||||||
# db-password:
|
|
||||||
# file: db/password.txt
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue