- https://github.com/sstephenson/ruby-build/wiki#suggested-build-environment
- git
- nginx
- postgresql
- apt-get install libpq-dev libmagic-dev
- emerge -av libmagic vixie-cron
cd config
cp lifemessager.yml{.example,}
vim lifemessager.yml
Cmnd_Alias LIFEMESSAGER_CMD = /bin/mkdir, \
\
/bin/mv /tmp/{server_name}.crt /etc/ssl/certs, \
/bin/mv /tmp/{server_name}.key /etc/ssl/private, \
/bin/chown root\:root /etc/ssl/certs/{server_name}.crt, \
/bin/chown root\:root /etc/ssl/private/{server_name}.key, \
\
/bin/mv /tmp/lifemessager_{stage} /etc/nginx/sites-available, \
/bin/ln -fs /etc/nginx/sites-available/lifemessager_{stage} /etc/nginx/sites-enabled/lifemessager_{stage}, \
/etc/init.d/nginx reload, \
\
/bin/ln -fs /home/lifemessager/lifemessager/shared/config/monit.conf /etc/monit.d/lifemessager, \
/usr/bin/monit reload, \
\
/bin/mv /tmp/unicorn_lifemessager_{stage} /etc/init.d, \
/usr/sbin/update-rc.d -f unicorn_lifemessager_{stage} defaults, \
/usr/bin/rc-config add unicorn_lifemessager_{stage} defaults, \
/bin/chown lifemessager\:lifemessager /home/lifemessager/lifemessager, \
\
/bin/mv /tmp/delayed_job_lifemessager_{state} /etc/init.d, \
/usr/sbin/update-rc.d -f delayed_job_lifemessager_{state} defaults, \
/usr/bin/rc-config add delayed_job_lifemessager_{state} defaults
lifemessager ALL=NOPASSWD: LIFEMESSAGER_CMD, \
(postgres) NOPASSWD: /usr/bin/psql
cap production setup
cap production deploy
Can use CAP_LOG_LEVEL
to set output log level. Avaliable level: trace
, debug
, info
, warn
, error
, fatal
.
Error:
cannot chdir(/var/spool/cron), bailing out.
/var/spool/cron: Permission denied
Execute commands:
sudo groupmems -a user -g cron
sudo groupmems -a user -g crontab
I didn't know what happend, but you can start guard
with argument -p
bin/bundle exec guard -p