[Unit] Description=__APP__-app After=network.target [Service] Type=simple User=__APP__ WorkingDirectory=__INSTALL_DIR__ Environment="__LD_PRELOAD__" Environment="__YNH_RUBY_LOAD_PATH__" Environment="RAILS_ENV=production" ExecStartPre=-rm -f __INSTALL_DIR__/tmp/pids/server.pid ExecStart=__INSTALL_DIR__/bin/bundle exec rails s puma -p __PORT__ -b 127.0.0.1 ExecReload=/bin/kill -SIGUSR1 $MAINPID TimeoutSec=15 Restart=always StandardError=syslog [Install] WantedBy=multi-user.target