Skip to content
Snippets Groups Projects
Commit 0c458dba authored by Erik Hedenström's avatar Erik Hedenström
Browse files

Fixed docs. Added support for directory overlays.

parent 9659f048
No related branches found
No related tags found
No related merge requests found
......@@ -30,8 +30,10 @@ RUN \
# Import self-signed cert as trusted CA
RUN \
openssl s_client -servername cert.codemate.se -connect codemate.se:443 </dev/null | sed -ne '/--BEGIN CERTIFICATE--/,/--END CERTIFICATE--/p' > /tmp/codemate.cert && \
keytool -import -noprompt -trustcacerts -keystore /usr/lib/jvm/java-7-oracle/jre/lib/security/cacerts -storepass changeit -noprompt -alias codemate-self-signed -file /tmp/codemate.cert
mkdir -p /usr/share/ca-certificates/extra && \
openssl s_client -servername cert.codemate.se -connect codemate.se:443 </dev/null | sed -ne '/--BEGIN CERTIFICATE--/,/--END CERTIFICATE--/p' > /usr/share/ca-certificates/extra/codemate.crt && \
update-ca-certificates && \
keytool -import -noprompt -trustcacerts -keystore /usr/lib/jvm/java-7-oracle/jre/lib/security/cacerts -storepass changeit -noprompt -alias codemate-self-signed -file /usr/share/ca-certificates/extra/codemate.crt
# Install and configure Exim
RUN \
......
......@@ -54,13 +54,20 @@ docker run -e CROWD_VERSION=2.7.2 -d registry.codemate.se/crowd
### Overriding Crowd files
By providing an environment variable name `CROWD_OVERLAY` that points to a gzipped tar file you can apply an overlay on the Crowd installation. This tarball will be unzipped and extracted in the root of the Crowd installation directory. The overlay enables you to add custom crowd configurations such as SSL or Crowd integration.
By providing an environment variable name `CROWD_OVERLAY` that points to a directory or URL of a gzipped tar file you can apply an overlay on the Crowd installation. A directory will be recursively copied, and a tarball will be unzipped and extracted in the root of the Crowd installation directory. The overlay enables you to add custom Crowd configurations.
```
docker run -e CROWD_OVERLAY=http://10.0.0.1/crowd-config.tgz -d registry.codemate.se/crowd
docker run -e CROWD_OVERLAY=/tmp/crowd-config -d registry.codemate.se/crowd
```
The overlay is fetched using curl so if you need to provide basic auth credentials simply prefix the url with the credentials, for example:
The overlay is fetched using curl so file URLs are valid:
```
CROWD_OVERLAY="file:///tmp/crowd-config.tgz"
```
If you need to provide basic auth credentials simply prefix the url with the credentials, for example:
```
CROWD_OVERLAY="-u username:password http://10.0.0.1/crowd-config.tgz"
......@@ -74,7 +81,7 @@ By providing an environment variable name `MYSQL_INIT` that points to an SQL scr
docker run -e MYSQL_INIT=http://10.0.0.1/crowd-init.sql -d registry.codemate.se/crowd
```
Basic auth credentials can be used as mentioned in the Crowd overlay section.
Basic auth credentials and file URLs can be used as mentioned in the overlay section.
### Combined options
......@@ -88,7 +95,6 @@ docker run \
-e CROWD_OVERLAY=http://10.0.0.1/crowd-config.tgz \
-v /opt/application-data/crowd:/home/crowd \
-p 8095:8095 \
-p 8096:8096 \
-d registry.codemate.se/crowd
```
......
......@@ -2,20 +2,19 @@
set -e # Exit on errors
SEPARATOR="-------------------------------------------------------------------------------"
CROWD_DIR=/opt/atlassian-crowd-$CROWD_VERSION
MYSQL_DIR=$CROWD_HOME/mysql-data
if [ ! -d $CROWD_DIR ]; then
curl -s -v -L http://www.atlassian.com/software/crowd/downloads/binary/atlassian-crowd-$CROWD_VERSION.tar.gz | tar xzf - -C /opt
curl -s -v -L -o $CROWD_DIR/apache-tomcat/lib/mysql-connector-java-5.1.31.jar http://repo1.maven.org/maven2/mysql/mysql-connector-java/5.1.31/mysql-connector-java-5.1.31.jar
echo "$SEPARATOR"
echo "crowd.home=$CROWD_HOME" > $CROWD_DIR/crowd-webapp/WEB-INF/classes/crowd-init.properties
fi
if [ ${CROWD_OVERLAY:+x} ] && [ -d $CROWD_DIR ]; then
if [ -d $CROWD_OVERLAY ]; then
cp -R $CROWD_OVERLAY/* $CROWD_DIR
else
curl -s -v -L $CROWD_OVERLAY | tar xzf - -C $CROWD_DIR
echo "$SEPARATOR"
fi
fi
chown -R root:root $CROWD_DIR
......@@ -31,7 +30,6 @@ if [ ! -d $MYSQL_DIR ]; then
mysql_install_db
mysqld_safe &
sleep 5s
echo "$SEPARATOR"
else
mysqld_safe &
sleep 5s
......@@ -39,11 +37,9 @@ fi
if [ ${MYSQL_INIT:+x} ] && [ -d $MYSQL_DIR ]; then
curl -s -v -L $MYSQL_INIT | mysql
echo "$SEPARATOR"
fi
env | sort
echo "$SEPARATOR"
exim4 -v -bdf -q15m &
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment