Created
January 23, 2022 05:29
-
-
Save chsh/afbc69064288a740d575134ceb28329a to your computer and use it in GitHub Desktop.
rails template with goo_job
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rails basic configuration | |
environment_development_data = <<CODE | |
config.action_mailer.default_url_options = { host: 'http://localhost:3000' } | |
config.active_job.queue_adapter = :good_job | |
CODE | |
environment environment_development_data, env: 'development' | |
environment_production_data = <<CODE | |
config.action_mailer.default_url_options = { host: 'SET-YOUR-SERVICE-HOST-HERE' } | |
CODE | |
environment environment_production_data, env: 'production' | |
environment <<-CODE | |
config.time_zone = 'Tokyo' | |
config.active_job.queue_adapter = :good_job | |
config.good_job.queues = '*' | |
config.generators do |g| | |
g.helper false | |
end | |
config.i18n.enforce_available_locales = true | |
config.i18n.available_locales = %w(ja en) | |
config.i18n.default_locale = :ja | |
CODE | |
# gems | |
gem 'slim-rails' | |
gem 'good_job' | |
run 'bundle install' | |
generate 'good_job:install' | |
rails_command 'db:migrate' | |
file "Procfile.dev", <<~CODE | |
server: bundle exec bin/rails server -p 3000 | |
job: bundle exec good_job start | |
CODE | |
# after bundle install | |
after_bundle do | |
git :init | |
git add: '.' | |
git commit: %Q{ -m 'Initial commit' } | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment