BAEL-5452 sample docker and docker compose files for the article. (#12115)

Co-authored-by: Yavuz Tas <ytas@vwd.com>
This commit is contained in:
Yavuz Tas
2022-05-23 22:01:34 +02:00
committed by GitHub
parent 59314162f0
commit c4b76701eb
4 changed files with 30 additions and 0 deletions
@@ -0,0 +1,11 @@
# To build and run docker-with-spring-profile:
#
# docker build -f src/main/docker/springprofile/Dockerfile --tag=docker-with-spring-profile:latest .
# docker run docker-with-spring-profile:latest
#
# To run with profiles:
# docker run -e "SPRING_PROFILES_ACTIVE=test1,test2,test3" docker-with-spring-profile:latest
FROM openjdk:11
COPY target/*.jar app.jar
ENTRYPOINT ["java", "-jar", "/app.jar"]
@@ -0,0 +1,6 @@
version: "3.5"
services:
docker-with-spring-profile:
image: docker-with-spring-profile:latest
environment:
- "SPRING_PROFILES_ACTIVE=prod"
@@ -0,0 +1,6 @@
version: "3.5"
services:
docker-with-spring-profile:
image: docker-with-spring-profile:latest
environment:
- "SPRING_PROFILES_ACTIVE=test"