This post assumes that you have already installed the Strapi backend on your local machine. If you have not, you can do that by following the instructions on the link below.
Install strapi and create new project
After installation, create a new user and create your collections.
In your command line navigate to the root folder and initialize git and push to remote origin. If you do not know how to go about it, you can do so following the instruction below.
Adding locally hosted code to GitHub
login to render and click on the new button
Select Web Service.
Connect to your GitHub or GitLab Account. and click on the connect button beside the repo you selected
Enter a unique name for your web service
Change the start command from yarn start
to yarn develop
. this is to enable you create collection on the production environment
Leave every other thing as is and click on create Web Service.
Select Environment from the left navigation pane and click on the Add Secret File button
enter the file name as .env, click on the eye icon
copy the content of the .env file in your root folder on local and paste it in the textarea.
change the value of DATABASE_FILENAME to /data/strapi.db from .tmp/data.db
click on done
Click on the save changes button.
Click on Events on the left navigation pane to monitor your deployment.
Select the deployment by clicking on the deploy text.
the log should display like this when the deployment is done.
Top comments (0)