Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions opendj-packages/opendj-docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ ENV ROOT_PASSWORD=${ROOT_PASSWORD:-"password"}

ENV SECRET_VOLUME=${SECRET_VOLUME}

ENV OPENDJ_SSL_OPTIONS=${SSL_OPTIONS:-"--generateSelfSignedCertificate"}

ENV MASTER_SERVER=${MASTER_SERVER}

ENV OPENDJ_REPLICATION_TYPE=${OPENDJ_REPLICATION_TYPE}
Expand Down
1 change: 1 addition & 0 deletions opendj-packages/opendj-docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ docker run -d -p 1389:1389 -p 1636:1636 -p 4444:4444 --name opendj openidentityp
|VERSION|4.3.1|OpenDJ version|
|OPENDJ_USER|-|user which runs OpenDJ|
|OPENDJ_REPLICATION_TYPE|-|OpenDJ Replication type, valid values are: <ul><li>simple - standart replication</li><li>srs - standalone replication servers</li><li>sdsr - Standalone Directory Server Replicas</li><li>rg - Replication Groups</li></ul>Other values will be ignored|
|OPENDJ_SSL_OPTIONS|--generateSelfSignedCertificate|you can replace ssl options at here, like : "--usePkcs12keyStore /opt/domain.pfx --keyStorePassword domain"
9 changes: 5 additions & 4 deletions opendj-packages/opendj-docker/bootstrap/replicate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# If the service is called

MYHOSTNAME=${MYHOSTNAME:-`hostname -f`}
export PATH=/opt/opendj/bin:$PATH

echo "Setting up replication from $MYHOSTNAME to $MASTER_SERVER"

Expand All @@ -28,7 +29,7 @@ echo "Will sleep for a bit to ensure master is up"

sleep 5

if [ "$OPENDJ_REPLICATION_TYPE" == "simple" ] then
if [ "$OPENDJ_REPLICATION_TYPE" == "simple" ]; then
echo "Enabling Standart Replication..."
/opt/opendj/bin/dsreplication enable --host1 $MYHOSTNAME --port1 4444 \
--bindDN1 "$ROOT_USER_DN" \
Expand All @@ -44,7 +45,7 @@ if [ "$OPENDJ_REPLICATION_TYPE" == "simple" ] then
--hostSource $MYHOSTNAME --portSource 4444 \
--hostDestination $MASTER_SERVER --portDestination 4444 -X -n

elif [ "$OPENDJ_REPLICATION_TYPE" == "srs" ] then
elif [ "$OPENDJ_REPLICATION_TYPE" == "srs" ]; then
echo "Enabling Standalone Replication Servers..."
dsreplication enable \
--adminUID admin \
Expand Down Expand Up @@ -76,7 +77,7 @@ elif [ "$OPENDJ_REPLICATION_TYPE" == "srs" ] then
--trustAll \
--no-prompt

elif [ "$OPENDJ_REPLICATION_TYPE" == "sdsr" ] then
elif [ "$OPENDJ_REPLICATION_TYPE" == "sdsr" ]; then
echo "Enabling Standalone Directory Server Replicas...."
dsreplication \
enable \
Expand Down Expand Up @@ -109,7 +110,7 @@ elif [ "$OPENDJ_REPLICATION_TYPE" == "sdsr" ] then
--trustAll \
--no-prompt

elif [ "$OPENDJ_REPLICATION_TYPE" == "rg" ] then
elif [ "$OPENDJ_REPLICATION_TYPE" == "rg" ]; then
echo "Enabling Replication Groups..."

dsconfig \
Expand Down
2 changes: 1 addition & 1 deletion opendj-packages/opendj-docker/bootstrap/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ echo "Setting up default OpenDJ instance"

# If any optional LDIF files are present load them

/opt/opendj/setup --cli -p $PORT --ldapsPort $LDAPS_PORT --enableStartTLS --generateSelfSignedCertificate \
/opt/opendj/setup --cli -p $PORT --ldapsPort $LDAPS_PORT --enableStartTLS $OPENDJ_SSL_OPTIONS \
--baseDN $BASE_DN -h localhost --rootUserDN "$ROOT_USER_DN" --rootUserPassword "$ROOT_PASSWORD" \
--acceptLicense --no-prompt $ADD_BASE_ENTRY #--sampleData 1

Expand Down