From 0ec0362b1291722a7e55b4716d80c2687f1a35ab Mon Sep 17 00:00:00 2001 From: Jim Van Fleet Date: Mon, 5 Sep 2016 13:20:40 -0400 Subject: [PATCH] I got this running and creating the database + schema --- Dockerfile | 20 ++++++------- conf/grouper.hibernate.properties | 49 ------------------------------- conf/grouper.installer.properties | 36 ----------------------- docker-compose.yml | 4 +-- 4 files changed, 11 insertions(+), 98 deletions(-) delete mode 100644 conf/grouper.hibernate.properties delete mode 100644 conf/grouper.installer.properties diff --git a/Dockerfile b/Dockerfile index 44aa916..1a09815 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM bigfleet/grouper ARG maintainer=my ARG imagename=grouper -ARG version=2.3.0 +ARG version=$version LABEL Version=$version ENV VERSION=$version @@ -15,14 +15,12 @@ ENV MYSQL_PASSWORD=3cf0ccc7d6b240390188367933c9cd90 ENV GROUPER_SYSTEM_PASSWORD=3cf0ccc7d6b240390188367933c9cd90 ENV MYSQL_HOST=mariadb -ADD ./container_files /opt -COPY conf/grouper.hibernate.properties /opt/grouper/$version +ADD container_files /opt +RUN rm /opt/grouper/$version/grouper.apiBinary-$version/conf/grouper.hibernate.properties && \ + ln -s /opt/etc/grouper.hibernate.properties /opt/grouper/$version/grouper.apiBinary-$version/conf/grouper.hibernate.properties && \ + rm /opt/grouper/$version/grouper.ws-$version/grouper-ws/build/dist/grouper-ws/WEB-INF/classes/grouper.hibernate.properties && \ + ln -s /opt/etc/grouper.hibernate.properties /opt/grouper/$version/grouper.ws-$version/grouper-ws/build/dist/grouper-ws/WEB-INF/classes/grouper.hibernate.properties && \ + rm /opt/grouper/$version/grouper.ui-$version/dist/grouper/WEB-INF/classes/grouper.hibernate.properties && \ + ln -s /opt/etc/grouper.hibernate.properties /opt/grouper/$version/grouper.ui-$version/dist/grouper/WEB-INF/classes/grouper.hibernate.properties -RUN rm /opt/grouper/2.3.0/grouper.apiBinary-2.3.0/conf/grouper.hibernate.properties && \ - ln -s /opt/grouper/$version/grouper.hibernate.properties /opt/grouper/2.3.0/grouper.apiBinary-2.3.0/conf/grouper.hibernate.properties && \ - rm /opt/grouper/2.3.0/grouper.ws-2.3.0/grouper-ws/build/dist/grouper-ws/WEB-INF/classes/grouper.hibernate.properties && \ - ln -s /opt/grouper/$version/grouper.hibernate.properties /opt/grouper/2.3.0/grouper.ws-2.3.0/grouper-ws/build/dist/grouper-ws/WEB-INF/classes/grouper.hibernate.properties && \ - rm /opt/grouper/2.3.0/grouper.ui-2.3.0/dist/grouper/WEB-INF/classes/grouper.hibernate.properties && \ - ln -s /opt/grouper/$version/grouper.hibernate.properties /opt/grouper/2.3.0/grouper.ui-2.3.0/dist/grouper/WEB-INF/classes/grouper.hibernate.properties - -#VOLUME /opt/grouper/2.3.0/apache-tomcat-$TOMCAT_VERSION/logs \ No newline at end of file +#VOLUME /opt/grouper/$version/apache-tomcat-$TOMCAT_VERSION/logs \ No newline at end of file diff --git a/conf/grouper.hibernate.properties b/conf/grouper.hibernate.properties deleted file mode 100644 index a198ae7..0000000 --- a/conf/grouper.hibernate.properties +++ /dev/null @@ -1,49 +0,0 @@ -# -# Copyright 2014 Internet2 -# -# 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. -# - -# -# Grouper Hibernate Configuration -# $Id: grouper.hibernate.example.properties,v 1.9 2009-08-11 20:18:09 mchyzer Exp $ -# - -# The grouper hibernate config uses Grouper Configuration Overlays (documented on wiki) -# By default the configuration is read from grouper.hibernate.base.properties -# (which should not be edited), and the grouper.hibernate.properties overlays -# the base settings. See the grouper.hibernate.base.properties for the possible -# settings that can be applied to the grouper.hibernate.properties - -######################################## -## DB settings -######################################## - -# e.g. mysql: jdbc:mysql://localhost:3306/grouper -# e.g. p6spy (log sql): [use the URL that your DB requires] -# e.g. oracle: jdbc:oracle:thin:@server.school.edu:1521:sid -# e.g. hsqldb (a): jdbc:hsqldb:dist/run/grouper;create=true -# e.g. hsqldb (b): jdbc:hsqldb:hsql://localhost:9001/grouper -# e.g. postgres: jdbc:postgresql://localhost:5432/database -# e.g. mssql: jdbc:sqlserver://localhost:3280;databaseName=grouper -hibernate.connection.url = jdbc:mysql://#MYSQL_HOST#:3306/#MYSQL_DATABASE# - -hibernate.connection.username = #MYSQL_USER# -# If you are using an empty password, depending upon your version of -# Java and Ant you may need to specify a password of "". -# Note: you can keep passwords external and encrypted: https://bugs.internet2.edu/jira/browse/GRP-122 -hibernate.connection.password = #MYSQL_PASSWORD# - - -hibernate.dialect = org.hibernate.dialect.MySQL5Dialect -hibernate.connection.driver_class = com.mysql.jdbc.Driver \ No newline at end of file diff --git a/conf/grouper.installer.properties b/conf/grouper.installer.properties deleted file mode 100644 index 1f4b266..0000000 --- a/conf/grouper.installer.properties +++ /dev/null @@ -1,36 +0,0 @@ -# this should be before the version number -download.server.url = http://software.internet2.edu/grouper -# default version to install -grouper.version = 2.3.0 -# print out autorun keys in prompts so you can easily see how to configure the autorun -grouperInstaller.print.autorunKeys = true -# default to install or upgrade (default is install) -grouperInstaller.default.installOrUpgrade = install -# where to get grouper source from, the variable $BRANCH_NAME$ will be substituted for the branch -download.source.url = https://github.com/Internet2/grouper/archive/$BRANCH_NAME$.zip -# where to get grouper psp source from, the variable $BRANCH_NAME$ will be substituted for the branch -download.pspSource.url = https://github.com/Internet2/grouper-psp/archive/$BRANCH_NAME$.zip -############################## -## Autorun properties -## -## If you uncomment one of these properties it will be used as empty, only uncomment to use -## -############################## -#### set this to true to try to use defaults for everything. Only things without default values will need to be set -grouperInstaller.autorun.useDefaultsAsMuchAsAvailable = true -########## AUTORUN PROPERTIES WITH NO DEFAULT OR ARE COMMONLY CHANGED -## Note: not all of them need to be filled out for all operations -# autorun grouper system password (its not secure to have a plain text pass in a config file) -grouperInstaller.autorun.grouperSystemPassword = #GROUPER_SYSTEM_PASSWORD# -# autorun Enter the database URL -grouperInstaller.autorun.dbUrl = jdbc:mysql://#MYSQL_HOST#:3306/grouper -# autorun database user -grouperInstaller.autorun.dbUser = #MYSQL_USER# -# autorun database pass (note, it is not good security to have plaintext passwords in text config files) -grouperInstaller.autorun.dbPass = #MYSQL_PASSWORD# -# autorun Do you want to init the database (delete all existing grouper tables, add new ones) (t|f)? -grouperInstaller.autorun.deleteAndInitDatabase = t -# autorun What is the location of your tomcat server.xml for the UI? -# Note, if you dont use tomcat just leave it blank or type 'blank': -grouperInstaller.autorun.locationOfTomcatServerXml = /opt/grouper/2.3.0/apache-tomcat-6.0.35/conf/server.xml - diff --git a/docker-compose.yml b/docker-compose.yml index fe890ae..714b81c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -14,7 +14,7 @@ services: - NET_ADMIN - SYS_ADMIN volumes: - - mysql:/var/lib/mysqlmounted + - grouper_mysql:/var/lib/mysqlmounted env_file: - conf/common.env - conf/db.env @@ -45,5 +45,5 @@ networks: driver: bridge volumes: - mysql: + grouper_mysql: driver: local \ No newline at end of file