Update Investbrain installation script
This commit is contained in:
parent
61b0ecf702
commit
8c89788923
@ -47,20 +47,13 @@ function update_script() {
|
||||
cp -r /opt/investbrain/storage /opt/investbrain_backup
|
||||
msg_ok "Created Backup"
|
||||
|
||||
rm -rf /opt/investbrain-new
|
||||
mkdir -p /opt/investbrain-new
|
||||
fetch_and_deploy_gh_release "Investbrain" "investbrainapp/investbrain" "tarball" "latest" "/opt/investbrain-new"
|
||||
fetch_and_deploy_gh_release "Investbrain" "investbrainapp/investbrain" "tarball" "latest" "/opt/investbrain"
|
||||
|
||||
msg_info "Updating Investbrain"
|
||||
cd /opt/investbrain
|
||||
cp -r /opt/investbrain-new/* /opt/investbrain/
|
||||
rm -rf /opt/investbrain/storage
|
||||
rm -rf /opt/investbrain-new
|
||||
|
||||
cp /opt/.env.backup /opt/investbrain/.env
|
||||
cp -r /opt/investbrain_backup/ /opt/investbrain/storage
|
||||
mkdir -p /opt/investbrain/storage/{framework/cache,framework/sessions,framework/views,app,logs}
|
||||
|
||||
export COMPOSER_ALLOW_SUPERUSER=1
|
||||
$STD composer install --no-interaction --no-dev --optimize-autoloader
|
||||
$STD npm install
|
||||
@ -73,10 +66,8 @@ function update_script() {
|
||||
$STD php artisan event:clear
|
||||
$STD php artisan route:cache
|
||||
$STD php artisan event:cache
|
||||
|
||||
chown -R www-data:www-data /opt/investbrain
|
||||
chmod -R 775 /opt/investbrain/storage /opt/investbrain/bootstrap/cache
|
||||
|
||||
rm -rf /opt/.env.backup /opt/investbrain_backup
|
||||
msg_ok "Updated Investbrain"
|
||||
|
||||
|
||||
@ -14,7 +14,7 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get update && apt-get install -y \
|
||||
$STD apt install -y \
|
||||
nginx \
|
||||
supervisor \
|
||||
redis-server \
|
||||
@ -33,12 +33,11 @@ NODE_VERSION="22" setup_nodejs
|
||||
PG_VERSION="17" setup_postgresql
|
||||
PG_DB_NAME="investbrain" PG_DB_USER="investbrain" setup_postgresql_db
|
||||
|
||||
mkdir -p /opt/investbrain
|
||||
fetch_and_deploy_gh_release "Investbrain" "investbrainapp/investbrain" "tarball" "latest" "/opt/investbrain"
|
||||
LOCAL_IP=$(hostname -I | awk '{print $1}')
|
||||
APP_KEY=$(openssl rand -base64 32)
|
||||
import_local_ip
|
||||
|
||||
msg_info "Installing Investbrain (Patience)"
|
||||
APP_KEY=$(openssl rand -base64 32)
|
||||
cd /opt/investbrain
|
||||
cat <<EOF >/opt/investbrain/.env
|
||||
APP_KEY=base64:${APP_KEY}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user