Support Portal

Submit a ticket My Tickets
Welcome
Login

Project creation with existing repository

To create a project using Strapi Cloud, there are a few prerequisites that you must first meet.


  • Strapi version must be 4.8.2 or higher, though we recommend using the latest version whenever possible.
  • Project database must be compatible with PostgreSQL. Strapi does not support and does not recommend using any external databases, though it's possible to configure one (see advanced database configuration).
  • Project(s) source code hosted on GitHub. The connected repository can contain multiple Strapi applications. Each Strapi app must be in a separate directory.


Once the prerequisites are met, creating a project can be done by following the steps as outlined in the Cloud documentation.


Advanced repository configuration


Depending on your needs, you might need to configure your base directory, and/or environment variables. 


When following the setup wizard, at the point when you select your GitHub repository, there is an option to "Show advanced settings". Click this, and an option to edit the base directory and add environment variables will appear.


Both the base directory, and the environment variables can be added or edited after project creation, as needed.


Editing base directory


If your Strapi project is not at the root of your GitHub repository, you will need to "point" Strapi Cloud to the correct base directory. After you have clicked on "Show advanced settings", you will be presented with an option to set your base directory. 


Write the name of the directory where your Strapi app is located in the repository. This is useful if you have multiple Strapi apps in the same repository or if you have a monorepo.


To edit the base directory after project creation, click on the project name from the Cloud Dashboard "Projects" page, and then click "Settings". 


Under "General" if you click the "Edit" button in the "Connected git repository" section, you will have the ability to change the base directory.


Adding environment variables


The steps to add environment variables to your project are the same as above. Clicking on "Show advanced settings" will present you with an option to add your own environment variables.


Click on "Add variable" to add environment variables used to configure your Strapi app (see Environment variables for more information). You can also add environment variables to your Strapi application by adding a .env file to the root of your Strapi app directory. The environment variables defined in the .env file will be used by Strapi Cloud.


To add or edit environment variables after project creation, click on the project name from the Cloud Dashboard "Projects" page, and then click "Settings".

Under "Variables" you will have the option to add or remove environment variables.



For further detail and step-by-step instruction on project creation, advanced configurations or templates, please consult our Cloud Documentation here.




K
Kellen is the author of this solution article.

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.