Deploy to Render.com

Introduction

Recently got very frustrated trying to do a simple task… Deploy my very basic Redwood app to Render.com.
In my opinion, Render.com doesn’t support RedwoodJS as Redwood relies on YARN 2.

Referenced resource as to Render not supporting YARN 2 yet: Support for Yarn 2 workspaces - Render

Identified Workaround

After following the documentation with Render as the target Deploy to Render | RedwoodJS Docs update the Web Side in the Redwood.yaml file to reflect the following. Not the build command has been altered.

- name: app-name
  type: web
  env: static
  buildCommand: cd web && yarn install && cd .. && yarn rw build web
  staticPublishPath: ./web/dist
  envVars:
  - key: NODE_VERSION
    value: 16
  - key: SKIP_INSTALL_DEPS
    value: true
  routes:
  - type: rewrite
    source: /.redwood/functions/*
#####
# NOTE: replace destination api url after first deploy to Render
# example:
#   destination: https://myredwoodproject-api.onrender.com/*
#####
    destination: https://absolute-stingray.onrender.com/*
  - type: rewrite
    source: /*
    destination: /index.html