Last active
July 13, 2020 09:58
-
-
Save koi-chan/38952aebaf7e0cc2fd7035a4b6d707e8 to your computer and use it in GitHub Desktop.
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
# /etc/default/ | |
WEB_CONCURRENCY=2 | |
RACK_MAX_THREADS=2 |
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
# /etc/systemd/system/bcdice-api.service | |
[Unit] | |
Description=BCDice API | |
Documentation=https://github.com/bcdice/bcdice-api | |
After=network.target | |
[Service] | |
User=bcdice | |
Group=bcdice | |
EnvironmentFile=/etc/default/bcdice-api | |
SyslogIdentifier=bcdice-api | |
Type=simple | |
PIDFile=/var/run/bcdice-api/puma.pid | |
WorkingDirectory=/home/bcdice/bcdice-api | |
Restart=always | |
ExecStart=/home/bcdice/bcdice-api/start.sh | |
ExecReload=/usr/bin/kill -USR2 $MAINPID | |
ExecStop=/usr/bin/kill -QUIT $MAINPID | |
[Install] | |
WantedBy=multi-user.target |
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
#!/bin/bash | |
# /home/bcdice/bcdice-api/start.sh | |
source /etc/profile.d/rbenv.sh | |
ruby -v | |
bundle -v | |
APP_ENV=production | |
exec bundle exec puma -C config/puma.rb -e deployment |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment