diff --git a/bin/render-build.sh b/bin/render-build.sh new file mode 100755 index 0000000000..24b31ca4ac --- /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 \ No newline at end of file diff --git a/render.yaml b/render.yaml new file mode 100644 index 0000000000..e9652c26c5 --- /dev/null +++ b/render.yaml @@ -0,0 +1,58 @@ +services: + - name: git-scm.com + type: web + env: ruby + buildCommand: bin/render-build.sh + startCommand: bundle exec puma -C config/puma.rb + envVars: + - key: REDIS_URL + fromService: + type: redis + name: git-scm-redis + property: connectionString + - key: DATABASE_URL + fromDatabase: + name: git-scm-db + property: connectionString + - fromGroup: git-scm-shared + - name: git-scm-nightly-job + type: cron + env: ruby + schedule: 0 3 * * * + buildCommand: bundle install + startCommand: > + bundle exec rake preindex + && bundle exec rake downloads + && bundle exec rake remote_genbook2 + && bundle exec rake search_index + && bundle exec rake search_index_book + envVars: + - key: REDIS_URL + fromService: + type: redis + name: git-scm-redis + property: connectionString + - key: DATABASE_URL + fromDatabase: + name: git-scm-db + property: connectionString + - fromGroup: git-scm-shared + - name: git-scm-redis + type: redis + ipAllowList: [] + +databases: + - name: git-scm-db + region: oregon + plan: basic-256mb + diskSizeGB: 1 + +envVarGroups: + - name: git-scm-shared + envVars: + - key: SECRET_KEY_BASE + generateValue: true + - key: GITHUB_API_TOKEN + sync: false + - key: BONSAI_URL + sync: false