File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -270,6 +270,8 @@ jobs:
270270 Azure__Location : ${{ env.AZURE_LOCATION }}
271271 ConnectionStrings__openai : ${{ secrets.OPENAI_CONNECTION_STRING }}
272272 Parameters__jwt-key : ${{ secrets.JWT_KEY }}
273+ Parameters__customDomain : learnaspire.dev
274+ Parameters__certificateName : ${{ secrets.ACA_CERT_NAME }}
273275 run : aspire deploy --non-interactive --clear-cache
274276 timeout-minutes : 20
275277
@@ -288,17 +290,17 @@ jobs:
288290 - name : Smoke test
289291 if : steps.url.outputs.url != ''
290292 run : |
291- echo "Running smoke test against ${{ steps.url.outputs.url }} ..."
293+ echo "Running smoke test against https://learnaspire.dev ..."
292294 for i in {1..5}; do
293- STATUS=$(curl -s -o /dev/null -w "%{http_code}" "${{ steps.url.outputs.url }} /health" --max-time 15 || echo "000")
295+ STATUS=$(curl -s -o /dev/null -w "%{http_code}" "https://learnaspire.dev /health" --max-time 15 || echo "000")
294296 if [[ "$STATUS" == "200" ]]; then
295- echo "✓ Health check passed (attempt $i)"
297+ echo "✓ Health check passed on learnaspire.dev (attempt $i)"
296298 exit 0
297299 fi
298300 echo " Attempt $i: got $STATUS, retrying in 15s..."
299301 sleep 15
300302 done
301- echo "::warning::Smoke test did not get 200 from /health after 5 attempts"
303+ echo "::warning::Smoke test did not get 200 from learnaspire.dev /health after 5 attempts"
302304
303305 - name : Update GitHub Release with deploy info
304306 if : startsWith(github.ref, 'refs/tags/v') && steps.url.outputs.url != ''
Original file line number Diff line number Diff line change 22#: package Aspire . Hosting. Azure. PostgreSQL@13 . *
33#: package Aspire . Hosting . Azure . AppContainers @13 . *
44#: package Aspire . Hosting . JavaScript @13 . *
5- #: property NoWarn = ASPIRECSHARPAPPS001
5+ #: property NoWarn = ASPIRECSHARPAPPS001 ; ASPIREACADOMAINS001
66
77#pragma warning disable ASPIREPUBLISHERS001 // Azure publishers are in preview
88
1919var postgres = postgresServer . AddDatabase ( "academydb" ) ;
2020var openai = builder . AddConnectionString ( "openai" ) ;
2121
22+ // Custom domain parameters (used only during publish/deploy)
23+ var customDomain = builder . AddParameter ( "customDomain" ) ;
24+ var certificateName = builder . AddParameter ( "certificateName" ) ;
25+
2226// API backend
2327var api = builder . AddCSharpApp ( "api" , "./AspireAcademy.Api/" )
2428 . WithReference ( postgres )
2529 . WithReference ( openai )
2630 . WaitFor ( postgres )
2731 . WithHttpHealthCheck ( "/health" )
28- . WithExternalHttpEndpoints ( ) ;
32+ . WithExternalHttpEndpoints ( )
33+ . PublishAsAzureContainerApp ( ( infra , app ) =>
34+ {
35+ app . ConfigureCustomDomain ( customDomain , certificateName ) ;
36+ } ) ;
2937
3038if ( builder . ExecutionContext . IsRunMode )
3139{
You can’t perform that action at this time.
0 commit comments