Add gcube-data creation and move eXist's DB to NFS if the instance is a collector
This commit is contained in:
parent
52f76845a2
commit
130f02afbf
|
@ -39,6 +39,7 @@ RUN chmod 755 /home/gcube/gCore/bin/gcore-start-container
|
|||
# RUN /home/gcube/gCore/bin/gcore-undeploy-service org.gcube.common.searchservice.resultsetservice
|
||||
RUN /home/gcube/gCore/bin/gcore-undeploy-service resultsetservice-3.1.0-4.16.0-126939
|
||||
EXPOSE 8080
|
||||
RUN mkdir /gcube-data && chown gcube.nogroup /gcube-data
|
||||
USER gcube
|
||||
ENTRYPOINT exec /home/gcube/gCore/bin/gcore-start-container
|
||||
# For Spring-Boot project, use the entrypoint below to reduce Tomcat startup time.
|
||||
|
|
|
@ -1,4 +1,23 @@
|
|||
#! /bin/sh
|
||||
#! /bin/bash
|
||||
|
||||
|
||||
if [ -n "$EXIST_HOME" ]; then
|
||||
# our container is running a IS Collector
|
||||
if [ -L "$EXIST_HOME/webapp/WEB-INF/data" ] ; then
|
||||
# exist data has been already mounted on NFS
|
||||
echo "eXist data should be already in place on NFS"
|
||||
elif [ -d "$EXIST_HOME/webapp/WEB-INF/data" ] ; then
|
||||
echo "First run: set up our directory structure on the NFS mountpoint"
|
||||
mkdir -p /gcube-data/{db,backup}
|
||||
mv $EXIST_HOME/webapp/WEB-INF/{data,logs,attachments} /gcube-data/db
|
||||
for dir in {data,logs,attachments}; do
|
||||
ln -s /gcube-data/db/${dir} $EXIST_HOME/webapp/WEB-INF/${dir}
|
||||
done
|
||||
else
|
||||
echo "Not a link, not a directory: a pony :-)?"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
if [ -z "$GLOBUS_LOCATION" ]
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue