Application Configuration
Git
Download your Rails application to your home directory:
git clone <URL>In the future, simply download the new commits from the remote repository:
git pullRails
Make sure you create config/master.key and copy the file contents from your local machine.
Prepare the application for running in production using the following commands:
RAILS_ENV=production bundle installRAILS_ENV=production rails assets:precompileRAILS_ENV=production rails db:createRAILS_ENV=production rails db:migrateRAILS_ENV=production rails db:seedIn the future, you should skip the database creation and seed steps.
Nginx
Using the template below, create a new Nginx configuration file:
Restart Nginx:
Systemd
Using the template below, create a new Systemd initialisation file:
Enable the service:
You can restart and check the status of the service using the following commands:
Last updated