Compare commits

..

2 Commits

Author SHA1 Message Date
7812c5f6e6 change linking of config in worker mode
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-08 16:12:13 +00:00
cb8f69cca7 tidy up more files 2023-07-08 16:11:55 +00:00
2 changed files with 17 additions and 9 deletions

View File

@ -44,7 +44,7 @@ RUN mkdir /app/cronicle && \
cd /app/cronicle && \ cd /app/cronicle && \
wget https://github.com/cronicle-edge/cronicle-edge/archive/refs/tags/v${CRONICLE_EDGE_VERSION}.tar.gz && \ wget https://github.com/cronicle-edge/cronicle-edge/archive/refs/tags/v${CRONICLE_EDGE_VERSION}.tar.gz && \
tar -xf v${CRONICLE_EDGE_VERSION}.tar.gz --strip-components 1 && \ tar -xf v${CRONICLE_EDGE_VERSION}.tar.gz --strip-components 1 && \
rm -rf Docker* .gitignore Readme.md .vscode && \ rm -rf Docker* .gitignore Readme.md .vscode sample_conf/examples/backup sample_conf/examples/docker.sh && \
rm -rf v${CRONICLE_EDGE_VERSION}.tar.gz rm -rf v${CRONICLE_EDGE_VERSION}.tar.gz
WORKDIR /app/cronicle WORKDIR /app/cronicle

View File

@ -98,26 +98,34 @@ then
echo "Cronicle is running in 'worker' mode." echo "Cronicle is running in 'worker' mode."
#Copying config directory to /config/cronicle/conf if not already there, then linking back into Cronicle
if [ ! -f /config/cronicle/conf/config.json ] if [ ! -f /config/cronicle/conf/config.json ]
then then
echo "No config found. Copy config.json from the manager server and place it in /config/cronicle/conf dir." echo "No config found. Copy config.json from the manager server and place it in /config/cronicle/conf dir."
echo "Don't forget to also copy the SSL certs if you're using SSL." cp -r /app/cronicle/conf /config/cronicle/conf
rm -rf /config/cronicle/conf/config.json
mkdir -p /config/cronicle/conf rm -rf /app/cronicle/conf
exit 0 ln -s /config/cronicle/conf /app/cronicle/conf
echo ''
echo ''
echo '*************************************'
exit 1
else else
#Removing default config.json and linking provided one back into Cronicle echo "Config is present."
rm -rf /app/cronicle/conf/config.json echo "Linking persistent config dir back into Cronicle."
ln -s /config/cronicle/conf/config.json /app/cronicle/conf/config.json
rm -rf /app/cronicle/conf
ln -s /config/cronicle/conf /app/cronicle/conf
fi fi
else else
echo "'$MODE' is not a recognised appion for the MODE environment variable. Accepted appions are 'manager' and 'worker'." echo "'$MODE' is not a recognised appion for the MODE environment variable. Accepted options are 'manager' and 'worker'."
exit 1
fi fi