Skip to content

Commit

Permalink
fix: make frontend build and app deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
aymenfurter committed Jul 13, 2024
1 parent f7aaab3 commit 26f3f49
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 6 deletions.
24 changes: 19 additions & 5 deletions azure.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,20 @@ services:
prepackage:
windows:
shell: pwsh
run: cd ./frontend;npm install;npm run build
run: |
cd ./frontend
npm install
$env:NODE_OPTIONS="--max_old_space_size=8192"
npm run build
interactive: true
continueOnError: false
posix:
shell: sh
run: cd ./frontend;npm install;npm run build
run: |
cd ./frontend
npm install
export NODE_OPTIONS=--max_old_space_size=8192
npm run build
interactive: true
continueOnError: false
hooks:
Expand All @@ -35,11 +43,17 @@ hooks:
postprovision:
windows:
shell: pwsh
run: ./scripts/auth_update.ps1;./scripts/prepdocs.ps1;
run: |
$env:FLAG_AOAI="V2"
./scripts/auth_update.ps1
./scripts/prepdocs.ps1
interactive: true
continueOnError: false
posix:
shell: sh
run: ./scripts/auth_update.sh;./scripts/prepdocs.sh;
run: |
export FLAG_AOAI="V2"
./scripts/auth_update.sh
./scripts/prepdocs.sh
interactive: true
continueOnError: false
continueOnError: false
2 changes: 2 additions & 0 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ module backend 'core/host/appservice.bicep' = {
runtimeVersion: '3.10'
scmDoBuildDuringDeployment: true
managedIdentity: true
appCommandLine: 'python3 -m gunicorn app:app'
authClientSecret: authClientSecret
authClientId: authClientId
authIssuerUri: authIssuerUri
Expand Down Expand Up @@ -137,6 +138,7 @@ module backend 'core/host/appservice.bicep' = {
AZURE_OPENAI_STOP_SEQUENCE: openAIStopSequence
AZURE_OPENAI_SYSTEM_MESSAGE: openAISystemMessage
AZURE_OPENAI_STREAM: openAIStream
DATASOURCE_TYPE: 'AzureCognitiveSearch'
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/prepdocs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
. ./scripts/loadenv.sh

echo 'Running "prepdocs.py"'
./.venv/bin/python ./scripts/prepdocs.py --searchservice "$AZURE_SEARCH_SERVICE" --index "$AZURE_SEARCH_INDEX" --formrecognizerservice "$AZURE_FORMRECOGNIZER_SERVICE" --tenantid "$AZURE_TENANT_ID" --embeddingendpoint "$AZURE_OPENAI_EMBEDDING_ENDPOINT"
./.venv/bin/python ./scripts/prepdocs.py --searchservice "$AZURE_SEARCH_SERVICE" --index "$AZURE_SEARCH_INDEX" --formrecognizerservice "$AZURE_FORMRECOGNIZER_SERVICE" --tenantid "$AZURE_TENANT_ID" --embeddingendpoint "https://$AZURE_OPENAI_RESOURCE.openai.azure.com/openai/deployments/$AZURE_OPENAI_EMBEDDING_NAME/embeddings?api-version=2024-06-01"

0 comments on commit 26f3f49

Please sign in to comment.