#!/bin/bash # Prepare sh /setup_programs.sh apt install -y lsb-release curl gpg apt install -y build-essential libssl-dev libffi-dev libgmp3-dev virtualenv libpq-dev python-dev # Install python & pip #python-pip #no module named pip python3 -m pip install -U pip python -m pip install wheel #python modules apt install -y python3-pip pip3 install flask pip3 install flask_socketio pip3 install flask_babel pip3 install flask_login pip3 install flask_mail pip3 install flask_paranoid pip3 install flask_security # Download curl -fsS https://www.pgadmin.org/static/packages_pgadmin_org.pub | gpg --dearmor -o /usr/share/keyrings/packages-pgadmin-org.gpg sh -c 'echo "deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list' apt update && apt full-upgrade -y # Installation apt install -y pgadmin4 pgadmin4-web # Configure export PGADMIN_SETUP_EMAIL="${PGADMIN_SETUP_EMAIL}" export PGADMIN_SETUP_PASSWORD="${PGADMIN_SETUP_PASSWORD}" export PGADMIN_PLATFORM_TYPE="debian" # silently install the below --yes indicate auto install sh /usr/pgadmin4/bin/setup-web.sh --yes cd /var/log/pgadmin/test source test_env/bin/activate # Configure rverse-proxy apt install -y nginx #Remove old nginx config #GET new config