diff --git a/install_app_trytond_uwsgi.sh b/install_app_trytond_uwsgi.sh index a349512..e48f207 100644 --- a/install_app_trytond_uwsgi.sh +++ b/install_app_trytond_uwsgi.sh @@ -9,7 +9,7 @@ # Fill this variables before run script # # domain=domain # -port=8001 # +port=8000 # user=psk # # # #--------------------------------------------------------- @@ -130,11 +130,13 @@ server { error_log /var/log/nginx/${domain}_error.log; # max upload size - #client_max_body_size 2048M; # adjust to taste + client_max_body_size 2048M; # adjust to taste #location /static { # alias //static; # your Django project's static files - amend as required #} + + error_page 497 301 =307 https://${domain}:${port}$request_uri; # Finally, send all non-media requests. location / { diff --git a/install_biometric.sh b/install_biometric.sh index 4ff0827..b0898dd 100644 --- a/install_biometric.sh +++ b/install_biometric.sh @@ -3,15 +3,29 @@ #--------------------------------------------------------- # Fill this variables before run script # - # -domain=localhost # -port=8010 # -user=psk -db_name=DB_NAME # +read -p "ingresa el dominio donde se enuentra la base de datos tryton ej: cloudx.presik.com o localhost: " domain # +read -p "port api tryton ej 8010: " port_tryton +read -p "port api biometric ej 8010: " port_biometric +read -p "NODE ENV options 'development' for http or 'production' for https: " env # +read -p "Nombre de base de datos: " db_name # # # #--------------------------------------------------------- -cd /home/$user +cd +if ! [ -x "$(command -v curl)" ]; then + sudo apt -y install curl + >&2 + echo "curl is installed" +fi + +if ! [ -x "$(command -v node)" ]; then + curl -sL https://deb.nodesource.com/setup_18.x | sudo bash - + sudo apt -y install nodejs + >&2 + echo "node is installed" +fi + +cd $HOME mkdir biometric cd biometric git clone https://developer_presik@bitbucket.org/presik/app-bio.git @@ -20,7 +34,7 @@ sudo apt-get install libcairo2 libcairo2-dev libgirepository1.0.dev gir1.2-fprin python3 -m venv venv cd api-bio -/home/$user/biometric/venv/bin/pip3 install -r requirements.txt +$HOME/biometric/venv/bin/pip3 install -r requirements.txt cd .. cd app-bio @@ -29,12 +43,12 @@ cd app-bio cat >.env <