diff options
author | Mukesh Paliwal <mukesh.paliwal1@huawei.com> | 2021-09-29 17:53:29 +0530 |
---|---|---|
committer | Mukesh Paliwal <mukesh.paliwal1@huawei.com> | 2021-09-29 17:53:29 +0530 |
commit | f6df60ad420d9877ecd6f0338549848ab1a0e001 (patch) | |
tree | 11fb91de896bbb3198ff520f6d3214c7eeb8b411 | |
parent | d2f707ab5335dae2fab48d80adbd12731ad7e06e (diff) |
Add logback-spring.xml and remove override.yaml from code
Issue-ID: SO-3765
Signed-off-by: Mukesh Paliwal <mukesh.paliwal1@huawei.com>
Change-Id: I001d0bea3341383d4da01d34b9ab31d7907f8b54
2 files changed, 10 insertions, 7 deletions
diff --git a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java index b39b13e609..6900f3099d 100644 --- a/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java +++ b/bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java @@ -70,14 +70,12 @@ import static org.springframework.boot.context.config.ConfigFileApplicationListe @EnableAutoConfiguration(exclude= FreeMarkerAutoConfiguration.class) public class MSOInfrastructureApplication extends SpringBootServletInitializer { - private static final String ADDITIONAL_CONFIG = "file:/camunda/app/config/override.yaml"; private static final Logger logger = LoggerFactory.getLogger(MSOInfrastructureApplication.class); @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application - .sources(MSOInfrastructureApplication.class) - .properties(singletonMap(CONFIG_ADDITIONAL_LOCATION_PROPERTY, ADDITIONAL_CONFIG)); + .sources(MSOInfrastructureApplication.class); } @Autowired private ProcessEngine processEngine; diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.so-bpmn-infra b/packages/docker/src/main/docker/docker-files/Dockerfile.so-bpmn-infra index e618ff15f5..aa4f776758 100644 --- a/packages/docker/src/main/docker/docker-files/Dockerfile.so-bpmn-infra +++ b/packages/docker/src/main/docker/docker-files/Dockerfile.so-bpmn-infra @@ -4,6 +4,7 @@ ARG user=so ARG group=so RUN echo "org.apache.tomcat.util.digester.PROPERTY_SOURCE=org.apache.tomcat.util.digester.EnvironmentPropertySource" >> /camunda/conf/catalina.properties +RUN echo $'JAVA_OPTS="$JAVA_OPTS -Dlogs_dir=logs/bpmn -Dspring.config.additional-location=$CATALINA_BASE/config/override.yaml -Dlogging.config=$CATALINA_BASE/logback-spring.xml"' >> /camunda/bin/setenv.sh RUN rm -r /camunda/webapps/examples /camunda/webapps/docs /camunda/webapps/camunda-invoice @@ -11,6 +12,12 @@ USER root COPY ca-certificates/onap-ca.crt /usr/local/share/ca-certificates/onap-ca.crt RUN update-ca-certificates --fresh +COPY configs/logging/logback-spring.xml /camunda +COPY maven/mso.war /camunda/webapps +COPY scripts/wait-for.sh /camunda +COPY scripts/bpmn-script/start-camunda-app.sh /camunda +COPY maven/mariadb-java-client.jar /camunda/lib + RUN addgroup $group && adduser --system --disabled-password --no-create-home --ingroup $group $user && \ chown -R $user:$group /camunda && \ chmod -R u+rw /camunda @@ -20,7 +27,5 @@ USER $user # Springboot configuration (required) VOLUME /camunda/app/config -COPY maven/mso.war /camunda/webapps -COPY scripts/wait-for.sh /camunda -COPY scripts/bpmn-script/start-camunda-app.sh /camunda -COPY maven/mariadb-java-client.jar /camunda/lib
\ No newline at end of file +WORKDIR /camunda +ENTRYPOINT ["/camunda/start-camunda-app.sh"]
\ No newline at end of file |