diff --git a/ct/maybefinance.sh b/ct/maybefinance.sh index fadb7395..38a52ad3 100644 --- a/ct/maybefinance.sh +++ b/ct/maybefinance.sh @@ -45,11 +45,11 @@ function update_script() { curl -fsSL "https://github.com/maybe-finance/maybe/archive/refs/tags/v${RELEASE}.zip" -o /tmp/v"$RELEASE".zip unzip -q /tmp/v"$RELEASE".zip mv maybe-"$RELEASE" /opt/maybe + RUBY_VERSION="$(cat /opt/maybe/.ruby-version)" RUBY_INSTALL_RAILS=false setup_rbenv_stack cd /opt/maybe rm ./config/credentials.yml.enc source ~/.profile $STD tar -xf "$BACKUP_FILE" --directory=/ - RUBY_VERSION="$(cat /opt/maybe/.ruby-version)" RUBY_INSTALL_RAILS=false setup_rbenv_stack $STD ./bin/bundle install $STD ./bin/bundle exec bootsnap precompile --gemfile -j 0 $STD ./bin/bundle exec bootsnap precompile -j 0 app/ lib/ diff --git a/install/maybefinance-install.sh b/install/maybefinance-install.sh index a24ddba2..fa5c03ce 100644 --- a/install/maybefinance-install.sh +++ b/install/maybefinance-install.sh @@ -54,9 +54,9 @@ RELEASE=$(curl -s https://api.github.com/repos/maybe-finance/maybe/releases/late curl -fsSL "https://github.com/maybe-finance/maybe/archive/refs/tags/v${RELEASE}.zip" -o /tmp/v"$RELEASE".zip unzip -q /tmp/v"$RELEASE".zip mv maybe-"$RELEASE" /opt/maybe -cd /opt/maybe RUBY_VERSION="$(cat /opt/maybe/.ruby-version)" RUBY_INSTALL_RAILS=false setup_rbenv_stack -cp ./.env.example ./.env +cd /opt/maybe +cp /.env.example ./.env sed -i -e '/SELF_/a RAILS_ENV=production' \ -e "s/secret-value/\"$(openssl rand -hex 64)\"/" \ -e "/^SECRET_KEY/a RAILS_MASTER_KEY=\"$(openssl rand -hex 16)\"" \