##This is for development used. Steps written are for Ubuntu 16.04
sudo su
mkdir -p /var/www/html/
cd /var/www/html
sudo apt-get update
sudo apt-get -y install git
git clone https://github.com/reysidney/django_reactjs_boilerplate.git
mkdir -p /var/www/html/boilerplate/logs/nginx/
cd /var/www/html/boilerplate
./bin/setup.sh
cd /var/www/html/boilerplate/backend/
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
sudo -u postgres psql postgres
CREATE USER admin WITH PASSWORD '@dm1n_p@55';
CREATE DATABASE appdb WITH ENCODING = 'UTF8';
ALTER ROLE admin SUPERUSER;
GRANT ALL PRIVILEGES ON DATABASE appdb TO admin;
GRANT ALL PRIVILEGES ON ALL TABLES in schema public TO admin;
\q
cd /var/www/html/boilerplate/frontend
npm install
cd /var/www/html/boilerplate
./bin/setup-nginx.sh
cd /var/www/html/boilerplate/frontend
npm run build
cd /var/www/html/boilerplate/frontend
npm start
sudo nano /var/www/html/boilerplate/backend/project/boilerplate/settings.py
cd /var/www/html/boilerplate/
./bin/setup-supervisor.sh
sudo supervisorctl -c conf/supervisord.conf start all
crontab -e
@reboot /var/www/html/boilerplate/bin/setup-supervisor.sh
##You should now be able to access boilerplate project on your localhost or in the server using the IP.