forked from kbhff/eggplant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.sh
25 lines (17 loc) · 847 Bytes
/
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
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get install -y build-essential python3.4-dev python3-pip htop curl vim git mercurial postgresql postgresql-server-dev-9.3
sudo -u postgres psql -c "CREATE ROLE eggplant PASSWORD 'eggplant123' LOGIN CREATEDB;"
sudo -u postgres createdb eggplant eggplant
sudo pip3 install virtualenv
sudo -u vagrant virtualenv -p /usr/bin/python3.4 /home/vagrant/env
# pillow requirements
sudo apt-get -y install libjpeg8 libjpeg62-dev libfreetype6 libfreetype6-dev
sudo su vagrant
source /home/vagrant/env/bin/activate
cp /home/vagrant/eggplant/settings/local.py.example \
/home/vagrant/eggplant/settings/local.py
pip3 install -r /vagrant/requirements/development.txt
LINE="source /home/vagrant/env/bin/activate; cd /vagrant"
FILE=/home/vagrant/.bashrc
grep -q "$LINE" "$FILE" || echo "$LINE" >> "$FILE"