| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,8 @@ | ||
| # this file is used to be able to set properties or override defaults from | ||
| # org/hippoecm/hst/site/container/SpringComponentManager.properties | ||
| # | ||
| # Properties which are environment (dev, test, acct, prod) specific should not be overriden here, but only properties | ||
| # which are the same regardless the environment | ||
| # | ||
| # Note that this file contains the overrides for the hst in the site webapp. | ||
| hst.configuration.rootPath = /hst:camelhippoevtdemo |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| FROM ${docker.brxm.base.image} | ||
|
|
||
| LABEL PROJECT=${project.artifactId} | ||
|
|
||
| # Default JVM heap size variables | ||
| ENV JAVA_MINHEAP 256m | ||
| ENV JAVA_MAXHEAP 512m | ||
|
|
||
| # Default tomcat http max threads variable | ||
| ENV TOMCAT_MAXTHREADS 200 | ||
|
|
||
| # Default repository settings | ||
| ENV REPO_PATH ${docker.brxm.project.path}/target/storage | ||
| ENV REPO_CONFIG "" | ||
| ENV REPO_BOOTSTRAP false | ||
| ENV REPO_AUTOEXPORT_ALLOWED false | ||
| ENV REPO_WORKSPACE_BUNDLE_CACHE 256 | ||
| ENV REPO_VERSIONING_BUNDLE_CACHE 64 | ||
|
|
||
| # Default database profile | ||
| ENV profile h2 | ||
|
|
||
| # Default mysql variables | ||
| ENV MYSQL_DB_HOST mysql | ||
| ENV MYSQL_DB_PORT 3306 | ||
| ENV MYSQL_DB_USER ${docker.db.username} | ||
| ENV MYSQL_DB_PASSWORD ${docker.db.password} | ||
| ENV MYSQL_DB_NAME ${docker.db.schema} | ||
| ENV MYSQL_DB_DRIVER com.mysql.cj.jdbc.Driver | ||
|
|
||
| # Default postgres variables | ||
| ENV POSTGRES_DB_HOST postgres | ||
| ENV POSTGRES_DB_PORT 5432 | ||
| ENV POSTGRES_DB_USER ${docker.db.username} | ||
| ENV POSTGRES_DB_PASSWORD ${docker.db.password} | ||
| ENV POSTGRES_DB_NAME ${docker.db.schema} | ||
| ENV POSTGRES_DB_DRIVER org.postgresql.Driver | ||
|
|
||
| # Provide LUCENE_INDEX_FILE_PATH to initialize the local lucene index with a stored copy | ||
|
|
||
| # Prepare dirs | ||
| # Delete default & unused war files | ||
| # Define a non-root user with limited permissions | ||
| # Non-root user should own tomcat & /brxm dirs | ||
| # Install unzip for the lucene index export | ||
| RUN mkdir -p \ | ||
| /brxm/bin \ | ||
| /usr/local/tomcat/common/classes \ | ||
| /usr/local/tomcat/shared/classes \ | ||
| && rm -rf \ | ||
| /usr/local/tomcat/webapps/docs \ | ||
| /usr/local/tomcat/webapps/examples \ | ||
| /usr/local/tomcat/webapps/host-manager \ | ||
| /usr/local/tomcat/webapps/manager \ | ||
| /usr/local/tomcat/webapps/ROOT \ | ||
| && addgroup --gid ${docker.brxm.container.gid} ${docker.brxm.container.username} \ | ||
| && adduser --gid ${docker.brxm.container.gid} --uid ${docker.brxm.container.uid} ${docker.brxm.container.username} \ | ||
| && chown -R ${docker.brxm.container.username} /usr/local/tomcat /brxm \ | ||
| && apt-get update && apt-get install -y unzip | ||
|
|
||
| USER ${docker.brxm.container.username} | ||
|
|
||
| # In maven/ the files as specified in the <assembly> section are stored and need to be added manually | ||
| # COPY in reverse order of expected change frequency, for optimal docker build caching | ||
| COPY --chown=${docker.brxm.container.uid}:${docker.brxm.container.gid} maven/common /usr/local/tomcat/common/ | ||
| COPY --chown=${docker.brxm.container.uid}:${docker.brxm.container.gid} maven/db-drivers /brxm/db-drivers | ||
| COPY --chown=${docker.brxm.container.uid}:${docker.brxm.container.gid} maven/scripts /brxm/bin | ||
| RUN chmod +x /brxm/bin/docker-entrypoint.sh | ||
|
|
||
| # Entrypoint script applies env-vars to config, then runs tomcat | ||
| ENTRYPOINT ["/brxm/bin/docker-entrypoint.sh"] | ||
|
|
||
| COPY --chown=${docker.brxm.container.uid}:${docker.brxm.container.gid} maven/conf /usr/local/tomcat/conf/ | ||
| COPY --chown=${docker.brxm.container.uid}:${docker.brxm.container.gid} maven/shared /usr/local/tomcat/shared/ | ||
| COPY --chown=${docker.brxm.container.uid}:${docker.brxm.container.gid} maven/webapps /usr/local/tomcat/webapps/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| FROM ${project.groupId}/${project.artifactId}:${project.version} | ||
|
|
||
| LABEL PROJECT=${project.artifactId}:dev-${project.version} | ||
|
|
||
| # Arguments used in setup-devuser.sh script file | ||
| ARG devusername=${docker.brxm.container.dev.username} | ||
| ARG devuid=${docker.brxm.container.dev.uid} | ||
| ARG devgid=${docker.brxm.container.dev.gid} | ||
|
|
||
| USER root | ||
|
|
||
| RUN chmod +x /brxm/bin/common/setup-devuser.sh | ||
| RUN /brxm/bin/common/setup-devuser.sh | ||
|
|
||
| USER ${docker.brxm.container.dev.uid} | ||
|
|
||
| COPY --chown=${docker.brxm.container.dev.uid}:${docker.brxm.container.dev.gid} maven/conf /usr/local/tomcat/conf/ | ||
| COPY --chown=${docker.brxm.container.dev.uid}:${docker.brxm.container.dev.gid} maven/webapps /usr/local/tomcat/webapps/ | ||
| COPY --chown=${docker.brxm.container.dev.uid}:${docker.brxm.container.dev.gid} maven/autoreload /usr/local/tomcat/shared/lib | ||
| ${docker.brxm.copy.dev.libs.cmd}COPY --chown=${docker.brxm.container.dev.uid}:${docker.brxm.container.dev.gid} maven/shared /usr/local/tomcat/shared/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| <component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2 http://maven.apache.org/xsd/component-1.1.2.xsd"> | ||
| <files> | ||
| <file> | ||
| <source>conf/log4j2-dev.xml</source> | ||
| <outputDirectory>conf</outputDirectory> | ||
| <destName>log4j2.xml</destName> | ||
| </file> | ||
| <file> | ||
| <source>conf/platform-dev.properties</source> | ||
| <outputDirectory>conf</outputDirectory> | ||
| <destName>platform.properties</destName> | ||
| </file> | ||
| <file> | ||
| <source>conf/hst-dev.properties</source> | ||
| <outputDirectory>conf</outputDirectory> | ||
| <destName>hst.properties</destName> | ||
| </file> | ||
| </files> | ||
| </component> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| <component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2 http://maven.apache.org/xsd/component-1.1.2.xsd"> | ||
| <files> | ||
| <file> | ||
| <source>conf/log4j2-docker.xml</source> | ||
| <outputDirectory>conf</outputDirectory> | ||
| <destName>log4j2.xml</destName> | ||
| </file> | ||
| <file> | ||
| <source>conf/context.xml</source> | ||
| <outputDirectory>conf</outputDirectory> | ||
| <destName>context-h2.xml</destName> | ||
| <filtered>false</filtered> | ||
| </file> | ||
| <file> | ||
| <source>conf/context-mysql.xml</source> | ||
| <outputDirectory>conf</outputDirectory> | ||
| <filtered>false</filtered> | ||
| </file> | ||
| <file> | ||
| <source>conf/repository-mysql.xml</source> | ||
| <outputDirectory>conf</outputDirectory> | ||
| <filtered>false</filtered> | ||
| </file> | ||
| <file> | ||
| <source>conf/context-postgres.xml</source> | ||
| <outputDirectory>conf</outputDirectory> | ||
| <filtered>false</filtered> | ||
| </file> | ||
| <file> | ||
| <source>conf/repository-postgres.xml</source> | ||
| <outputDirectory>conf</outputDirectory> | ||
| <filtered>false</filtered> | ||
| </file> | ||
| <file> | ||
| <source>conf/catalina-logging.properties</source> | ||
| <outputDirectory>conf</outputDirectory> | ||
| <destName>logging.properties</destName> | ||
| </file> | ||
| <file> | ||
| <source>conf/catalina.properties</source> | ||
| <outputDirectory>conf</outputDirectory> | ||
| <destName>catalina.properties</destName> | ||
| </file> | ||
| <file> | ||
| <source>conf/server.xml</source> | ||
| <outputDirectory>conf</outputDirectory> | ||
| <filtered>false</filtered> | ||
| </file> | ||
| </files> | ||
| </component> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> | ||
| <id>distribution-docker</id> | ||
| <formats> | ||
| <format>dir</format> | ||
| </formats> | ||
| <includeBaseDirectory>false</includeBaseDirectory> | ||
| <componentDescriptors> | ||
| <componentDescriptor>${project.basedir}/src/main/assembly/shared-lib-development-data-component.xml</componentDescriptor> | ||
| <componentDescriptor>${project.basedir}/src/main/docker/assembly/shared-lib-component-docker.xml</componentDescriptor> | ||
| <componentDescriptor>${project.basedir}/src/main/docker/assembly/conf-component-docker-dev.xml</componentDescriptor> | ||
| </componentDescriptors> | ||
| <dependencySets> | ||
| <dependencySet> | ||
| <unpack>true</unpack> | ||
| <outputDirectory>webapps/essentials</outputDirectory> | ||
| <useProjectArtifact>false</useProjectArtifact> | ||
| <scope>provided</scope> | ||
| <includes> | ||
| <include>${project.groupId}:${project.artifactId}-essentials</include> | ||
| </includes> | ||
| </dependencySet> | ||
| </dependencySets> | ||
| </assembly> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> | ||
| <id>distribution-docker</id> | ||
| <formats> | ||
| <format>dir</format> | ||
| </formats> | ||
| <includeBaseDirectory>false</includeBaseDirectory> | ||
| <componentDescriptors> | ||
| <componentDescriptor>${project.basedir}/src/main/assembly/common-lib-component.xml</componentDescriptor> | ||
| <componentDescriptor>${project.basedir}/src/main/assembly/shared-lib-component.xml</componentDescriptor> | ||
|
|
||
| <componentDescriptor>${project.basedir}/src/main/docker/assembly/conf-component-docker.xml</componentDescriptor> | ||
| <componentDescriptor>${project.basedir}/src/main/docker/assembly/webapps-component-docker.xml</componentDescriptor> | ||
| <componentDescriptor>${project.basedir}/src/main/docker/assembly/scripts-docker.xml</componentDescriptor> | ||
|
|
||
| <componentDescriptor>${project.basedir}/src/main/docker/assembly/docker-db-libs.xml</componentDescriptor> | ||
| </componentDescriptors> | ||
| </assembly> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| <component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2 http://maven.apache.org/xsd/component-1.1.2.xsd"> | ||
| <dependencySets> | ||
| <dependencySet> | ||
| <useProjectArtifact>false</useProjectArtifact> | ||
| <outputDirectory>db-drivers/postgres</outputDirectory> | ||
| <scope>provided</scope> | ||
| <includes> | ||
| <include>org.postgresql:postgresql</include> | ||
| </includes> | ||
| </dependencySet> | ||
| <dependencySet> | ||
| <useProjectArtifact>false</useProjectArtifact> | ||
| <outputDirectory>db-drivers/mysql</outputDirectory> | ||
| <scope>provided</scope> | ||
| <includes> | ||
| <include>mysql:mysql-connector-java</include> | ||
| </includes> | ||
| </dependencySet> | ||
| </dependencySets> | ||
| </component> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2 http://maven.apache.org/xsd/component-1.1.2.xsd"> | ||
| <files> | ||
| <file> | ||
| <source>repository-data/development/target/${artifactId}-repository-data-development-${dollar}{project.version}.jar</source> | ||
| <outputDirectory>hcm-dev</outputDirectory> | ||
| </file> | ||
| <file> | ||
| <source>repository-data/site-development/target/${artifactId}-repository-data-site-development-${dollar}{project.version}.jar</source> | ||
| <outputDirectory>hcm-dev</outputDirectory> | ||
| </file> | ||
| </files> | ||
| </component> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| <component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2 http://maven.apache.org/xsd/component-1.1.2.xsd"> | ||
|
|
||
| <fileSets> | ||
| <fileSet> | ||
| <directory>${project.basedir}/src/main/docker/scripts</directory> | ||
| <outputDirectory>scripts</outputDirectory> | ||
| </fileSet> | ||
| </fileSets> | ||
| </component> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| <component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2 http://maven.apache.org/xsd/component-1.1.2.xsd"> | ||
| <dependencySets> | ||
| <dependencySet> | ||
| <useProjectArtifact>false</useProjectArtifact> | ||
| <outputDirectory>autoreload</outputDirectory> | ||
| <scope>provided</scope> | ||
| <includes> | ||
| <include>org.onehippo.cms7:hippo-services-autoreload</include> | ||
| </includes> | ||
| </dependencySet> | ||
| </dependencySets> | ||
| </component> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| <component xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/component/1.1.2 http://maven.apache.org/xsd/component-1.1.2.xsd"> | ||
| <dependencySets> | ||
| <dependencySet> | ||
| <unpack>true</unpack> | ||
| <outputDirectory>webapps/cms</outputDirectory> | ||
| <useProjectArtifact>false</useProjectArtifact> | ||
| <scope>provided</scope> | ||
| <includes> | ||
| <include>${project.groupId}:${project.artifactId}-cms</include> | ||
| </includes> | ||
| </dependencySet> | ||
| <dependencySet> | ||
| <unpack>true</unpack> | ||
| <outputDirectory>webapps/site</outputDirectory> | ||
| <useProjectArtifact>false</useProjectArtifact> | ||
| <scope>provided</scope> | ||
| <includes> | ||
| <include>${project.groupId}:${project.artifactId}-webapp</include> | ||
| </includes> | ||
| </dependencySet> | ||
| </dependencySets> | ||
| </component> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e | ||
|
|
||
| if ! id -g $devgid >/dev/null 2>&1; then | ||
| addgroup --gid $devgid $devusername | ||
| chown -R :$devgid /usr/local/tomcat /brxm | ||
| fi | ||
|
|
||
| if ! id -u $devuid >/dev/null 2>&1; then | ||
| adduser --gid $devgid --uid $devuid $devusername | ||
| chown -R $devuid /usr/local/tomcat /brxm | ||
| fi |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e | ||
|
|
||
| # perform text replacements to apply environment vars properly to jackrabbit database configuration | ||
| source /brxm/bin/$profile/setup-db.sh | ||
|
|
||
| if [ "$profile" != "h2" ] | ||
| then | ||
| # initialize jackrabbit cluster node id by setting with an external value or with hostname. | ||
| repo_cluster_id=$REPO_CLUSTER_NODE_ID | ||
| if [ -z "$repo_cluster_id" ] | ||
| then | ||
| repo_cluster_id="$(hostname -f)" | ||
| fi | ||
| sed --in-place 's/@cluster.node.id@/'"$repo_cluster_id"'/' /usr/local/tomcat/conf/repository-$profile.xml | ||
|
|
||
| # set REPO_CONFIG variable if it is not set | ||
| repo_config=$REPO_CONFIG | ||
| if [ -z "$repo_config" ] | ||
| then | ||
| export REPO_CONFIG=file:/usr/local/tomcat/conf/repository-$profile.xml | ||
| fi | ||
| fi | ||
|
|
||
| # update tomcat http max threads variable | ||
| sed --in-place=.backup 's/@tomcat.max.threads@/'"$TOMCAT_MAXTHREADS"'/' /usr/local/tomcat/conf/server.xml | ||
|
|
||
| # use the appropriate database context info for the selected database type | ||
| cp /usr/local/tomcat/conf/context-$profile.xml /usr/local/tomcat/conf/context.xml | ||
|
|
||
| # copy setting environment variables script to the related tomcat folder | ||
| cp /brxm/bin/tomcat/setenv.sh /usr/local/tomcat/bin/setenv.sh | ||
|
|
||
| # Unzip the lucene index export if it exists | ||
| if [[ -e "${LUCENE_INDEX_FILE_PATH}" ]]; then | ||
| echo "Extracting the lucene index export zip..." | ||
| mkdir -p ${REPO_PATH}/workspaces/default/index/ | ||
| unzip ${LUCENE_INDEX_FILE_PATH} -d ${REPO_PATH}/workspaces/default/index/ | ||
| fi | ||
|
|
||
| # run tomcat | ||
| exec /usr/local/tomcat/bin/catalina.sh run |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| #No config patching is required |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e | ||
|
|
||
| sed --in-place=.backup 's/@mysql.host@/'"$MYSQL_DB_HOST"'/' /usr/local/tomcat/conf/context-$profile.xml | ||
| sed --in-place 's/@mysql.port@/'"$MYSQL_DB_PORT"'/' /usr/local/tomcat/conf/context-$profile.xml | ||
| sed --in-place 's/@mysql.username@/'"$MYSQL_DB_USER"'/' /usr/local/tomcat/conf/context-$profile.xml | ||
| sed --in-place 's/@mysql.password@/'"$MYSQL_DB_PASSWORD"'/' /usr/local/tomcat/conf/context-$profile.xml | ||
| sed --in-place 's/@mysql.repo.db@/'"$MYSQL_DB_NAME"'/' /usr/local/tomcat/conf/context-$profile.xml | ||
| sed --in-place 's/@mysql.driver@/'"$MYSQL_DB_DRIVER"'/' /usr/local/tomcat/conf/context-$profile.xml | ||
|
|
||
| sed --in-place=.backup 's/@mysql.repo.db@/'"$MYSQL_DB_NAME"'/' /usr/local/tomcat/conf/repository-$profile.xml | ||
| sed --in-place 's/@repo.workspace.bundle.cache@/'"$REPO_WORKSPACE_BUNDLE_CACHE"'/' /usr/local/tomcat/conf/repository-$profile.xml | ||
| sed --in-place 's/@repo.versioning.bundle.cache@/'"$REPO_VERSIONING_BUNDLE_CACHE"'/' /usr/local/tomcat/conf/repository-$profile.xml | ||
|
|
||
| #copy db driver to /usr/local/tomcat/common/lib | ||
| cp -R /brxm/db-drivers/$profile/. /usr/local/tomcat/common/lib/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e | ||
|
|
||
| sed --in-place=.backup 's/@postgres.host@/'"$POSTGRES_DB_HOST"'/' /usr/local/tomcat/conf/context-$profile.xml | ||
| sed --in-place 's/@postgres.port@/'"$POSTGRES_DB_PORT"'/' /usr/local/tomcat/conf/context-$profile.xml | ||
| sed --in-place 's/@postgres.username@/'"$POSTGRES_DB_USER"'/' /usr/local/tomcat/conf/context-$profile.xml | ||
| sed --in-place 's/@postgres.password@/'"$POSTGRES_DB_PASSWORD"'/' /usr/local/tomcat/conf/context-$profile.xml | ||
| sed --in-place 's/@postgres.repo.db@/'"$POSTGRES_DB_NAME"'/' /usr/local/tomcat/conf/context-$profile.xml | ||
| sed --in-place 's/@postgres.driver@/'"$POSTGRES_DB_DRIVER"'/' /usr/local/tomcat/conf/context-$profile.xml | ||
|
|
||
| sed --in-place=.backup 's/@postgres.repo.db@/'"$POSTGRES_DB_NAME"'/' /usr/local/tomcat/conf/repository-$profile.xml | ||
| sed --in-place 's/@repo.workspace.bundle.cache@/'"$REPO_WORKSPACE_BUNDLE_CACHE"'/' /usr/local/tomcat/conf/repository-$profile.xml | ||
| sed --in-place 's/@repo.versioning.bundle.cache@/'"$REPO_VERSIONING_BUNDLE_CACHE"'/' /usr/local/tomcat/conf/repository-$profile.xml | ||
|
|
||
| #copy db driver to /usr/local/tomcat/common/lib | ||
| cp -R /brxm/db-drivers/$profile/. /usr/local/tomcat/common/lib/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| #!/bin/sh | ||
|
|
||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # | ||
| # ${CATALINA_BASE}/bin/setenv.sh | ||
| # | ||
| # This script is executed automatically by ${catalina.base}/catalina.sh. | ||
| # | ||
|
|
||
| # Repository configurations | ||
| REP_OPTS="-Drepo.path=${REPO_PATH} -Drepo.bootstrap=${REPO_BOOTSTRAP} -Drepo.config=${REPO_CONFIG} -Drepo.autoexport.allowed=${REPO_AUTOEXPORT_ALLOWED}" | ||
|
|
||
| # Logging configurations | ||
| L4J_OPTS="-Dlog4j.configurationFile=file://${CATALINA_HOME}/conf/log4j2.xml -DLog4jContextSelector=org.apache.logging.log4j.core.selector.BasicContextSelector" | ||
|
|
||
| # JVM heap size options | ||
| JVM_OPTS="-server -Xms${JAVA_MINHEAP} -Xmx${JAVA_MAXHEAP} -XX:+UseG1GC -Djava.util.Arrays.useLegacyMergeSort=true" | ||
|
|
||
| # JVM garbage Collector options | ||
| VGC_OPTS="-verbosegc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:${CATALINA_HOME}/logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2048k" | ||
|
|
||
| # JVM heapdump options | ||
| DMP_OPTS="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${CATALINA_HOME}/temp" | ||
|
|
||
| CATALINA_OPTS="${JVM_OPTS} ${VGC_OPTS} ${REP_OPTS} ${DMP_OPTS} ${L4J_OPTS}" |