Hello StrapiConf!
This workshop will take you through the steps of building a production-ready Strapi instance on Platform.sh.
Platform.sh is a second-generation Platform-as-a-Service built especially for continuous deployment. It allows you to host web applications on the cloud while making your development and testing workflows more productive.
During this workshop, we will be using Strapi's FoodAdvisor demo as a starting point. The backend there has been modified slightly to deploy on Platform.sh using SQLite3 as it's primary database.
From there, we will progressively add more of Platform.sh's managed services, exploring how configuration and deployments work along the way.
Before the conference, you should take the time to deploy this repository on Platform.sh and create a free trial account. It doesn't take long, all you need to do is click the button below to start.
The button above will allow you to start a free trial account, give you access to the Platform.sh management console, and create your first project initialized with this repository. It has been configured to deploy automatically, and to seed data so that you can start working with real data on Platform.sh right away.
During the workshop we will inspect, modify, and interact with your project on Platform.sh while we set up Strapi. One of the most important tools for doing this is the Platform.sh CLI, so it will be helpful to have it installed before starting.
curl -sS https://platform.sh/cli/installer | php
Note:
In some Windows terminals you may need
php.exe
instead ofphp
.
In order to inspect and communicate with your project from the terminal, you will need to authenticate through the CLI.
In your terminal, run the command platform login
. This command will set up a certificate-based authentication: it will issue a certificate that gets stored in your local SSH configuration, one that will be cycled every hour so long as you have an active session to Platform.sh. This means on the day of the workshop, you will need to run this command again to interact with your project and participate.
Once you're logged in and created your project in step 1, you can view it with the command platform list
. Your project will have a project ID associated with it, and you can further inspect information about the project with the command platform project:info -p PROJECT_ID
Once you have created a project and installed the CLI, you're nearly ready for the workshop. Since you will be modifying the codebase locally throughout, you will need to clone a copy of it on your computer. Using the same project ID in the previous section, run the command:
platform project:get -p PROJECT_ID
Once you have deployed your
During StrapiConf, members of the Platform.sh team will be present on the StrapiConf Discord in the following channels:
#platform-sh-text
#platform-sh-voice
At any time during the conference feel free to message our team for more information about Platform.sh.
During the workshop itself, however, we will use the #platform-sh-workshop
primarily for questions and help. Your primary contacts during the workshop will be Chad Carlson and Robert Douglass.
We will use Zoom as our primary method for going through steps, and breakout rooms for detailed help on individual steps.
Generally, the workshop will have the following parts:
-
Platform.sh introduction:
- a tour of the management console
- the Platform.sh philosophy
- the basics of a project
- the basics of configuration
- the basics of environments
- the basics of the demo/repository
-
Environments and environment variables: enabling e-mail for forgotten passwords.
-
Managed services: adding PostgreSQL, and using it as your primary database.
-
Testing: set up basic testing modifying public permissions, and testing your API using Postman.
-
Managing secrets: using Vault to secure access to your application.
-
Caching: using
strapi-middleware-cache
and Redis for caching. -
Next steps: runtime write access, multi-app projects, and additional resources.
We will guide you through the steps during the workshop, with all code snippets and changes documented in the links above.
Excited to see you at this year's StrapiConf!