The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

30 lines
1.2 KiB

  1. #!/bin/bash
  2. function die {
  3. echo 1>&2 "${1}"
  4. exit 1
  5. }
  6. # Ensure system is current
  7. sudo apt update -y || die "Error running apt update"
  8. sudo apt upgrade -y || die "Error running apt upgrade"
  9. # Install packages
  10. sudo apt install openjdk-11-jdk maven postgresql-10 redis-server jq python3 python3-pip npm webpack -y || die "Error installing apt packages"
  11. sudo pip3 install setuptools psycopg2-binary || die "Error installing pip packages"
  12. # Create DB user for current user, as superuser
  13. CURRENT_USER="$(whoami)"
  14. sudo su - postgres bash -c 'createuser -U postgres --createdb --createrole --superuser '"${CURRENT_USER}"'' || die "Error creating ${CURRENT_USER} DB user"
  15. PG_HBA=/etc/postgresql/10/main/pg_hba.conf
  16. sudo cat ${PG_HBA} | sed -e 's/ peer/ trust/g' | sed -e 's/ md5/ trust/g' > /tmp/pg_hba.conf || die "Error filtering ${PG_HBA}"
  17. sudo bash -c "cat /tmp/pg_hba.conf > ${PG_HBA}" || die "Error rewriting ${PG_HBA}"
  18. sudo service postgresql restart || die "Error restaring pgsql"
  19. # Create DB user 'bubble', with the ability to create databases
  20. createuser --createdb bubble || die "Error creating bubble DB user"
  21. # Create bubble database
  22. createdb --encoding=UTF-8 bubble || die "Error creating bubble DB"