Setup the project for development
Sitefinity Cloud has been designed to facilitate custom development and code changes at any time. The platform provides full access to the project’s source code, database backup, as well as an optimal CI/CD setup to enable deployment of custom code.
When setting up and running the project locally, you have to make sure that your system complies with the following requirements:
- Microsoft SQL Server 2014 - 13.0.4001.0 or later
- SQL Server Management Studio (SSMS), 17.4.x or later
The latest two officially supported versions of the following browsers:
|All Microsoft® Visual Studio editions for versions 2015, 2017, and 2019.
Setting up the project code locally
The project’s code files can be accessed from the Management Portal’s Repository tab. You can download the code for local development by cloning the solution locally, and perform the development and testing.
To setup a Sitefinity Cloud project on your local development environment follow these steps:
- Log in to your Sitefinity Cloud instance Management Portal
- Navigate to Repos
- From the branches dropdown, select the project branch you'd like to setup locally, for example master
- Click on the Clone button, located in the upper right corner of the screen, to clone the project Git repository on your local machine. You can clone the repository using the command line or by selecting an IDE you'd like to clone to. For example, to clone the project in Visual Studio, select Clone in Visual Studio option from the IDE dropdown, and specify your Sitefinity Cloud Azure AD credentials when prompted by Visual Studio.
- Restore the project NuGet packages and build the solution.
- Restore the staging/production DB on your local machine. For more information on backing up and restoring Sitefinity Cloud project databases refer to the Backup and restore the project database article.
- Change the connection string in the web.config file to point to the local copy of the project database on your SQL server.
- Create a new IIS website
- Point the physical path of the website to the folder of the locally cloned project.
- Create an http binding with your website development domain, for example wwwdev.your-website-domain.com.
- Create an entry in your hosts file for your website development domain, for example wwwdev.your-website-domain.com pointing to the default localhost IP address - 127.0.0.1
- Browse the website at the configured domain. You can use your Azure AD user to authenticate.
On the local environment, developers can connect to a local copy of the database to implement and test their solution.
Deploying code updates
Once the development team is done implementing any code updates on their local environment, they can push the code to a dedicated feature branch and then make a pull request to merge it to the Master branch of the project.
Upon detecting a commit to the Master branch, Sitefinity Cloud triggers an automated build process, and the project is tested against all available tests. Once the tests pass, the code is deployed to the Staging environment, where you can verify the code runs successfully. Then you can promote it to the Production environment. The full process is described in the Code deployment section.
Deploying database changes
In case there are data structure changes, such as creation of a custom field or a dynamic module, they can be promoted from the local environment to the Sitefinity Cloud Staging environment, and from Staging to Production, using the Sitefinity Export for deployment functionality.
NOTE: Executing database queries directly on the Staging and Production databases hosted on Sitefinity Cloud is not supported.