1
0
Fork 0

Add example systemd service

This commit is contained in:
Alex Kotov 2018-12-06 02:28:51 +05:00
parent 1ba4e62a65
commit 9d601f3bdb
No known key found for this signature in database
GPG Key ID: 4E831250F47DE154
1 changed files with 20 additions and 0 deletions

View File

@ -42,3 +42,23 @@ Tested with **Ubuntu Server 18.04 LTS**.
* Copy file `config/master.key` to `/var/www/partynest/shared/config/`
* Create PostgreSQL role `partynest` with password `password`
* Create PostgreSQL database `partynest_production` owned by `partynest`
### Example systemd service
Replace `user` with the name of user which you want an application to run with.
```
[Unit]
After=network.target
Description=Partynest web server
[Service]
ExecStart=/usr/bin/bundle exec rails server --environment production
Restart=always
Type=simple
User=user
WorkingDirectory=/var/www/partynest/current
[Install]
WantedBy=multi-user.target
```