-
Notifications
You must be signed in to change notification settings - Fork 4
Deployment
Follow these instructions to deploy the functions to Azure Functions:
- Use Visual Studio 2019 Version 16.0 or above
- Create a Azure Function App. You might create the Function App following a Consumption Plan or inside an App Service Plan. If you have already an App Service Plan in place this option is probably the best for you. The Function App must be configured to run on Windows and using .NET stack.
- From Visual Studio publish the project to the Function App created before.
The following application settings ared used:
- COSMOS_DB_CONNECTION_STRING - Connection to access Cosmos DB
- COSMOS_DB_DATABASE - Cosmos DB database, e.g. "meetupplannerdb"
- COSMOS_DB_CONTAINER - Cosmos DB collection, e.g. "myclub"
- OpenApi__ApiKey - Host key of functions app. Needed for OpenApi and Swagger endpoints
- InviteGuestKey - Key used for registration of guests, should be a GUID or something else complex.
- NotificationKey - Key generated to send Web-Push notifications (see below)
As storage layer a Cosmos DB database is needed. The smallest size (shared) for a club should be good enough. Important: Enable the "Time to Live" feature to "On(no default)" in the settings of the container used (see configuration above). This feature is needed for the automatic deletion of meetup and participant data after the configured time.
To install the web frontend follow these instructions:
- Use Visual Studio 2019 Version 16.0 or above
- Create a Azure Web App
- From Visual Studio publish the project "MeetUpPlanner.Server" to the Web App created before.
The following application settings has to be set in "Configuration":
- MeetUpFunctionsConfig:FunctionAppName - The name of the Azure Functions app to be used. E.g. meetupplanner, the address will be meetupplanner.azurewebsites.net
- MeetUpFunctionsConfig:ApiKey - The key to be used to access the functions.
- MeetUpFunctionsConfig:InviteGuestKey - The special key (should be a GUID) that is used to register guests. The same key must be configured for Functions application.
- Enable WebSockets for the Web App. This is used for real-time notifications by SignalR.
The MeetUpPlanner is a PWA ("Progressive Web Application") and uses Web Push notifications (only possible on PC/Android, not yet iOS/Safari). See NotificationSubscriptionRepository.cs in MeetUpPlanner/MeetUpFunctions how this is implemented in the backend. To send notifications a private/public key is needed. This can be generated e.g. here: https://tools.reactpwa.com/vapid. Store the private key in environment as "NotificationKey" (see above). Change in your version the e-mail address used. The public key is also used in MeetUpPlanner/Client/wwwroot/pushNotifications.js.