-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
113 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# How to Deploy CuttingEdge on Heroku | ||
|
||
**Note: on Heroku, CuttingEdge uses `heroku.config.rb` instead of `config.rb`**. | ||
|
||
**Note: if you will be using a public GitHub or GitLab repo to host your CuttingEdge configuration, make sure not to put any secrets in `heroku.config.rb` or `projects.yaml`.** Instead, use [environment variables](https://render.com/docs/environment-variables) (for instance to [set authentication tokens](https://github.com/repotag/cutting_edge/blob/main/README.md#Authorization-and-private-repositories)). | ||
|
||
Steps: | ||
|
||
1. Fork and clone this repository locally | ||
1. Move `Procfile` from the `heroku` subdirectory into the repository root and commit. | ||
1. Move the sample `heroku.config.rb` from the `heroku` subdirectory into the repository. | ||
1. Edit `heroku.config.rb` to suit your needs and commit. | ||
1. Edit `projects.yml` to suit your needs and commit it to the repo. | ||
1. `gem install bundler && bundle install` | ||
2. `git add Gemfile.lock && git commit -m "Commit Gemfile.lock for use on Heroku" | ||
3. `heroku create my-cuttingedge` | ||
4. `heroku config:add HEROKU_APP_NAME=my-cuttingedge` | ||
5. `heroku addons:create heroku-redis:hobby-dev -a my-cuttingedge` (using Redis is highly recommended on Heroku) | ||
6. `git push heroku master` | ||
7. *Optional, if you want to receive [email notifications](#Email-Notifications)*: | ||
* `heroku addons:create mailgun:starter` | ||
* `heroku config:add CUTTING_EDGE_MAIL_TO=mydependencies@mydependencymonitoring.com` | ||
|
||
You may also want to set some [Heroku config variables](https://devcenter.heroku.com/articles/config-vars), for instance to [use authentication tokens](#Authorization-and-private-repositories) in `heroku.config.rb`. |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Example settings for deployment on render.com | ||
|
||
module CuttingEdge | ||
SERVER_HOST = "#{ENV['RENDER_EXTERNAL_HOSTNAME']}" # At what domain is this CuttingEdge instance running? | ||
SERVER_URL = "https://#{SERVER_HOST}" | ||
|
||
if ENV['REDIS_HOST'] # If redis is defined in your render.yaml, this will automatically use it. | ||
require 'moneta' | ||
require 'openssl' | ||
redis_url = "redis://#{ENV['REDIS_HOST']}" | ||
redis_url = "#{redis_url}:#{ENV['REDIS_PORT']}" if ENV['REDIS_PORT'] | ||
STORE = ::Moneta.new(:Redis, | ||
url: redis_url, | ||
ssl_params: { | ||
verify_mode: OpenSSL::SSL::VERIFY_NONE | ||
} | ||
) | ||
end | ||
|
||
# Your additional configuration goes here. | ||
# See for options: https://github.com/repotag/cutting_edge/blob/main/config.rb | ||
# If you are going to host the repository containing this file publically (e.g. on GitHub), please read: | ||
# https://github.com/repotag/cutting_edge/blob/master/README.md#Defining-repositories-in-configrb | ||
end | ||
|
||
# Needed to write to Render logs. | ||
::SemanticLogger.add_appender(io: $stderr) | ||
|
||
# Configure mail server settings if desired: | ||
|
||
# require 'mail' | ||
# Mail.defaults do | ||
# delivery_method :smtp, address: '', port: 587, user_name: '', password: '', enable_ssl: true, domain: 'my-cuttingedge.render.com' | ||
# end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Blueprint for use with render.com: https://render.com/docs/blueprint-spec | ||
# Update name below: the instance will be deployed to https://$name.onrender.com | ||
# Modify projects.yml and render.config.rb in your repo, or add them as secret files via the render.com Dashboard | ||
|
||
services: | ||
- type: web | ||
env: ruby | ||
name: my-cuttingedge | ||
buildCommand: bundle install | ||
startCommand: bundle exec cutting_edge -p $PORT --config render.config.rb | ||
plan: free | ||
envVars: | ||
- key: PORT | ||
value: 4567 | ||
- key: REDIS_HOST | ||
fromService: | ||
type: redis | ||
name: ce-redis | ||
property: host | ||
- key: REDIS_PORT | ||
fromService: | ||
type: redis | ||
name: ce-redis | ||
property: port | ||
- type: redis | ||
name: ce-redis | ||
ipAllowList: [] | ||
plan: free |