3
votes

I'm setting up my rails production server on digital ocean with puma and nginx.

Following tutotials I have entered this in my /etc/nginx/sites-available/default

server unix:/home/deploy/appname/shared/sockets/puma.sock fail_timeout=0;

But on the server the folder home/deploy/appname/shared/sockets/ is empty.

I double checked the tutorials and none of them mentions creating such file.

If I run ps aux | grep pumaI get

root 2076 0.0 0.3 52992 3544 pts/0 T 05:51 0:00 sudo nano require capistrano/puma root 2077 0.0 0.3 23872 3888 pts/0 T 05:51 0:00 nano require capistrano/puma rails 2407 0.0 0.0 14484 1012 pts/0 S+ 06:38 0:00 grep puma

which it doesn't really makes sense to me as I'm not using capistrano.

My question is. How is puma.sock created? During puma installation? What step have I missed if that directory is empty?

1

1 Answers

4
votes

Without capistrano you need to start puma with -b option to create sock file:

puma -b unix:///__abs_path_to_your_app__/puma.sock

and in /etc/nginx/sites-available/default you need to change path to .sock file:

server unix:///__abs_path_to_your_app__/puma.sock fail_timeout=0;