preset.sh 443 Bytes
Newer Older
Vladislav Rykov's avatar
Vladislav Rykov committed
1
2
3
4
pip3 install virtualenv
python3 -m virtualenv env
source env/bin/activate

Vladislav Rykov's avatar
Vladislav Rykov committed
5
6
sudo apt-get install -y postgresql postgresql-contrib
sudo apt-get install -y libpq-dev
Vladislav Rykov's avatar
Vladislav Rykov committed
7

Vladislav Rykov's avatar
Vladislav Rykov committed
8
9
10
11
12
13
14
pip install -r app/requirements.txt

sudo -u postgres psql -c "CREATE USER ${USER} WITH PASSWORD 'dev';"
sudo -u postgres psql -c "CREATE DATABASE iotserver WITH OWNER=${USER};"
psql -d iotserver -f db.sql

mkdir app/app/data
Vladislav Rykov's avatar
Vladislav Rykov committed
15

Vladislav Rykov's avatar
Vladislav Rykov committed
16
export FLASK_APP=run.py
Vladislav Rykov's avatar
Vladislav Rykov committed
17
export FLASK_ENV=production