forked from dokku-alt/dokku-alt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.sh
executable file
·57 lines (46 loc) · 1.67 KB
/
bootstrap.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
#!/bin/bash
set -xe
DEBIAN_CODE_NAME=`lsb_release -sc`
if [ ! -e /usr/lib/apt/methods/https ]; then
apt-get update
apt-get install -y apt-transport-https
fi
case $DEBIAN_CODE_NAME in
wheezy|jessie)
echo "deb http://http.debian.net/debian ${DEBIAN_CODE_NAME}-backports main" > /etc/apt/sources.list.d/${DEBIAN_CODE_NAME}-backports.list
;;
*)
echo "WARNING: dokku-deb-al works best on Debain, you probably use something different than jessie or wheezy"
;;
esac
wget -qO- https://get.docker.com/gpg | sudo apt-key add -
wget -qO- https://get.docker.com/ | sh
apt-get update -y
wget http://debian.netbrick.cz/debian.netbrick.cz.gpg.key -O - | apt-key add -
echo deb http://debian.netbrick.cz/ jessie main > /etc/apt/sources.list.d/netbrick.list
if [[ -t 0 ]]; then
dpkg -i dokku-alt-0.3.10-147-g43154de-amd64.deb
apt-get install -y ruby ruby-sinatra
else
unset UCF_FORCE_CONFFOLD
export UCF_FORCE_CONFFNEW=YES
apt-get install -o Dpkg::Options::="--force-confnew" --yes --force-yes dokku-alt ruby ruby-sinatra
fi
set +xe
case $DEBIAN_CODE_NAME in
wheezy|jessie)
echo
echo "OK: You made right decision - Debian"
echo "deb http://http.debian.net/debian ${DEBIAN_CODE_NAME}-backports main" > /etc/apt/sources.list.d/${DEBIAN_CODE_NAME}-backports.list
;;
*)
echo
echo "WARNING: dokku-deb-al works best on Debain"
;;
esac
echo
echo "Almost done!"
echo "Open now web browser pointing to http://$(hostname):2000/ to finish configuartion."
echo "For manual installation instructions press Ctrl-C and visit https://github.com/dokku-alt/dokku-alt."
echo
ruby /usr/local/share/dokku-alt/contrib/dokku-installer.rb