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:
parent
59314162f0
commit
c4b76701eb
@ -42,6 +42,13 @@
|
|||||||
<configuration>${project.basedir}/src/layers.xml</configuration>
|
<configuration>${project.basedir}/src/layers.xml</configuration>
|
||||||
</layers>
|
</layers>
|
||||||
</configuration>
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<goals>
|
||||||
|
<goal>repackage</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
@ -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"
|
Loading…
x
Reference in New Issue
Block a user