Fix install predash

This commit is contained in:
Oscar Alvarez 2020-08-04 12:05:16 -05:00
parent 4bd4ac064c
commit afa82cb3d9
3 changed files with 7 additions and 65 deletions

View File

@ -1,59 +0,0 @@
#!/bin/sh
#---------------------------------------------------------
# Script Install Pedash
# --------------------------------------------------------
# Install apt-get packages
echo "[INFO] Installing main apt packages..."
#sudo apt-get update
#sudo apt-get -y upgrade
sudo apt -y install build-essential
sudo apt -y install python3-dev
echo "[INFO] Done."
echo "[INFO] Installing pip packages..."
sudo pip3 install simplejson
sudo pip3 install pycrypto
sudo pip3 install flask
sudo pip3 install flask_tryton
sudo pip3 install flask_cors
message "[INFO] Installing Predash WEB..." ${BLUE}
mkdir $HOME/.flask
mkdir $HOME/predash
cd $HOME/predash
hg clone https://bitbucket.org/presik/predash_web
cd predash_web && npm install && cd ..
echo "[INFO] Done."
message "[INFO] Installing Predash API..." ${BLUE}
hg clone https://bitbucket.org/presik/predash_api
cd predash_api && npm install && cd ..
echo "[INFO] Creating Config File..."
env_flask="
[General]
databases=['DEMO50']
host=0.0.0.0
trytond_config=/home/psk/.trytond/trytond.conf
[Auth]
api_key=xxxxxxxxxxxxxx
secret_key=xxxxxxxxxx
user=username
"
echo $env_flask >> $HOME/.flask/dash.ini
echo "[INFO] Done."

View File

@ -161,16 +161,17 @@ mkdir $HOME_USER/.flask
mkdir $HOME_USER/.certificate
mkdir $HOME_USER/predash
hg clone https://hg@bitbucket.org/presik/predash_api
cd predash
git clone git@bitbucket.org:presik/predash-api.git
cp predash_api/dash.ini ~/.flask/dash.ini
sudo cp predash_api/predash_api.service /etc/systemd/system/predash_api.service
cp predash-api/dash.ini ~/.flask/dash.ini
sudo cp predash-api/predash_api.service /etc/systemd/system/predash_api.service
sudo chmod 755 /etc/systemd/system/predash_api.service
sudo systemctl enable predash_api.service
hg clone https://hg@bitbucket.org/presik/predash_web
git clone git@bitbucket.org:presik/predash-web.git
cd predash-web
sudo cp predash_web.service /etc/systemd/system/predash_web.service
sudo chmod 755 /etc/systemd/system/predash_web.service

View File

@ -8,7 +8,7 @@ User=psk
Group=psk
ExecStart=/home/psk/predash/run_predash.sh
ExecStop=
Environment="REACT_APP_TRYTON_API_HOST=cloud2.presik.com"
Environment="REACT_APP_TRYTON_API_HOST=cloudX.presik.com"
Environment="REACT_APP_TRYTON_API_PORT=5000"
[Install]