Skip to content

Commit

Permalink
build(deploy): Configure files
Browse files Browse the repository at this point in the history
  • Loading branch information
cassiosantana committed Aug 29, 2023
1 parent 79887bf commit 2c86eb7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions bin/render-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
# exit on error
set -o errexit

bundle install
bundle exec rake assets:precompile
bundle exec rake assets:clean
bundle exec rake db:migrate
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? || ENV["RENDER"].present?

# Compress CSS using a preprocessor.
# config.assets.css_compressor = :sass
Expand Down
4 changes: 2 additions & 2 deletions config/puma.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
# Workers do not work on JRuby or Windows (both of which do not support
# processes).
#
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
workers ENV.fetch("WEB_CONCURRENCY") { 2 }

# Use the `preload_app!` method when specifying a `workers` number.
# This directive tells Puma to first boot the application and load code
# before forking the application. This takes advantage of Copy On Write
# process behavior so workers use less memory.
#
# preload_app!
preload_app!

# Allow puma to be restarted by `bin/rails restart` command.
plugin :tmp_restart

0 comments on commit 2c86eb7

Please sign in to comment.