MaybeFinance: move Ruby check/install/update to later
This commit is contained in:
parent
5d302a4db6
commit
e23808d261
@ -49,11 +49,12 @@ function update_script() {
|
|||||||
rm ./config/credentials.yml.enc
|
rm ./config/credentials.yml.enc
|
||||||
source ~/.profile
|
source ~/.profile
|
||||||
$STD tar -xf "$BACKUP_FILE" --directory=/
|
$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 install
|
||||||
$STD ./bin/bundle exec bootsnap precompile --gemfile -j 0
|
$STD ./bin/bundle exec bootsnap precompile --gemfile -j 0
|
||||||
$STD ./bin/bundle exec bootsnap precompile -j 0 app/ lib/
|
$STD ./bin/bundle exec bootsnap precompile -j 0 app/ lib/
|
||||||
export SECRET_KEY_BASE_DUMMY=1
|
export SECRET_KEY_BASE_DUMMY=1
|
||||||
$STD ./bin/rails assets:precompile
|
$STD dotenv -f ./.env ./bin/rails assets:precompile
|
||||||
$STD dotenv -f ./.env ./bin/rails db:prepare
|
$STD dotenv -f ./.env ./bin/rails db:prepare
|
||||||
msg_ok "Updated $APP to v${RELEASE}"
|
msg_ok "Updated $APP to v${RELEASE}"
|
||||||
|
|
||||||
|
@ -34,7 +34,6 @@ $STD apt-get install -y --no-install-recommends \
|
|||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
PG_VERSION=16 install_postgresql
|
PG_VERSION=16 install_postgresql
|
||||||
RUBY_VERSION=3.4.1 RUBY_INSTALL_RAILS=false setup_rbenv_stack
|
|
||||||
|
|
||||||
msg_info "Setting up Postgresql"
|
msg_info "Setting up Postgresql"
|
||||||
DB_NAME="maybe"
|
DB_NAME="maybe"
|
||||||
@ -56,6 +55,7 @@ curl -fsSL "https://github.com/maybe-finance/maybe/archive/refs/tags/v${RELEASE}
|
|||||||
unzip -q /tmp/v"$RELEASE".zip
|
unzip -q /tmp/v"$RELEASE".zip
|
||||||
mv maybe-"$RELEASE" /opt/maybe
|
mv maybe-"$RELEASE" /opt/maybe
|
||||||
cd /opt/maybe
|
cd /opt/maybe
|
||||||
|
RUBY_VERSION="$(cat /opt/maybe/.ruby-version)" RUBY_INSTALL_RAILS=false setup_rbenv_stack
|
||||||
cp ./.env.example ./.env
|
cp ./.env.example ./.env
|
||||||
sed -i -e '/SELF_/a RAILS_ENV=production' \
|
sed -i -e '/SELF_/a RAILS_ENV=production' \
|
||||||
-e "s/secret-value/\"$(openssl rand -hex 64)\"/" \
|
-e "s/secret-value/\"$(openssl rand -hex 64)\"/" \
|
||||||
@ -77,7 +77,7 @@ $STD ./bin/bundle install
|
|||||||
$STD ./bin/bundle exec bootsnap precompile --gemfile -j 0
|
$STD ./bin/bundle exec bootsnap precompile --gemfile -j 0
|
||||||
$STD ./bin/bundle exec bootsnap precompile -j 0 app/ lib/
|
$STD ./bin/bundle exec bootsnap precompile -j 0 app/ lib/
|
||||||
export SECRET_KEY_BASE_DUMMY=1
|
export SECRET_KEY_BASE_DUMMY=1
|
||||||
$STD ./bin/rails assets:precompile
|
$STD dotenv -f ./.env ./bin/rails assets:precompile
|
||||||
$STD dotenv -f ./.env ./bin/rails db:prepare
|
$STD dotenv -f ./.env ./bin/rails db:prepare
|
||||||
echo "${RELEASE}" >/opt/maybe_version.txt
|
echo "${RELEASE}" >/opt/maybe_version.txt
|
||||||
msg_ok "Installed ${APPLICATION}"
|
msg_ok "Installed ${APPLICATION}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user