Skip to content

Commit

Permalink
Update deploy-render.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
flybayer authored Sep 18, 2020
1 parent 65057fa commit 05e38d8
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions docs/deploy-render.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,31 @@ sidebar_label: To Render.com
4. Click on the "YAML" menu item, then click the "New from YAML" button
5. Connect your github account then select your blitz app repo
6. Click approve
7. Your server + database will be automatically configured and started. Each git push will trigger a new deploy
7. Go to "Services", click on your new Blitz service, click on "Environment"
8. Click "Add Environment Variable", enter `SESSION_SECRET_KEY` as the name, then click on the "generate" button in the value field. Then click save.
9. Your server + database will be automatically configured and started. Each git push will trigger a new deploy

#### Without database:

Use this `render.yaml`:

```yaml
# render.yaml
services:
- type: web
name: myapp
name: blitzapp
env: node
plan: starter
buildCommand: yarn; blitz build
buildCommand: yarn --frozen-lockfile --prod=false; blitz build
# If you have an out of memory error, change startCommand to "yarn next start"
startCommand: blitz start --production
envVars:
- key: NODE_ENV
value: production
- key: DATABASE_URL
fromDatabase:
name: blitzapp-db
property: connectionString
d
startCommand: blitz start --production -H 0.0.0.0
```
Expand All @@ -31,25 +42,23 @@ services:
Update your `render.yaml` to provide the `DATABASE_URL` environment variable to connect to your database:

```yaml
# render.yaml
services:
- type: web
name: myapp
region: oregon
name: blitzapp
env: node
plan: starter
buildCommand: yarn; blitz db migrate; blitz build
startCommand: blitz start --production -H 0.0.0.0
buildCommand: yarn --frozen-lockfile --prod=false; blitz db migrate; blitz build
# If you have an out of memory error, change startCommand to "yarn next start"
startCommand: blitz start --production
envVars:
- key: NODE_ENV
value: production
- key: DATABASE_URL
fromDatabase:
name: myapp-db
name: blitzapp-db
property: connectionString
databases:
- name: myapp-db
region: oregon
- name: blitzapp-db
plan: starter
```

0 comments on commit 05e38d8

Please sign in to comment.