If you have read my another post about creating a ToDo app in react you are good to go; if not see this post.
You know that React App is a single page application containing only static assets. So, you only need to setup a mechanism to serve your static assets like CSS, JS, HTML, IMAGE, etc. files when clients ask for. Either you can use market leader HTTP servers like Apache, Nginx, etc or simple Express server that runs in Node.js.
Config for Sidekiq
# Monit configuration for Sidekiq : myAPP
check process sidekiq_thepact_qa0
with pidfile "/home/deployer/www/qa/shared/tmp/pids/sidekiq.pid"
start program = "/bin/su - deployer -c 'cd /home/deployer/www/qa/current && /usr/local/rvm/bin/rvm default do bundle exec sidekiq --config /home/deployer/www/qa/current/config/sidekiq.yml --index 0 -e qa -d'" with timeout 30 seconds
stop program = "/bin/su - deployer -c 'cd /home/deployer/www/qa/current && /usr/local/rvm/bin/rvm default do bundle exec sidekiqctl stop /home/deployer/www/qa/shared/tmp/pids/sidekiq.pid'" with timeout 110 seconds
$ sudo monit reload
$ sudo service monit start
VPS/VPC deployment being at remote makes it cumbersome to know exactly what is happening under the hood during the deployment process. So, I think it would be great if we could know what is happening and what configuration the EY client sending to the VPS. Continue reading
Engineyard has made it easier to send environment variables to deploy hook when you execute the deployment command from client console. Environment variable is not the exact terminology to be used. EY sends it as configuration hash. You may want/need to send environment variables in situations such as:
- When you want to detect that this is the attempt when you want your seeds ( Data defined in seed.rb) to be committed to database.
- When you want specific services or packages like Elastic Search to reindex the records