Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
James Babb committed Nov 22, 2017
0 parents commit 33ba909
Show file tree
Hide file tree
Showing 9 changed files with 2,670 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM tomcat:8.0.44-jre8
ENV JAVA_OPTS="-server -Xms256m -Xmx512m -Dmidpoint.home=/var/opt/midpoint/ -Djavax.net.ssl.trustStore=/var/opt/midpoint/keystore.jceks -Djavax.net.ssl.trustStoreType=jceks"

MAINTAINER info@evolveum.com

ENV version 3.6.1

RUN apt-get update \
&& apt-get -y install wget netcat mysql-client libmysql-java

RUN wget https://evolveum.com/downloads/midpoint/${version}/midpoint-${version}-dist.tar.bz2

RUN echo 'Extracting midPoint archive...' \
&& tar xjf midpoint-${version}-dist.tar.bz2 \
&& rm -f midpoint-${version}-dist.tar.bz2

RUN cp midpoint-${version}/war/midpoint.war /usr/local/tomcat/webapps \
&& rm -rf midpoint-${version}

COPY assets/server.xml assets/context.xml /usr/local/tomcat/conf/
COPY assets/config.xml assets/run-midpoint.sh /var/opt/midpoint/
COPY assets/mysql-3.7-all.sql /

CMD mkdir /midpoint_objects/
COPY assets/objects/ /midpoint_objects/

RUN ln -s /usr/share/java/mysql-connector-java.jar /usr/local/tomcat/lib/mysql-connector-java.jar

#TODO: Use an init system of some sort to avoid zombie processes left over from Tomcat
#TODO: https://github.com/krallin/tini/blob/master/README.md ?
CMD ["/var/opt/midpoint/run-midpoint.sh"]
65 changes: 65 additions & 0 deletions assets/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?xml version="1.0"?>
<!--
~ Copyright (c) 2010-2013 Evolveum
~
~ Licensed 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.
*** injected by build process - t1j **
-->
<configuration>
<midpoint>
<webApplication>
<importFolder>${midpoint.home}/import</importFolder>
</webApplication>
<repository>
<repositoryServiceFactoryClass>com.evolveum.midpoint.repo.sql.SqlRepositoryFactory</repositoryServiceFactoryClass>
<database>mysql</database>
<jdbcUsername>root</jdbcUsername>
<jdbcPassword>root</jdbcPassword>
<jdbcUrl>jdbc:mysql://midpoint-poc-mysql:3306/midpoint?characterEncoding=utf8&amp;autoReconnect=true&amp;useSSL=false</jdbcUrl>
</repository>
<audit>
<auditService>
<auditServiceFactoryClass>com.evolveum.midpoint.audit.impl.LoggerAuditServiceFactory</auditServiceFactoryClass>
</auditService>
<auditService>
<auditServiceFactoryClass>com.evolveum.midpoint.repo.sql.SqlAuditServiceFactory</auditServiceFactoryClass>
</auditService>
</audit>
<icf>
<scanClasspath>true</scanClasspath>
<scanDirectory>${midpoint.home}/icf-connectors</scanDirectory>
</icf>
<keystore>
<keyStorePath>${midpoint.home}/keystore.jceks</keyStorePath>
<keyStorePassword>changeit</keyStorePassword>
<encryptionKeyAlias>default</encryptionKeyAlias>
<!--
You can use smaller cipher key size for encryption. For:
AES_128 "http://www.w3.org/2001/04/xmlenc#aes128-cbc";
AES_256 "http://www.w3.org/2001/04/xmlenc#aes256-cbc";
AES_192 "http://www.w3.org/2001/04/xmlenc#aes192-cbc";
in element <xmlCipher></xmlCipher>
By default AES_128 is used. If you change key size, than
you must also create secret key in key store with proper key size and change encryptionKeyAlias.
To generate keystore with keytool use command:
keytool -genseckey -alias default -keystore keystore.jceks -storetype jceks -keyalg AES -keysize 128
secret key password is by default 'midpoint'
-->
</keystore>
<!-- <profilingEnabled>true</profilingEnabled> -->
</midpoint>
</configuration>
39 changes: 39 additions & 0 deletions assets/context.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version='1.0' encoding='utf-8'?>
<!--
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.
** injected by build process - t1j **
-->
<!-- The contents of this file will be loaded for each web application -->
<Context>

<!-- Default set of monitored resources. If one of these changes, the -->
<!-- web application will be reloaded. -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>

<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->

<!-- Uncomment this to enable Comet connection tacking (provides events
on session expiration as well as webapp lifecycle) -->
<!--
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
-->
</Context>
Loading

0 comments on commit 33ba909

Please sign in to comment.