Merge pull request #2 from bitnami/symlink-data-to-db
symlink `/bitnami/mongodb/data` -> `/opt/bitnami/mongodb/data/db`
This commit is contained in:
commit
5fb280b6bf
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 \
|
||||
|
|
|
|||
|
|
@ -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" ]]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue