Can someone explain how to use the .unicorn.sh file on the one-click Rails 5/Ubuntu 16.04 install to export environment variables?

March 21, 2017 496 views
Ruby on Rails Ubuntu 16.04

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?

1 Answer
Have another answer? Share your knowledge.