Skip to content

Commit

Permalink
Add bundled configuration for Render (#431)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushn21 authored Oct 27, 2021
1 parent 470b541 commit 1ca4e75
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
8 changes: 8 additions & 0 deletions bridgetown-core/lib/bridgetown-core/configurations/render.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# frozen_string_literal: true

TEMPLATE_PATH = File.expand_path("./render", __dir__)

@render_service_name = ask "What would like to call your Render service?"
template "#{TEMPLATE_PATH}/render.yaml.erb", "render.yaml"

say "All done. Just create a new blueprint from the Render dashboard and connect this repo."
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
services:
- type: web
name: <%= @render_service_name %>
env: static
buildCommand: bin/bridgetown deploy
staticPublishPath: ./output
pullRequestPreviewsEnabled: true
headers:
- path: /*
name: X-Frame-Options
value: DENY
- path: /*
name: X-XSS-Protection
value: "1; mode=block"
- path: /*
name: X-Content-Type-Options
value: "nosniff"
- path: /*
name: Strict-Transport-Security
value: "max-age=15552000; includeSubDomains"
- path: /*
name: Referrer-Policy
value: "no-referrer-when-downgrade"
- path: /*
name: Cache-Control
value: "public, max-age=86400, s-max-age=86400"
11 changes: 11 additions & 0 deletions bridgetown-website/src/_docs/bundled-configurations.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ The configurations we include are:
- [Stimulus](#stimulus) (`stimulus`)
- [Turbo](#turbo) (`turbo`)
- [Bridgetown recommended PostCSS plugins](#bridgetown-recommended-postcss-plugins) (`bt-postcss`)
- [Render YAML Configuration](#render-yaml-configuration) (`render`)
- [Netlify TOML Configuration](#netlify-toml-configuration) (`netlify`)
- [Swup.js Page Transitions](#swupjs-page-transitions) (`swup`)
- [Automated Test Suite using Minitest](#automated-test-suite-using-minitest) (`minitesting`)
Expand Down Expand Up @@ -93,6 +94,16 @@ bin/bridgetown configure bt-postcss
```
If you'd like to customize your setup further you can find more plugins [here](https://www.postcss.parts).
### Render YAML Configuration
⚙️ Adds a static site service defined in YAML to your site for use in [Render](https://render.com) deployments.
🛠 **Configure using:**
```
bin/bridgetown configure render
```
### Netlify TOML Configuration
⚙️ Adds a basic configuration to your site for use in [Netlify](https://netlify.com) deployments.
Expand Down

0 comments on commit 1ca4e75

Please sign in to comment.