This gem was developed to facilitate the creation and management processes in rails projects.
From Gemfile
gem 'fcl_rails_daemon'
Then run:
$ bundle
Or only install:
$ gem install fcl_rails_daemon
After installation you need to create the directories and configuration files for this run
$ fcld --configure
Will be created:
- config/fcld_rails_daemon.rb (File where the commands are recorded)
- tmp/pids/fcld.yml (Pids file where the commands are recorded)
- lib/fcl_rails_daemon/command_sample.rb (A command template)
$ fcld --create my_first_command
- Add the command file in lib/fcl_rails_daemon
- Records the command in config/fcl_rails_daemon.rb
$ fcld --destroy my_first_command
- Remove the command file in lib/fcl_rails_daemon
- Remove record of the command in config/fcl_rails_daemon.rb
$ fcld --help
$ fcld --pids
$ fcld --logs
$ fcld start
$ fcld --env production start
$ fcld --command my_first_command start
[--process_name] Sets a name to be assigned to the process (by default the name is the name of the command)
$ fcld --command my_first_command --process_name foo_my_first_command start