Skip to content

Commit

Permalink
Add render config
Browse files Browse the repository at this point in the history
We need a Rails master key. The encryption key has been saved securely. We'll use db:reset instead of db:migrate since we always want to reset the database and seed it anyway.
  • Loading branch information
javierjulio committed Jan 3, 2024
1 parent e5a4837 commit e796aa5
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@
/app/assets/builds/*
!/app/assets/builds/.keep
/node_modules

/config/master.key
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
./bin/rails assets:precompile
./bin/rails assets:clean
./bin/rails db:reset
1 change: 1 addition & 0 deletions config/credentials.yml.enc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4fsqkfii8ZegJd7p+CuxH5qbtDPqmjxbJAmVoM84lxY0M/Cvi1sjviadoTuXw3eh9OooOkPaFlWQtnffoApCzl9x06LX99hcxu+87bTNUvULABU79uGW9rmNS7ZeZHuKod4MyBD41CQ8dVQqVgWOS0h7T8Pz7Dp8ixdBGzUkVm6Fwzc/qS7c7eHeg1Avjva73WsHd+N8gu085+TvtpuzP2LlakwXLSvHfb+hdYxCxwM+dIVpylyE7Z4/Rmh1b1KL6/qKESHYglaILiGGT2avPUhN4xnzdViwpLZwh3CF/jyIGuhMHJyzDQxxBxCDDBDVBFCGUtUpyYhzwFkNXJfEARRXfdORelk3cbFDawyp7E7fy406ifPRIqEkxlEalOtKuvqF1ie234fKpMROZBIHzHXLB1Qr--DsYW4vJxRVekyRBu--/K7izllLl/6xze9Jmy2dPw==
22 changes: 22 additions & 0 deletions render.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
databases:
- name: activeadmin-demo-test-db
databaseName: mysite
user: activeadmin-demo-test
plan: free

services:
- type: web
name: activeadmin-demo-test
runtime: ruby
plan: free
buildCommand: "./bin/render-build.sh"
startCommand: "./bin/rails server"
envVars:
- key: DATABASE_URL
fromDatabase:
name: mysite
property: connectionString
- key: RAILS_MASTER_KEY
sync: false
- key: WEB_CONCURRENCY
value: 2 # sensible default

0 comments on commit e796aa5

Please sign in to comment.