Created
May 19, 2020 08:28
-
-
Save tizee/eaadc770e30a1b750936b8ff15769cad to your computer and use it in GitHub Desktop.
Running DevDocs on local/remote server as a service
This file contains 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
[Unit] | |
Description=devdocs in raspberry pi | |
[Service] | |
Type=simple | |
SyslogIdentifier=devdocs-pi | |
User=root | |
WorkingDirectory=/home/pi/devdocs/ | |
PIDFile=/home/pi/devdocs.pid | |
Environment=BUNDLE_GEMFILE=/home/pi/devdocs/Gemfile | |
ExecStartPre=/usr/local/rvm/scripts/rvm | |
ExecStart=/usr/local/rvm/gems/ruby-2.6.5/wrappers/ruby /usr/local/rvm/gems/ruby-2.6.5/bin/bundle exec /usr/local/rvm/gems/ruby-2.6.5/bin/rackup /home/pi/devdocs/config.ru --host your_ip --port 9292 | |
ExecReload=/usr/local/rvm/gems/ruby-2.6.5/wrappers/ruby /usr/local/rvm/gems/ruby-2.6.5/bin/bundle exec /usr/local/rvm/gems/ruby-2.6.5/bin/rackup /home/pi/devdocs/config.ru --host your_ip --port 9292 | |
ExecStop=/bin/kill -s QUIT $MAINPID | |
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