Skip to content

Commit

Permalink
OPHYK-204 add Dockerfile to run service-provider
Browse files Browse the repository at this point in the history
  • Loading branch information
tokarls committed Oct 31, 2024
1 parent 61a239f commit 601d32d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions service-provider/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM maven:3.9.8-amazoncorretto-21 AS build

WORKDIR /app
COPY . .
RUN mvn clean package -DskipTests

FROM tomcat:9-jre21

WORKDIR /app
COPY config ./config
COPY --from=build /app/target/service-provider-app.war /usr/local/tomcat/webapps/

COPY --chmod=755 <<"EOF" /app/entrypoint.sh
#!/usr/bin/env bash
set -o errexit -o nounset -o pipefail

cp /app/config/${ENV}.properties /app/config/service-provider.properties
echo -n ${hakasp} > /app/config/hakasp.xml
echo -n ${keystore} | base64 --decode > /app/config/keystore.jks

cd $CATALINA_HOME/bin
./catalina.sh run
EOF

ENTRYPOINT ["/app/entrypoint.sh"]
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">

<context:property-placeholder
location="classpath:service-provider-app.properties, file:///${catalina.base:''}/../../../../config/local.properties"
location="file:///app/config/service-provider.properties, file:///${catalina.base:''}/../../../../config/local.properties"
ignore-resource-not-found="true"/>

<import resource="security/securityContext.xml"/>
Expand Down

0 comments on commit 601d32d

Please sign in to comment.