Class: Trek::Generators::Install::ScalingoGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Trek::Generators::Install::ScalingoGenerator
- Includes:
- Helpers
- Defined in:
- lib/generators/trek/install/scalingo_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_aptfile ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/generators/trek/install/scalingo_generator.rb', line 21 def create_aptfile create_file "Aptfile" do <<~TEXT libwebp-dev libvips-tools --no-install-recommends TEXT end end |
#create_buildpacks ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/generators/trek/install/scalingo_generator.rb', line 12 def create_buildpacks create_file ".buildpacks" do <<~TEXT https://github.com/Scalingo/apt-buildpack.git https://github.com/Scalingo/ruby-buildpack.git TEXT end end |
#create_procfile ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/generators/trek/install/scalingo_generator.rb', line 30 def create_procfile create_file "Procfile" do <<~TEXT web: bundle exec rails server -p $PORT -e $RAILS_ENV -b 0.0.0.0 # worker: bundle exec sidekiq -C config/sidekiq.yml postdeploy: bundle exec rails db:migrate TEXT end end |