Skip to content

Instantly share code, notes, and snippets.

@yicr
Last active June 11, 2021 13:54
Show Gist options
  • Save yicr/7b3977c4c02ce0b3a1c1f48909f82f9b to your computer and use it in GitHub Desktop.
Save yicr/7b3977c4c02ce0b3a1c1f48909f82f9b to your computer and use it in GitHub Desktop.

13. Install libraries, migrations, etc

cd /home/git/gitlab
sudo -u git -H bundle install --no-deployment --without development test mysql aws kerberos
sudo -u git -H bundle install --deployment --without development test mysql aws kerberos

Optional: clean up old gems

sudo -u git -H bundle clean

Run database migrations

sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production

Compile GetText PO files

sudo -u git -H bundle exec rake gettext:compile RAILS_ENV=production

Update node dependencies and recompile assets

sudo -u git -H bundle exec rake yarn:install gitlab:assets:clean gitlab:assets:compile RAILS_ENV=production NODE_ENV=production NODE_OPTIONS="--max_old_space_size=4096"

Clean up cache

sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment