The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

41 rivejä
1.5 KiB

  1. #!/bin/bash
  2. function die {
  3. echo 1>&2 "${1}"
  4. exit 1
  5. }
  6. ALGO_BASE="$(cd $(dirname $0) && pwd)"
  7. CA_PASS_FILE="/home/bubble/.BUBBLE_ALGO_CA_KEY_PASSWORD"
  8. cd ${ALGO_BASE}
  9. if [[ ! -f "${ALGO_BASE}/config.cfg.hbs" ]] ; then
  10. die "No ${ALGO_BASE}/config.cfg.hbs found"
  11. fi
  12. java -cp /home/bubble/current/bubble.jar bubble.main.BubbleMain generate-algo-conf --algo-config ${ALGO_BASE}/config.cfg.hbs || die "Error writing algo config.cfg"
  13. python3 -m virtualenv --python="$(command -v python3)" .env \
  14. && source .env/bin/activate \
  15. && python3 -m pip install -U pip virtualenv \
  16. && python3 -m pip install -r requirements.txt \
  17. && ansible-playbook main.yml --skip-tags debug \
  18. -e "ca_password_file=${CA_PASS_FILE}
  19. ca_password_file_owner=bubble
  20. provider=local
  21. server=localhost
  22. store_cakey=true
  23. ondemand_cellular=false
  24. ondemand_wifi=false
  25. store_pki=true
  26. dns_adblocking=false
  27. ssh_tunneling=false
  28. endpoint={{ endpoint }}
  29. server_name={{ server_name }}" || die "Error installing algo"
  30. # Archive configs in a place that the BackupService can pick them up
  31. CONFIGS_BACKUP=/home/bubble/.BUBBLE_ALGO_CONFIGS.tgz
  32. cd ${ALGO_BASE} && tar czf ${CONFIGS_BACKUP} configs && chgrp bubble ${CONFIGS_BACKUP} && chmod 660 ${CONFIGS_BACKUP} || die "Error backing up algo configs"
  33. cd /home/bubble && tar xzf ${CONFIGS_BACKUP} && chgrp -R bubble configs && chown -R bubble configs && chmod 500 configs || die "Error unpacking algo configs to bubble home"