If possible, please complete these five steps prior to the start of the workshop.
- Click Use this template to create your own copy of this repository
git clone
from your copy of this repository- Run
cd strapiconf2022-workshop-strapi
to go into the cloned directory - Run
yarn install
to install dependencies - Run
cp .env.example .env
to define some environment variables for Strapi for local development. - Run
yarn develop
to start Strapi in development mode - In the
/admin
Strapi GUI, create your admin account. Note that this is only for Strapi running on your local development machine. We will create another admin user for the production deploy. - In the Content-Type Builder, review Tip content type that's been created for you
- In Content Manager, click Create new entry to create some sample data -- your first Productivity Tip!
- You're now done with set up of the Strapi app for local development. Follow the steps in https://github.com/render-examples/strapiconf2022-workshop-remix#README to set up the Remix app for local development.
Complete the steps above, including step 9, before proceding with these steps.
- Edit the two
repo:
lines in therender.yaml
in your copy of this repository. The first one -- your Strapi API -- should be the GitHub URL of your copy of this repository. The second one -- your Remix app -- should be the GitHub URL of your Remix repository. git add render.yaml
,git commit
andgit push
your changes.- Login to the Render Dashboard.
- Click New --> Blueprint.
- Paste the URL of your copy of this repository, and click the resolved repository. If you have not already, you will need to connect your GitHub account with Render.
- Provide a name for your Service Group.
- Provide a value for each of the three Cloudinary environment variables. Copy them from your Cloudinary dashboard.
- Click Apply.
- When the productivity-tips-api deploy is finished, go to its
.onrender.com
URL and append/admin
to it to view the Strapi Admin GUI. You'll need to create an admin user after the first deploy to Render. - Then create an API Token: Settings --> API Tokens --> Create new API Token. This will be used by your Remix app to make secure API requests to Strapi.
- In the Render Dashboard, click on your Remix service. It may still be deploying, but that's ok. Then in Environment, click Add Environment Variable.
- Set the Key as
STRAPI_API_TOKEN
and paste in the Strapi API token you generated as the Value. - Click Save Changes, and your Remix app will redeploy using this new value.
- While the Remix redeploy is happening, go back to your production Strapi Admin GUI (at
/admin
of your Strapi service.onredner.com
URL) and add some productivity tips so that there is some data for the Remix app to display.