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
18 changes: 5 additions & 13 deletions bin/render-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,12 @@
# exit on error
set -o errexit

# Install dependencies
bundle install
bundle exec rails assets:precompile
bundle exec rails assets:clean

# Precompile assets
bundle exec rake assets:precompile
# If you're using a Free instance type, you need to
# perform database migrations in the build command.
# Uncomment the following line:

# Clean up assets
bundle exec rake assets:clean

# Drop, create, and migrate the database
# bundle exec rails db:drop DISABLE_DATABASE_ENVIRONMENT_CHECK=1
# bundle exec rails db:create
# bundle exec rails db:schema:load
# bundle exec rails db:migrate

# Only run migrations without dropping the database
bundle exec rails db:migrate
23 changes: 23 additions & 0 deletions render.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
databases:
- name: mysite
databaseName: mysite
user: mysite
plan: free

services:
- type: web
name: mysite
runtime: ruby
plan: free
buildCommand: "./bin/render-build.sh"
# preDeployCommand: "bundle exec rails db:migrate" # preDeployCommand only available on paid instance types
startCommand: "bundle exec rails server"
envVars:
- key: DATABASE_URL
fromDatabase:
name: mysite
property: connectionString
- key: RAILS_MASTER_KEY
sync: false
- key: WEB_CONCURRENCY
value: 2 # sensible default