1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/glitchsoc_ynh.git synced 2024-09-03 19:15:59 +02:00
This commit is contained in:
Mateusz 2024-04-02 18:54:37 +02:00 committed by GitHub
parent 26081e3c29
commit 5a0082a5f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -122,23 +122,24 @@ pushd "$install_dir/live"
ynh_use_ruby ynh_use_ruby
ynh_gem update --system ynh_gem update --system
ynh_gem install bundler --no-document ynh_gem install bundler --no-document
ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle config deployment 'true' ynh_exec_as "$app" env $ynh_ruby_load_path $ld_preload bin/bundle config deployment 'true'
ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle config without 'development test' ynh_exec_as "$app" env $ynh_ruby_load_path $ld_preload bin/bundle config without 'development test'
ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle config set force_ruby_platform true ynh_exec_as "$app" env $ynh_ruby_load_path $ld_preload bin/bundle config set force_ruby_platform true
ynh_exec_as "$app" "$ynh_ruby_load_path" "$ld_preload" bin/bundle install -j$(getconf _NPROCESSORS_ONLN) ynh_exec_as "$app" env $ynh_ruby_load_path $ld_preload bin/bundle install -j$(getconf _NPROCESSORS_ONLN)
# Building assets # Building assets
ynh_use_nodejs ynh_use_nodejs
env $ynh_node_load_PATH corepack enable env $ynh_node_load_PATH corepack enable
ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack enable ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack enable
ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH corepack prepare --activate
ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH yarn install ynh_exec_warn_less ynh_exec_as "$app" env $ynh_node_load_PATH yarn install
echo "SAFETY_ASSURED=1">> "$config" echo "SAFETY_ASSURED=1">> "$config"
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails db:migrate --quiet ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails db:migrate --quiet
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rails assets:precompile --quiet ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rails assets:precompile --quiet
# Generate vapid keys # Generate vapid keys
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production "$ynh_ruby_load_path" "$ld_preload" bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt
# Create the first admin user # Create the first admin user
ynh_exec_warn_less ynh_exec_as "$app" RAILS_ENV=production "$ynh_ruby_load_path" "$ld_preload" bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner > /dev/null ynh_exec_warn_less ynh_exec_as "$app" env RAILS_ENV=production $ynh_ruby_load_path $ld_preload bin/tootctl accounts create "$admin" --email="$admin_mail" --confirmed --role=Owner > /dev/null
popd popd
# Re-generate config with vapid keys # Re-generate config with vapid keys