Skip to content

Commit

Permalink
Merge pull request #81 from RoBobik/fix-docker-entrypoint
Browse files Browse the repository at this point in the history
Fix Docker entrypoint not finding existing instance data
  • Loading branch information
pavelhoral authored Jun 1, 2023
2 parents ecd3969 + 128522f commit b9af647
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions .docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/bash -e
#!/bin/bash -eu

if [ ! -d $INSTANCE_DIR/config ]; then
# This file is created during Docker build and should always be present
INSTANCE_DIR="$(</opt/wrends/instance.loc)"

if [ ! -d "$INSTANCE_DIR/config" ]; then
source ./bootstrap/setup.sh
echo "First start..."
first_start
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ ENV PATH="${PATH}:/opt/wrends/bin"
# Prepare Wren:DS instance directory
ARG INSTANCE_DIR="/opt/wrends/instance"
RUN echo ${INSTANCE_DIR} > /opt/wrends/instance.loc
RUN mkdir -p ${INSTANCE_DIR} ${INSTANCE_DIR}/lib/extension
RUN mkdir -p ${INSTANCE_DIR} ${INSTANCE_DIR}/lib/extensions
VOLUME ${INSTANCE_DIR}

EXPOSE ${LDAP_PORT} ${LDAPS_PORT} ${ADMIN_CONNECTOR_PORT}
Expand Down

0 comments on commit b9af647

Please sign in to comment.