-
-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(templates): improve sample pipelines of Boilerplate project temp…
- Loading branch information
Showing
6 changed files
with
52 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Admin Sample CD | |
# Project templates come equipped with CI/CD for both Azure DevOps and GitHub, providing you with a hassle-free way to get started with your new project. It is important to note that you should not depend on the contents of this file. More info at https://bitplatform.dev/templates/dev-ops | ||
|
||
env: | ||
API_SERVER_ADDRESS: 'https://adminpanel.bitplatform.dev/' | ||
API_SERVER_ADDRESS: 'https://adminpanel.bitplatform.dev' | ||
APP_SERVICE_NAME: 'bit-adminpanel' | ||
|
||
on: | ||
|
@@ -35,9 +35,9 @@ jobs: | |
cd src/Templates/Boilerplate && dotnet build -c Release | ||
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 | ||
dotnet new install Bit.Boilerplate.0.0.0.nupkg | ||
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --serverUrl adminpanel.bitplatform.dev --filesStorage AzureBlobStorage | ||
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --serverUrl ${{ env.API_SERVER_ADDRESS }} --filesStorage AzureBlobStorage | ||
- name: Update appsettings.json api server address | ||
- name: Update core appsettings.json | ||
uses: devops-actions/[email protected] | ||
with: | ||
files: 'AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json' | ||
|
@@ -63,7 +63,6 @@ jobs: | |
- name: Generate CSS/JS files | ||
run: dotnet build AdminPanel/src/Client/AdminPanel.Client.Core/AdminPanel.Client.Core.csproj -t:BeforeBuildTasks -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" --no-restore -c Release | ||
|
||
- name: Publish | ||
run: dotnet publish AdminPanel/src/AdminPanel.Server/AdminPanel.Server.csproj -c Release -p:PwaEnabled=true -p:PublishTrimmed=true -p:TrimMode=partial -p:JsonSerializerIsReflectionEnabledByDefault=true --self-contained -r linux-x64 -o ${{env.DOTNET_ROOT}}/server -p:Version="${{ vars.APPLICATION_DISPLAY_VERSION}}" | ||
|
||
|
@@ -137,9 +136,9 @@ jobs: | |
cd src\Templates\Boilerplate && dotnet build -c Release | ||
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 | ||
dotnet new install Bit.Boilerplate.0.0.0.nupkg | ||
cd ..\..\..\ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --windows --appInsights --appCenter --serverUrl adminpanel.bitplatform.dev --filesStorage AzureBlobStorage | ||
cd ..\..\..\ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --windows --appInsights --appCenter --serverUrl ${{ env.API_SERVER_ADDRESS }} --filesStorage AzureBlobStorage | ||
- name: Update appsettings.json api server address | ||
- name: Update core appsettings.json | ||
uses: devops-actions/[email protected] | ||
with: | ||
files: 'AdminPanel\src\Client\AdminPanel.Client.Core\appsettings.json' | ||
|
@@ -198,7 +197,7 @@ jobs: | |
cd src/Templates/Boilerplate && dotnet build -c Release | ||
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 | ||
dotnet new install Bit.Boilerplate.0.0.0.nupkg | ||
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --appCenter --serverUrl adminpanel.bitplatform.dev --filesStorage AzureBlobStorage | ||
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --appCenter --serverUrl ${{ env.API_SERVER_ADDRESS }} --filesStorage AzureBlobStorage | ||
- uses: actions/setup-node@v4 | ||
with: | ||
|
@@ -211,7 +210,7 @@ jobs: | |
fileName: 'AdminPanel.keystore' | ||
encodedString: ${{ secrets.ANDROID_RELEASE_KEYSTORE_FILE_BASE64 }} | ||
|
||
- name: Update appsettings.json api server address | ||
- name: Update core appsettings.json | ||
uses: devops-actions/[email protected] | ||
with: | ||
files: 'AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json' | ||
|
@@ -270,9 +269,9 @@ jobs: | |
cd src/Templates/Boilerplate && dotnet build -c Release | ||
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 | ||
dotnet new install Bit.Boilerplate.0.0.0.nupkg | ||
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --appCenter --serverUrl adminpanel.bitplatform.dev --filesStorage AzureBlobStorage | ||
cd ../../../ && dotnet new bit-bp --name AdminPanel --database PostgreSQL --sample Admin --appInsights --appCenter --serverUrl ${{ env.API_SERVER_ADDRESS }} --filesStorage AzureBlobStorage | ||
- name: Update appsettings.json api server address | ||
- name: Update core appsettings.json | ||
uses: devops-actions/[email protected] | ||
with: | ||
files: 'AdminPanel/src/Client/AdminPanel.Client.Core/appsettings.json' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Todo Sample CD | |
# Project templates come equipped with CI/CD for both Azure DevOps and GitHub, providing you with a hassle-free way to get started with your new project. It is important to note that you should not depend on the contents of this file. More info at https://bitplatform.dev/templates/dev-ops | ||
|
||
env: | ||
API_SERVER_ADDRESS: 'https://todo.bitplatform.dev/' | ||
API_SERVER_ADDRESS: 'https://todo.bitplatform.dev' | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -38,9 +38,9 @@ jobs: | |
cd src/Templates/Boilerplate && dotnet build -c Release | ||
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 | ||
dotnet new install Bit.Boilerplate.0.0.0.nupkg | ||
cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample Todo --appInsights --serverUrl todo.bitplatform.dev --filesStorage AzureBlobStorage | ||
cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample Todo --appInsights --serverUrl ${{ env.API_SERVER_ADDRESS }} --filesStorage AzureBlobStorage | ||
- name: Update appsettings.json api server address | ||
- name: Update core appsettings.json | ||
uses: devops-actions/[email protected] | ||
with: | ||
files: 'TodoSample/src/Client/TodoSample.Client.Core/appsettings.json' | ||
|
@@ -152,9 +152,9 @@ jobs: | |
cd src\Templates\Boilerplate && dotnet build -c Release | ||
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 | ||
dotnet new install Bit.Boilerplate.0.0.0.nupkg | ||
cd ..\..\..\ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample Todo --windows --appInsights --appCenter --serverUrl todo.bitplatform.dev --filesStorage AzureBlobStorage | ||
cd ..\..\..\ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample Todo --windows --appInsights --appCenter --serverUrl ${{ env.API_SERVER_ADDRESS }} --filesStorage AzureBlobStorage | ||
- name: Update appsettings.json api server address | ||
- name: Update core appsettings.json | ||
uses: devops-actions/[email protected] | ||
with: | ||
files: 'TodoSample\src\Client\TodoSample.Client.Core\appsettings.json' | ||
|
@@ -217,7 +217,7 @@ jobs: | |
cd src/Templates/Boilerplate && dotnet build -c Release | ||
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 | ||
dotnet new install Bit.Boilerplate.0.0.0.nupkg | ||
cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample Todo --appInsights --appCenter --serverUrl todo.bitplatform.dev --filesStorage AzureBlobStorage | ||
cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample Todo --appInsights --appCenter --serverUrl ${{ env.API_SERVER_ADDRESS }} --filesStorage AzureBlobStorage | ||
- name: Extract Android signing key from env | ||
uses: timheuer/[email protected] | ||
|
@@ -226,7 +226,7 @@ jobs: | |
fileName: 'TodoSample.keystore' | ||
encodedString: ${{ secrets.ANDROID_RELEASE_KEYSTORE_FILE_BASE64 }} | ||
|
||
- name: Update appsettings.json api server address | ||
- name: Update core appsettings.json | ||
uses: devops-actions/[email protected] | ||
with: | ||
files: 'TodoSample/src/Client/TodoSample.Client.Core/appsettings.json' | ||
|
@@ -305,9 +305,9 @@ jobs: | |
cd src/Templates/Boilerplate && dotnet build -c Release | ||
dotnet pack -c Release -o . -p:ReleaseVersion=0.0.0 -p:PackageVersion=0.0.0 | ||
dotnet new install Bit.Boilerplate.0.0.0.nupkg | ||
cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample Todo --appInsights --appCenter --serverUrl todo.bitplatform.dev --filesStorage AzureBlobStorage | ||
cd ../../../ && dotnet new bit-bp --name TodoSample --database PostgreSQL --sample Todo --appInsights --appCenter --serverUrl ${{ env.API_SERVER_ADDRESS }} --filesStorage AzureBlobStorage | ||
- name: Update appsettings.json api server address | ||
- name: Update core appsettings.json | ||
uses: devops-actions/[email protected] | ||
with: | ||
files: 'TodoSample/src/Client/TodoSample.Client.Core/appsettings.json' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ jobs: | |
# - name: Enable pre rendering | ||
# run: sed -i 's/public static readonly bool PrerenderEnabled = false;/public static readonly bool PrerenderEnabled = true;/g' src/Client/Boilerplate.Client.Core/Services/AppRenderMode.cs | ||
|
||
- name: Update appsettings.json api server address | ||
- name: Update core appsettings.json | ||
uses: devops-actions/[email protected] | ||
with: | ||
files: 'src/Client/Boilerplate.Client.Core/appsettings.json' | ||
|
@@ -143,7 +143,7 @@ jobs: | |
with: | ||
node-version: 20 | ||
|
||
- name: Update appsettings.json api server address | ||
- name: Update core appsettings.json | ||
uses: devops-actions/[email protected] | ||
with: | ||
files: 'src\Client\Boilerplate.Client.Core\appsettings.json' | ||
|
@@ -204,7 +204,7 @@ jobs: | |
fileName: 'Boilerplate.keystore' | ||
encodedString: ${{ secrets.ANDROID_RELEASE_KEYSTORE_FILE_BASE64 }} | ||
|
||
- name: Update appsettings.json api server address | ||
- name: Update core appsettings.json | ||
uses: devops-actions/[email protected] | ||
with: | ||
files: 'src/Client/Boilerplate.Client.Core/appsettings.json' | ||
|
@@ -256,7 +256,7 @@ jobs: | |
with: | ||
node-version: 20 | ||
|
||
- name: Update appsettings.json api server address | ||
- name: Update core appsettings.json | ||
uses: devops-actions/[email protected] | ||
with: | ||
files: 'src/Client/Boilerplate.Client.Core/appsettings.json' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,26 +4,30 @@ | |
//#if (database == "SqlServer") | ||
"SqlServerConnectionString": "Data Source=(localdb)\\mssqllocaldb; Initial Catalog=BoilerplateDb;Integrated Security=true;Application Name=Boilerplate;TrustServerCertificate=True;", | ||
//#elif (database == "Sqlite") | ||
"SqliteConnectionString": "Data Source=App_Data/BoilerplateDb.db;", // To debug inside docker, change launchSettings.json | ||
"SqliteConnectionString": "Data Source=App_Data/BoilerplateDb.db;", | ||
"SqliteConnectionString_Comment": "To debug inside docker, change ConnectionStrings__SqliteConnectionString's value in launchSettings.json", | ||
//#elif (database == "PostgreSQL") | ||
"PostgreSQLConnectionString": "User ID=postgres;Password=123456;Host=localhost;Database=BoilerplateDb;", | ||
//#endif | ||
//#if (filesStorage == "AzureBlobStorage") | ||
"AzureBlobStorageSasUrl": "emulator" // https://learn.microsoft.com/en-us/azure/ai-services/translator/document-translation/how-to-guides/create-sas-tokens?tabs=blobs#create-sas-tokens-in-the-azure-portal | ||
"AzureBlobStorageSasUrl": "emulator", | ||
"AzureBlobStorageSasUrl_Comment": "More info about blob storage sas url at https://learn.microsoft.com/en-us/azure/ai-services/translator/document-translation/how-to-guides/create-sas-tokens?tabs=blobs#create-sas-tokens-in-the-azure-portal" | ||
//#endif | ||
}, | ||
"DataProtectionCertificatePassword": "P@ssw0rdP@ssw0rd", // It can also be configured using: dotnet user-secrets set "DataProtectionCertificatePassword" "P@ssw0rdP@ssw0rd" | ||
"DataProtectionCertificatePassword": "P@ssw0rdP@ssw0rd", | ||
"DataProtectionCertificatePassword_Comment": "It can also be configured using: dotnet user-secrets set 'DataProtectionCertificatePassword' 'P@ssw0rdP@ssw0rd'", | ||
"AppSettings": { | ||
"Identity": { | ||
"Issuer": "Boilerplate", | ||
"Audience": "Boilerplate", | ||
"RefreshTokenExpiration": "14.00:00:00", // Format: D.HH:mm:ss | ||
"BearerTokenExpiration": "0.01:00:00", // Used as jwt's expiration claim, access token's expires in and cookie's max age. Format: D.HH:mm:ss | ||
"EmailTokenRequestResendDelay": "0.00:02:00", // Format: D.HH:mm:ss | ||
"PhoneNumberTokenRequestResendDelay": "0.00:02:00", // Format: D.HH:mm:ss | ||
"ResetPasswordTokenRequestResendDelay": "0.00:02:00", // Format: D.HH:mm:ss | ||
"TwoFactorTokenRequestResendDelay": "0.00:02:00", // Format: D.HH:mm:ss | ||
"OtpRequestResendDelay": "0.00:02:00", // Format: D.HH:mm:ss" | ||
"BearerTokenExpiration": "0.01:00:00", | ||
"BearerTokenExpiration_Comment": "BearerTokenExpiration used as jwt's expiration claim, access token's expires in and cookie's max age. Format: D.HH:mm:ss", | ||
"RefreshTokenExpiration": "14.00:00:00", | ||
"EmailTokenRequestResendDelay": "0.00:02:00", | ||
"PhoneNumberTokenRequestResendDelay": "0.00:02:00", | ||
"ResetPasswordTokenRequestResendDelay": "0.00:02:00", | ||
"TwoFactorTokenRequestResendDelay": "0.00:02:00", | ||
"OtpRequestResendDelay": "0.00:02:00", | ||
"Password": { | ||
"RequireDigit": "false", | ||
"RequiredLength": "6", | ||
|
@@ -36,20 +40,21 @@ | |
} | ||
}, | ||
"Email": { | ||
"Host": "LocalFolder", // Local folder means storing emails as .eml file in App_Data/sent-emails folder (Recommended for testing purposes only) instead of sending them using smtp server. | ||
"Host": "LocalFolder", | ||
"Host_Comment": "Local folder means storing emails as .eml file in App_Data/sent-emails folder (Recommended for testing purposes only) instead of sending them using smtp server.", | ||
"Port": "587", | ||
"DefaultFromEmail": "[email protected]", | ||
"UserName": null, | ||
"Password": null | ||
}, | ||
"Sms": { | ||
"FromPhoneNumber": null, | ||
"AccountSid": null, /* Twilio */ | ||
"AutoToken": null | ||
"TwilioAccountSid": null, | ||
"TwilioAutoToken": null | ||
}, | ||
"UserProfileImagesDir": "attachments/profiles/", | ||
//#if (captcha == "reCaptcha") | ||
"GoogleRecaptchaSecretKey": "6LdMKr4pAAAAANvngWNam_nlHzEDJ2t6SfV6L_DS", | ||
"GoogleRecaptchaSecretKey": "6LdMKr4pAAAAANvngWNam_nlHzEDJ2t6SfV6L_DS" | ||
//#endif | ||
}, | ||
"Authentication": { | ||
|
@@ -68,9 +73,12 @@ | |
}, | ||
//#endif | ||
"AllowedHosts": "*", | ||
"ForwardedHeaders": { // These values apply only if your backend is hosted behind a CDN (such as Cloudflare). | ||
"ForwardedHostHeaderName": "X-Forwarded-Host", // For Cloudflare, use X-Host instead of X-Forwarded-Host. | ||
"ForwardedHeaders": { | ||
"ForwardedHeaders_Comment": "These values apply only if your backend is hosted behind a CDN (such as Cloudflare).", | ||
"ForwardedHostHeaderName": "X-Forwarded-Host", | ||
"ForwardedHostHeaderName_Comment": "For Cloudflare, use X-Host instead of X-Forwarded-Host.", | ||
"ForwardedHeaders": "All", | ||
"AllowedHosts": "*" // Configure this in production with your backend URL host address (See appsettings.Production.json). | ||
"AllowedHosts": "*", | ||
"AllowedHosts_Comment": "Configure this in production with your backend URL host address (See appsettings.Production.json)" | ||
} | ||
} |