-
-
Notifications
You must be signed in to change notification settings - Fork 8
How to deploy FairPlayCombined?
Before reading this page, it is recommended you first read the official .NET Aspire Deployment Documentation
Follow the following first How-to-setup-FairPlayCombined
- Create an Azure SQL Database, given that the platform uses background service, which are querying the database very often, it is recommended you use a DTU-based database.
- Configure the database server to allow connections from other Azure Resources.
- Save the connectionstring to use it later.
- Make sure to install Azure Developer CLI by, you can do it by running the following in a command prompt:
winget install microsoft.azd
-
Make sure to configure your secrets.json with all the required secrets and enable only the projects you want deployed.
-
In the same command prompt navigate to the directory containing the file "GenerateAspireManifest.bat". This file is to create a deployment manifest if desired, for now, just ignore it.
-
Run azd init, it will ask you a name, this is the name that will be used for your new Azure Resource Group, make sure to use one that does not exist yet.
-
Run azd up, the process will request your subscription, the region and the database connectionstring, fill the values.
-
Once the process finishes it will give show your .NET Aspire Dashboard Url, if it loads correctly, your deployment is successful.
Note: Before running any of the main apps, you must do the following
- Navigate to the Admin Portal.
- Register a new user
- Manually set that user rule to be "SystemAdmin", through an sql script.
- Log in to the admin portal with your admin user.
- Navigate to the Configure Secrets page, and input all of the configuration values.
- Once that's done you should be able to run the main apps.
Note: You may need to restart the VideoIndexing service, since it would probably have failed trying to find the configuration secrets before you add them.
Real World production applications often have custom domains, you can configure it through the Azure Portal. Follow the Azure documentation to configure them:
Custom domain names and bring your own certificates in Azure Container Apps
Note: If you use Custom Domains, and re-deploy your app, the deployment process will delete the custom domains. See the following GitHub items:
- Which is the correct way to do subsequent deployments?
- Custom domain name for Container app
- [ACA] Persist current custom domain
According to the threads, for now, you should be able to persist your custom domains using the following command before re-deploying your app. Check if you have an azd version supporting the feature flag
- Run
azd list-alpha
If persistDomains does not show in the list, then proceed to install this version of the CLI. Azure Dev CLI Install Instructions
- Now run
azd config set alpha.aca.persistDomains on
Now custom domains should persist after re-deployments.
If you upload videos and try to play them after from the Home Page, you may get a CORS error on the Storage Account supporting your Azure Video Indexer Account. To fix the issue, you need enable CORS in the Storage Account:
- Allowed origins: https://*.yourdomain
- Allowed methods: GET
If some applications, such as FairPlayTube, you may get an error like the one in the image below.
If you get that error, enable Session Affinity in your Container App. For now, this process must be done manually. To stay updated on progress for this within .NET Aspire see this GitHub Issue and comment
If you run the app, you may notice some text shows the values of the Resource Keys. To fix this, make sure to run the "LocalizationGenerator" service from your development environment. The service will inspect the code for the Resource Keys and translate them. This process needs to be executed only in two situations:
- Initial Setup
- New Resource Keys Added
Fund the project today: Become a GitHub Sponsor
- Home
- Business Ideas
- Who Could Benefit from the "FairPlay" platform?
- Technical Information
- Developers Guides
- FairPlayCombined Applications
- FairPlayDating
- FairPlayTube
- How to setup FairPlayCombined?
- How to deploy FairPlayCombined?
- How to troubleshoot FairPlayCombined?
- Tutorials
- Entrepreneurship Guides
- Improve Your Website SEO
- Upgrading Strategy