To ensure the application is configured correctly, the web service's configuration settings are required.
A brief explanation of each setting is given below.
A name is chosen to help identify the deployment. This will be listed in the Render dashboard overview.
The name chosen will form part of the deployed URL. If the name is unique on Render.com, the resulting URL will be <name>.onrender.com
. If the name is not unique, a random hash with be appended to the name given, e.g. <name>-3yk1.onrender.com
The root directory of the project and its content. This can be edited if required, but usually it will remain blank, thus indicating the root directory of the repository is the same as the root directory of the web service.
The branch that the service should be deployed from. This will often be main
(or master
for older repositories) but is configurable to any public branch within the repository.
This is the command that is executed when the deployment build is initiated. The command instructs the yarn package to be built in the environment. yarn
is an alternative to npm
.
This is the relative path of the directory containing built assets to publish. The directory is created when the yarn build
command is run.
Add a Name
If the name is _not_ unique, a random hash with be appended to the name given, e.g. <name>-3yk1.onrender.com
Ensure the following settings match
Setting Name | Value |
---|---|
Root Directory | blank |
Branch | main You can deploy from a different branch if required. |
Set the Build Command
yarn build
Set the Publish directory
build
Click “Create Static Site”
Due to the nature of a React application, some Redirect/Rewrite rules are required to ensure everything works correctly. The next page will guide you through the process of configuring them.