Can someone explain how to use the .unicorn.sh file on the one-click Rails 5/Ubuntu 16.04 install to export environment variables?
I understand that it’s supposed to run through systemd, and looking at /etc/systemd/system/unicorn.service, it should be triggered before running ngnix.service. But when I restart nginx or unicorn using systemctl as the rails user, none of the environment variables in the .unicorn.sh script are exported. What gives?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.