This repository has been archived by the owner on May 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
install.sh
executable file
·79 lines (67 loc) · 3.1 KB
/
install.sh
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
DOCROOT="www"
if [ -d "www" ]; then
echo "Cockpit already installed! Remove the www folder first if you want to reinstall."
exit 1
fi
# cockpit cms
echo "Downloading Cockpit CMS from https://github.com/agentejo/cockpit/archive/next.zip"
wget -qO- -O next.zip https://github.com/agentejo/cockpit/archive/next.zip \
&& unzip -q next.zip \
&& rm next.zip \
&& mv cockpit-next $DOCROOT
# multiple collection link addon
echo "Downloading MultipleCollectionLink from https://github.com/pauloamgomes/Cockpit-MultipleCollectionLink/archive/1.1.zip"
wget -qO- -O multiplecollectionlink.zip https://github.com/pauloamgomes/Cockpit-MultipleCollectionLink/archive/1.1.zip \
&& unzip -q multiplecollectionlink.zip -d $DOCROOT/addons \
&& rm multiplecollectionlink.zip \
&& mv $DOCROOT/addons/Cockpit-MultipleCollectionLink-1.1 $DOCROOT/addons/MultipleCollectionLink
# image styles addon
echo "Downloading ImageStyles addon from https://github.com/pauloamgomes/ImageStyles/archive/1.7.zip"
wget -qO- -O ImageStyles.zip https://github.com/pauloamgomes/ImageStyles/archive/1.7.zip \
&& unzip -q ImageStyles.zip -d $DOCROOT/addons \
&& rm ImageStyles.zip \
&& mv $DOCROOT/addons/ImageStyles-1.7 $DOCROOT/addons/ImageStyles
# LayoutComponents addon
echo "Downloading LayoutComponents addon from https://github.com/agentejo/LayoutComponents/archive/master.zip"
wget -qO- -O LayoutComponents.zip https://github.com/agentejo/LayoutComponents/archive/master.zip \
&& unzip -q LayoutComponents.zip -d $DOCROOT/addons \
&& rm LayoutComponents.zip \
&& mv $DOCROOT/addons/LayoutComponents-master $DOCROOT/addons/LayoutComponents
# CustomComponents addon
echo "Downloading CustomComponents addon from https://github.com/pauloamgomes/Cockpit-CustomComponents/archive/master.zip"
wget -qO- -O CustomComponents.zip https://github.com/pauloamgomes/Cockpit-CustomComponents/archive/master.zip \
&& unzip -q CustomComponents.zip -d $DOCROOT/addons \
&& rm CustomComponents.zip \
&& mv $DOCROOT/addons/Cockpit-CustomComponents-master $DOCROOT/addons/CustomComponents
# UniqueSlugs addon
echo "Downloading UniqueSlugs addon from https://github.com/raffaelj/cockpit_UniqueSlugs/archive/master.zip"
wget -qO- -O UniqueSlugs.zip https://github.com/raffaelj/cockpit_UniqueSlugs/archive/master.zip \
&& unzip -q UniqueSlugs.zip -d $DOCROOT/addons \
&& rm UniqueSlugs.zip \
&& mv $DOCROOT/addons/cockpit_UniqueSlugs-master $DOCROOT/addons/UniqueSlugs
# install example sqlite data
echo
echo "Installing example data..."
unzip -o -q example/storage.zip -d $DOCROOT \
&& chmod -R 0777 $DOCROOT/storage
# restore config
echo "Creating Cockpit configuration file..."
cp -r example/config $DOCROOT/ \
&& chmod 0775 $DOCROOT/config \
&& chmod 0666 $DOCROOT/config/config.yaml
cd docker
echo "Starting docker-compose for the first time..."
docker-compose up -d
echo
echo "All Done!"
echo
echo
echo "----------------------------------------------------------------------"
echo
echo "Access CockpitCMS on http://localhost:8088"
echo
echo " User: admin"
echo " Pass: admin"
echo
echo "----------------------------------------------------------------------"