Created
November 10, 2019 10:18
-
-
Save hmtanbir/73a0d1d601f40635b610a7b1a9774d89 to your computer and use it in GitHub Desktop.
puma service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Modify the path to the app directory and the user and group. | |
[Unit] | |
Description=Puma HTTP Server | |
After=network.target | |
# Uncomment for socket activation (see below) | |
# Requires=puma.socket | |
[Service] | |
# Foreground process (do not use --daemon in ExecStart or config.rb) | |
Type=simple | |
# Preferably configure a non-privileged user | |
User=${USER} | |
Group=${USER} | |
# Specify the path to your puma application root | |
WorkingDirectory=/home/${USER}/www/takargari | |
# Helpful for debugging socket activation, etc. | |
# Environment=PUMA_DEBUG=1 | |
# EnvironmentFile=/home/${USER}//www/takargari/.env | |
# The command to start Puma | |
# ExecStart=/sbin/puma -b tcp://0.0.0.0:9292 -b ssl://0.0.0.0:9293?key=key.pem&cert=cert.pem | |
# ExecStart=/usr/local/bin/bundle exec --keep-file-descriptors puma -e production | |
# ExecStart=/usr/local/bin/puma -C /home/${USER}/${APP_NAME}/config/puma.rb | |
ExecStart=/home/${USER}/.rbenv/shims/bundle exec puma -e production -C ./config/puma.rb config.ru | |
PIDFile=/home/${USER}/www/takargari/shared/tmp/pids/puma.pid | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment