We have dockerized Rails application and It is deployed on AWS(using Fargate).
Currently, we have Dev and Staging servers running on AWS. We use Resque for scheduling and queuing purpose. We do use foreman to start below processes once deployment is completed.
#Docker CMD bundle exec foreman start -f Procfile.dev-server
#Procfile.dev-server web: bundle exec rails s -p 3000 -b ‘0.0.0.0’ queues: bin/rake environment resque:work QUEUE=responsive_tasks scheduler: bin/rake environment resque:scheduler
This setup is good and working fine till staging environment. Foreman is not recommended for Production setup and might be issue when scaling would require as all 3 processes running on same machine.
Doubts
How I can run all 3 different processes(web server, queues and schedulers) without Foreman once code is deployed on AWS for production?
Shall I run Resque servers on separate instance with same Rails app code?