-
Notifications
You must be signed in to change notification settings - Fork 0
/
.unicorn.sh
21 lines (18 loc) · 932 Bytes
/
.unicorn.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
# This file is meant to be executed via systemd.
source /usr/local/rvm/scripts/rvm
source /etc/profile.d/rvm.sh
export ruby_ver=$(rvm list default string)
export CONFIGURED=yes
export TIMEOUT=50
export APP_ROOT=/home/rails/rails_project
export RAILS_ENV="production"
export GEM_HOME="/home/rails/rails_project/vendor/bundle"
export GEM_PATH="/home/rails/rails_project/vendor/bundle:/usr/local/rvm/gems/${ruby_ver}:/usr/local/rvm/gems/${ruby_ver}@global"
export PATH="/home/rails/rails_project/vendor/bundle/bin:/usr/local/rvm/gems/${ruby_ver}/bin:${PATH}"
# Passwords
export SECRET_KEY_BASE=a28d14b0125143e1d11bd356f6b045841d9f360ab0a259d3631baebb5597183c872e7c9fc75adbc1f7376cb94b85d40ad275a6da49b5beda65b693a9e2775126
export APP_DATABASE_PASSWORD=ffadb995057a3d152677e7ec52926c06
# Execute the unicorn process
/home/rails/rails_project/vendor/bundle/bin/unicorn \
-c /etc/unicorn.conf -E production --debug