diff --git a/Deploy/deployment.json b/Deploy/deployment.json index 484e2595..57b33e42 100644 --- a/Deploy/deployment.json +++ b/Deploy/deployment.json @@ -62,7 +62,7 @@ "type": "Microsoft.Web/sites", "kind": "functionapp", "name": "[variables('function_name')]", - "apiVersion": "2016-03-01", + "apiVersion": "2016-08-01", "location": "[parameters('location')]", "properties": { "name": "[variables('function_name')]", @@ -92,7 +92,10 @@ "name": "WEBSITE_NODE_DEFAULT_VERSION", "value": "8.11.1" } - ] + ], + "cors": { + "allowedOrigins": ["*"] + } }, "clientAffinityEnabled": false, "reserved": false diff --git a/Source/.dockerignore b/Source/.dockerignore new file mode 100644 index 00000000..e52404d4 --- /dev/null +++ b/Source/.dockerignore @@ -0,0 +1,20 @@ +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.vs +**/.vscode +**/*.*proj.user +**/azds.yaml +**/charts +**/bin +**/obj +**/Dockerfile +**/Dockerfile.develop +**/docker-compose.yml +**/docker-compose.*.yml +**/*.dbmdl +**/*.jfm +**/secrets.dev.yaml +**/values.dev.yaml +**/.toolstarget \ No newline at end of file diff --git a/Source/SmartHotel360.Website/Dockerfile b/Source/SmartHotel360.Website/Dockerfile index 778806e8..17b4c2c3 100644 --- a/Source/SmartHotel360.Website/Dockerfile +++ b/Source/SmartHotel360.Website/Dockerfile @@ -3,8 +3,9 @@ WORKDIR /app EXPOSE 80 FROM microsoft/dotnet:2.2.100-preview1-sdk-alpine AS build +ENV BuildingDocker true WORKDIR /src -COPY SmartHotel360.PublicWeb.csproj . +COPY SmartHotel360.Website.csproj . RUN dotnet restore COPY . . RUN dotnet build -c Release -o /webapp @@ -28,4 +29,4 @@ FROM base AS final WORKDIR /app COPY --from=publish /webapp . COPY --from=node /src/wwwroot ./wwwroot -ENTRYPOINT ["dotnet", "SmartHotel360.PublicWeb.dll"] +ENTRYPOINT ["dotnet", "SmartHotel360.Website.dll"] diff --git a/Source/SmartHotel360.Website/SmartHotel360.Website.csproj b/Source/SmartHotel360.Website/SmartHotel360.Website.csproj index deaa9d8b..2b55f019 100644 --- a/Source/SmartHotel360.Website/SmartHotel360.Website.csproj +++ b/Source/SmartHotel360.Website/SmartHotel360.Website.csproj @@ -52,7 +52,7 @@ - + diff --git a/Source/SmartHotel360.WebsiteFunction/local.settings.json b/Source/SmartHotel360.WebsiteFunction/local.settings.json index 5ea1acfb..7949ecbf 100644 --- a/Source/SmartHotel360.WebsiteFunction/local.settings.json +++ b/Source/SmartHotel360.WebsiteFunction/local.settings.json @@ -11,5 +11,8 @@ "MicrosoftVisionNumTags": "10", "AzureSignalRConnectionString": "", "FUNCTIONS_WORKER_RUNTIME": "dotnet" + }, + "Host": { + "CORS": "*" } } \ No newline at end of file