diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..36ef71af --- /dev/null +++ b/Dockerfile @@ -0,0 +1,28 @@ +# create the build instance +FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build + +WORKDIR /source +COPY /. ./ + +#restore +RUN dotnet restore + +# build with configuration +RUN dotnet build TodoApi.csproj -c Release + +RUN dotnet publish TodoApi.csproj -c Release -o /src/output + +# create the runtime instance +FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-alpine AS runtime + +# add globalization support +RUN apk add --no-cache icu-libs +ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false + +# installs required packages +RUN apk add libgdiplus --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted +RUN apk add libc-dev --no-cache + +COPY --from=build /src/output . + +ENTRYPOINT ["dotnet", "TodoApi.dll"] \ No newline at end of file diff --git a/wwwroot/app/scripts/app.js b/wwwroot/app/scripts/app.js index f68f3bf9..339cbaf7 100644 --- a/wwwroot/app/scripts/app.js +++ b/wwwroot/app/scripts/app.js @@ -1,16 +1,19 @@ -'use strict'; -angular.module('todoApp', ['ngRoute']) -.config(['$routeProvider', '$httpProvider', function ($routeProvider, $httpProvider) { - +"use strict"; +angular.module("todoApp", ["ngRoute"]).config([ + "$routeProvider", + "$httpProvider", + function ($routeProvider, $httpProvider) { // disable IE ajax request caching if (!$httpProvider.defaults.headers.get) { - $httpProvider.defaults.headers.get = {}; + $httpProvider.defaults.headers.get = {}; } - $httpProvider.defaults.headers.get['If-Modified-Since'] = '0'; + $httpProvider.defaults.headers.get["If-Modified-Since"] = "0"; - $routeProvider.when("/Home", { + $routeProvider + .when("/Home", { controller: "todoListCtrl", - templateUrl: "/App/Views/TodoList.html", - }).otherwise({ redirectTo: "/Home" }); - - }]); \ No newline at end of file + templateUrl: "/app/views/TodoList.html", + }) + .otherwise({ redirectTo: "/Home" }); + }, +]);