forked from skagitpublishing/docker-connextcms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mergeandlaunch
executable file
·40 lines (29 loc) · 1.12 KB
/
mergeandlaunch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
#This script should be edited to execute any merge scripts needed to
#merge plugins and theme files before starting ConnextCMS/KeystoneJS.
#This script is run every time the Docker container is launched, before starting KeystoneJS.
#Change owner of the mounted volumes. This must happen in the shells script as it will
#not work inside the Dockerfile. It also must happen at the launch of the Docker
#container as it will not persist.
echo 'password' | sudo -S pwd
sudo chown -R connextcms /home/connextcms
echo Running mergeandlaunch script
#Copy the /public directory for nginx
cd ~/myCMS
cp -rP public/* ~/public
#Unlink any symlinks that may be been previously created
unlink ~/myCMS/public/uploads/files
unlink ~/myCMS/public/uploads/images
#Replace the images and files upload directories with symbolic links
cd ~/myCMS/public/uploads
rm -rf images
rm -rf files
ln -s ~/public/uploads/images images
ln -s ~/public/uploads/files files
#Run any merge scripts to install plugins or site templates.
cd ~/public
chmod 775 merge-site-plugin-files
./merge-site-plugin-files
cd ~/myCMS
#Launch KeystoneJS and ConnextCMS
exec "$@"