-
Notifications
You must be signed in to change notification settings - Fork 2
Setting up the Production Instance
Here are some notes on the steps I had to take to get the production environment on https://marriagebooklet.bibleget.io up and running.
-
Clone the github repo to the website directory and initialize the rails app:
cd /var/www/vhosts/bibleget.io/marriagebooklet.bibleget.io git clone [email protected]:opensourcecatholic/marriage-booklet.git . bundle
-
I had to run
rails assets:precompile
so that theapplication.css
fromapp/assets/stylesheets
would get compiled topublic/assets/
(at least I think that's how that works? without this step I was still getting an error that application.css was missing from the asset pipeline) -
Now that webpack has been included, I also need to create the
public/packs
folder and give it the correct permissions, so thatrails assets:precompile
would be able to successfully compile assets into thepublic/packs
folder. (Since I'm not running as root, I had to make sure the system user was in the same group as the application, i.e.psaserv
, and recursively give group write permissions to thepublic
folder:sudo chmod -R g+w public
). After that assets were compiled successfully. -
Make sure the
tmp/cache
folder and thepublic/assets
folder both have the correct permissions. After webpack was installed I had to again correct the permissions on all of the subfolders of each of these. -
secret_key_base
needs to be set for production, runrake secret
then copy the last line of output and paste it into an environment variableSECRET_KEY_BASE
in the Plesk interface (see for example incomplete response from application from nginx passenger) -
If the database schema has been changed, run
bin/rails db:migrate RAILS_ENV=production
. (Doing this required to set the correct permissions (=g+w
) on the/db/production.sqlite3
file.)
« GO BACK TO THE PREVIOUS SECTION | CONTINUE TO THE NEXT SECTION » |
---|---|
4 How tos | Home |