From d29cf694a15ddadea86be793a1450e352eeb6461 Mon Sep 17 00:00:00 2001 From: Ryan W Date: Sat, 10 Sep 2022 15:55:16 -0700 Subject: [PATCH] Render build --- bin/render-build.sh | 8 ++++++++ config/database.yml | 3 +-- config/environments/production.rb | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100755 bin/render-build.sh diff --git a/bin/render-build.sh b/bin/render-build.sh new file mode 100755 index 0000000..00700a0 --- /dev/null +++ b/bin/render-build.sh @@ -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 diff --git a/config/database.yml b/config/database.yml index 2858614..d74cba5 100644 --- a/config/database.yml +++ b/config/database.yml @@ -82,5 +82,4 @@ test: production: <<: *default database: railsondocker_production - username: railsondocker - password: <%= ENV["RAILSONDOCKER_DATABASE_PASSWORD"] %> + url: <%= ENV['DATABASE_URL'] %> diff --git a/config/environments/production.rb b/config/environments/production.rb index 2149251..a76f566 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -24,7 +24,7 @@ Rails.application.configure do # 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