-
Notifications
You must be signed in to change notification settings - Fork 14
/
install-2004.sh
executable file
·60 lines (51 loc) · 1.6 KB
/
install-2004.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
echo "Sailor installer. Ubuntu 20.04"
apt-get update
apt-get install -y bc wget \
curl \
software-properties-common \
cron \
build-essential \
certbot \
git \
incron \
libjpeg-dev \
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
nginx-full \
python3 \
python3-certbot-nginx \
python3-dev \
python3-pip \
python3-click \
python3-virtualenv \
python-yaml \
uwsgi \
uwsgi-plugin-asyncio-python3 \
uwsgi-plugin-gevent-python3 \
uwsgi-plugin-python3 \
uwsgi-plugin-tornado-python3 \
php-fpm \
nodejs \
npm \
nodeenv
apt-get update
PAAS_USERNAME=sailor
# Create user
sudo adduser --disabled-password --gecos 'PaaS access' --ingroup www-data $PAAS_USERNAME
# copy your public key to /tmp (assuming it's the first entry in authorized_keys)
head -1 ~/.ssh/authorized_keys > /tmp/pubkey
# install sailor and have it set up SSH keys and default files
sudo su - $PAAS_USERNAME -c "wget https://raw.githubusercontent.com/mardix/sailor/master/sailor.py && python3 ~/sailor.py init && python3 ~/sailor.py x:set-ssh /tmp/pubkey"
rm /tmp/pubkey
sudo ln /home/$PAAS_USERNAME/.sailor/uwsgi/uwsgi.ini /etc/uwsgi/apps-enabled/sailor.ini
sudo systemctl restart uwsgi
cd /tmp
wget https://raw.githubusercontent.com/mardix/sailor/master/incron.conf
wget https://raw.githubusercontent.com/mardix/sailor/master/nginx.conf
wget https://raw.githubusercontent.com/mardix/sailor/master/index.sailor.html
cp /tmp/nginx.conf /etc/nginx/sites-available/default
cp /tmp/incron.conf /etc/incron.d/sailor
cp /tmp/index.sailor.html /var/www/html
echo ""
echo "Sailor installation complete!"