Skip to content

Commit

Permalink
Adjusted volume mappings for environments and profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-huber committed Feb 3, 2017
1 parent 5e9b09d commit a836dae
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ RUN apk --no-cache add ca-certificates wget \
&& rm *.apk \
&& rm /inspectit-cmr.linux.x64.zip \
&& cp -ar /CMR/config /CMR/config.orig \
&& cp -ar /CMR/ci /CMR/ci.orig
&& mkdir -p /CMR/custom/profiles \
&& mkdir -p /CMR/custom/environments

WORKDIR /CMR

VOLUME ["/CMR/config", "/CMR/db", "/CMR/storage", "/CMR/ci"]
VOLUME ["/CMR/config", "/CMR/db", "/CMR/storage", "/CMR/custom/profiles", "/CMR/custom/environments"]

EXPOSE 8182 9070

Expand Down
1 change: 1 addition & 0 deletions TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
README Updaten
21 changes: 18 additions & 3 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,24 @@ if [ -z "$(ls /CMR/config)" ];then
cp -ra /CMR/config.orig/* /CMR/config/
fi

if [ -z "$(ls /CMR/ci)" ];then
# Copying original ci folder. This is due mounting the ci folder to an empty directory with docker `-v` parameter. Fixing issue #2
cp -ra /CMR/ci.orig/* /CMR/ci/
# cleanUp previously created symlinks
find /CMR/ci/profiles -type l -delete
if [ -d "/CMR/ci/environments" ]; then
find /CMR/ci/environments -type l -delete
fi

if [ "$(ls /CMR/custom/profiles)" ];then
# Create symlinks in /CMR/ci/profiles folder
ln -s /CMR/custom/profiles/* /CMR/ci/profiles
echo "$(ls -la /CMR/ci/profiles/)"
fi

if [ "$(ls /CMR/custom/environments)" ];then
# Create the folder /CMR/ci/environments as it is non-existing at this point
mkdir -p /CMR/ci/environments

# Create symlinks in /CMR/ci/environments folder
ln -s /CMR/custom/environments/* /CMR/ci/environments
fi

exec sh startup.sh
Expand Down

0 comments on commit a836dae

Please sign in to comment.