Merge pull request #2 from bitnami/symlink-data-to-db

symlink `/bitnami/mongodb/data` -> `/opt/bitnami/mongodb/data/db`
This commit is contained in:
Adnan Abdulhussein 2016-03-29 13:15:08 -07:00
commit 5fb280b6bf
3 changed files with 3 additions and 4 deletions

View File

@ -15,7 +15,7 @@ RUN bitnami-pkg unpack $BITNAMI_APP_NAME-$BITNAMI_APP_VERSION
# these symlinks should be setup by harpoon at unpack
RUN mkdir -p $BITNAMI_APP_VOL_PREFIX && \
ln -s $BITNAMI_APP_DIR/data $BITNAMI_APP_VOL_PREFIX/data && \
ln -s $BITNAMI_APP_DIR/data/db $BITNAMI_APP_VOL_PREFIX/data && \
ln -s $BITNAMI_APP_DIR/conf $BITNAMI_APP_VOL_PREFIX/conf && \
ln -s $BITNAMI_APP_DIR/logs $BITNAMI_APP_VOL_PREFIX/logs

View File

@ -4,8 +4,7 @@ set -e
if [[ "$1" == "harpoon" && "$2" == "start" ]]; then
status=`harpoon inspect $BITNAMI_APP_NAME`
if [[ "$status" == *'"lifecycle": "unpacked"'* ]]; then
# HACK: harpoon initialize should create the db directory
mkdir -p $BITNAMI_APP_DIR/data/db
# fix ownership of `data/db` volume mount point
chown -R $BITNAMI_APP_USER:root $BITNAMI_APP_DIR/data/db
harpoon initialize $BITNAMI_APP_NAME \

View File

@ -91,7 +91,7 @@ cleanup_environment
container_create_with_host_volumes default -d
# files expected in data volume (subset)
run container_exec default ls -la $VOL_PREFIX/data/db/
run container_exec default ls -la $VOL_PREFIX/data/
[[ "$output" =~ "storage.bson" ]]
}