Add logback-spring.xml and remove override.yaml from code 64/124564/1
authorMukesh Paliwal <mukesh.paliwal1@huawei.com>
Wed, 29 Sep 2021 12:23:29 +0000 (17:53 +0530)
committerMukesh Paliwal <mukesh.paliwal1@huawei.com>
Wed, 29 Sep 2021 12:23:29 +0000 (17:53 +0530)
Issue-ID: SO-3765

Signed-off-by: Mukesh Paliwal <mukesh.paliwal1@huawei.com>
Change-Id: I001d0bea3341383d4da01d34b9ab31d7907f8b54

bpmn/mso-infrastructure-bpmn/src/main/java/org/onap/so/bpmn/infrastructure/MSOInfrastructureApplication.java
packages/docker/src/main/docker/docker-files/Dockerfile.so-bpmn-infra

index b39b13e..6900f30 100644 (file)
@@ -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;
index e618ff1..aa4f776 100644 (file)
@@ -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