Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and [Bootstrap](http://getbootstrap.com/).

An example application is running:

:tv: https://simple-form-bootstrap.herokuapp.com/
:tv: https://simple-form-bootstrap.onrender.com/

## License

Expand Down
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
1 change: 1 addition & 0 deletions config/credentials.yml.enc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
slDq+IfLVH7AZkZQV7Gl1cQZ3aBz2OTxvEMs1qelgfX4qEoMbaF/giZqAxGj8qAM7U/tHUlz+3ZIBr9gdBDHiOl+pxsrhjVNsUyWvsVjuhMioGqq+RFxdvnW1aEyhHKAW3q1aGd2DYo812QnA3k85K4umI5ilDhxWReNtj775WGmN+Kjef5IMLExxWsZYFXOOstE3RU5Rq61EXwM+x3E0zW2sQDNb1edZyynLbvo7zR4s8ynfMN2Nm7FMnv3ptczWlO1ZgGtFljDtt8TKchy+cYktesgDFSDBuNKF7JM0sexpMWFCMiD/+wcKCC2NPhs+g34twJrWDIpNolZzGOn7nb91/p0MDpplryMnwb9jPAqMgh++AUQwTcmPhdubGiYjulOvBNvfLyDzJ7uNS5LGahsji5jr4Httyac--r//UmqBLvgwwY5rK--taIs1zNkpkVdUmB7cGz2yQ==
4 changes: 4 additions & 0 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,7 @@ development:
test:
<<: *default
database: db/test.sqlite3

production:
<<: *default
url: <%= ENV['DATABASE_URL'] %>
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") { 4 }

# 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
18 changes: 18 additions & 0 deletions render.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
databases:
- name: simple_form_bootstrap
databaseName: simple_form_bootstrap
user: simple_form_bootstrap

services:
- type: web
name: simple_form_bootstrap
runtime: ruby
buildCommand: "./bin/render-build.sh"
startCommand: "bundle exec puma -C config/puma.rb"
envVars:
- key: DATABASE_URL
fromDatabase:
name: simple_form_bootstrap
property: connectionString
- key: RAILS_MASTER_KEY
sync: false