Skip to content

Commit

Permalink
Merge pull request microsoft#24 from microsoft/template-updates
Browse files Browse the repository at this point in the history
ARM template update and mod docker build
  • Loading branch information
ruoccofabrizio authored May 26, 2023
2 parents da75d37 + 2652256 commit 48f0267
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 18 deletions.
1 change: 0 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ AZURE_SEARCH_URL_COLUMN=
AZURE_OPENAI_RESOURCE=
AZURE_OPENAI_MODEL=
AZURE_OPENAI_KEY=
AZURE_OPENAI_DEPLOYMENT=
AZURE_OPENAI_TEMPERATURE=0
AZURE_OPENAI_TOP_P=1.0
AZURE_OPENAI_MAX_TOKENS=1000
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Note: this app is under construction!
## Deploy the app

### One click Azure deployment
[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fruoccofabrizio%2Fsample-app-aoai-chatGPT%2Fmain%2Finfrastructure%2Fdeployment.json)
[![Deploy to Azure](https://aka.ms/deploytoazurebutton)](https://portal.azure.com/#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2Fmicrosoft%2Fsample-app-aoai-chatGPT%2Fmain%2Finfrastructure%2Fdeployment.json)

Click on the Deploy to Azure button and configure your settings in the Azure Portal as described in the [Environment variables](#environment-variables) section.

Expand Down Expand Up @@ -66,7 +66,6 @@ Feel free to fork this repository and make your own modifications to the UX or b
|AZURE_OPENAI_RESOURCE|||
|AZURE_OPENAI_MODEL|||
|AZURE_OPENAI_KEY|||
|AZURE_OPENAI_DEPLOYMENT|||
|AZURE_OPENAI_TEMPERATURE|0||
|AZURE_OPENAI_TOP_P|1.0||
|AZURE_OPENAI_MAX_TOKENS|1000||
Expand Down
6 changes: 4 additions & 2 deletions WebApp.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ WORKDIR /home/node/app
COPY ./frontend/package*.json ./
USER node
RUN npm ci
COPY --chown=node:node ./frontend/ .
COPY --chown=node:node ./frontend/ ./frontend
COPY --chown=node:node ./static/ ./static
WORKDIR /home/node/app/frontend
RUN npm run build

FROM python:3.9.7-alpine3.14
Expand All @@ -23,7 +25,7 @@ RUN pip install --no-cache-dir -r /usr/src/app/requirements.txt \
&& rm -rf /root/.cache

COPY . /usr/src/app/
COPY --from=frontend /home/node/app/ /usr/src/app/frontend/
COPY --from=frontend /home/node/app/static /usr/src/app/static/
WORKDIR /usr/src/app
EXPOSE 80
CMD ["uwsgi", "--http", ":80", "--wsgi-file", "app.py", "--callable", "app", "-b","32768"]
14 changes: 1 addition & 13 deletions infrastructure/deployment.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,8 @@
},
"AzureOpenAIModel": {
"type": "string",
"defaultValue": "text-davinci-003",
"metadata": {
"description": "Azure OpenAI Model"
"description": "Azure OpenAI Model Deployment name"
}
},
"AzureOpenAIKey": {
Expand All @@ -147,13 +146,6 @@
"description": "Azure OpenAI Key"
}
},
"AzureOpenAIDeployment": {
"type": "string",
"defaultValue": "text-davinci-003",
"metadata": {
"description": "Azure OpenAI Deployment"
}
},
"AzureOpenAITemperature": {
"type": "int",
"defaultValue": 0,
Expand Down Expand Up @@ -291,10 +283,6 @@
"name": "AZURE_OPENAI_KEY",
"value": "[parameters('AzureOpenAIKey')]"
},
{
"name": "AZURE_OPENAI_DEPLOYMENT",
"value": "[parameters('AzureOpenAIDeployment')]"
},
{
"name": "AZURE_OPENAI_TEMPERATURE",
"value": "[parameters('AzureOpenAITemperature')]"
Expand Down

0 comments on commit 48f0267

Please sign in to comment.