Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make frontend build and app deploy #1002

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
Loading