Skip to content

Commit ccc29a3

Browse files
author
Thomas Thornton
committed
original app
1 parent 8c31bc4 commit ccc29a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+40140
-102
lines changed

3-Docker/app/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build-env
2+
WORKDIR /app
3+
4+
# Copy csproj and restore as distinct layers
5+
COPY *.csproj ./
6+
RUN dotnet restore
7+
8+
# Copy everything else and build
9+
COPY . ./
10+
RUN dotnet publish -c Release -o out
11+
12+
# Build runtime image
13+
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim
14+
WORKDIR /app
15+
COPY --from=build-env /app/out .
16+
ENTRYPOINT ["dotnet", "aspnet-core-dotnet-core.dll"]

3-Docker/app/Pages/About.cshtml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@page
2+
@model AboutModel
3+
@{
4+
ViewData["Title"] = "About";
5+
}
6+
<br />
7+
<h4>Your application description page.</h4>
8+
9+
<p>Use this area to provide additional information.</p>

3-Docker/app/Pages/About.cshtml.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Mvc;
6+
using Microsoft.AspNetCore.Mvc.RazorPages;
7+
8+
namespace aspnet_core_dotnet_core.Pages
9+
{
10+
public class AboutModel : PageModel
11+
{
12+
public void OnGet()
13+
{
14+
}
15+
}
16+
}

3-Docker/app/Pages/Contact.cshtml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
@page
2+
@model ContactModel
3+
@{
4+
ViewData["Title"] = "Contact";
5+
}
6+
<br />
7+
<h4>Your contact page.</h4>
8+
9+
<address>
10+
One Microsoft Way<br />
11+
Redmond, WA 98052-6399<br />
12+
<abbr title="Phone">P:</abbr>
13+
425.555.0100
14+
</address>
15+
16+
<address>
17+
<strong>Support:</strong> <a href="mailto:[email protected]">Support@example.com</a><br />
18+
<strong>Marketing:</strong> <a href="mailto:[email protected]">Marketing@example.com</a>
19+
</address>
20+
21+
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Mvc;
6+
using Microsoft.AspNetCore.Mvc.RazorPages;
7+
8+
namespace aspnet_core_dotnet_core.Pages
9+
{
10+
public class ContactModel : PageModel
11+
{
12+
public void OnGet()
13+
{
14+
}
15+
}
16+
}

3-Docker/app/Pages/Error.cshtml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
@page
2+
@model ErrorModel
3+
@{
4+
ViewData["Title"] = "Error";
5+
}
6+
7+
<h1 class="text-danger">Error.</h1>
8+
<h2 class="text-danger">An error occurred while processing your request.</h2>
9+
10+
@if (Model.ShowRequestId)
11+
{
12+
<p>
13+
<strong>Request ID:</strong> <code>@Model.RequestId</code>
14+
</p>
15+
}
16+
17+
<h3>Development Mode</h3>
18+
<p>
19+
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
20+
</p>
21+
<p>
22+
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
23+
It can result in displaying sensitive information from exceptions to end users.
24+
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
25+
and restarting the app.
26+
</p>

3-Docker/app/Pages/Error.cshtml.cs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Diagnostics;
4+
using System.Linq;
5+
using System.Threading.Tasks;
6+
using Microsoft.AspNetCore.Mvc;
7+
using Microsoft.AspNetCore.Mvc.RazorPages;
8+
9+
namespace aspnet_core_dotnet_core.Pages
10+
{
11+
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
12+
public class ErrorModel : PageModel
13+
{
14+
public string RequestId { get; set; }
15+
16+
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
17+
18+
public void OnGet()
19+
{
20+
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
21+
}
22+
}
23+
}

3-Docker/app/Pages/Index.cshtml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
@page
2+
@model IndexModel
3+
@{
4+
ViewData["Title"] = "Home Page - ASP.NET Core 3.1";
5+
}
6+
7+
<div class="main-container">
8+
<div class="cloud-image">
9+
<img src="~/images/successCloudNew.svg" />
10+
</div>
11+
<div class="content">
12+
<div class="tweet-container">
13+
<a href="http://twitter.com/intent/tweet/?text=I%20just%20created%20a%20new%20ASP.net%20website%20on%20Azure%20using%20Azure%20DevOps%20Project&hashtags=AzureDevOpsProject%2CVSTS%20%40Azure%20%40VSTS">
14+
<img src="~/images/tweetThis.svg" />
15+
</a>
16+
</div>
17+
<div class="content-body">
18+
<div class="success-text">Success!</div>
19+
<div class="description line-1"> Azure DevOps Project has been successfully setup</div>
20+
<div class="description line-2"> Your ASP.NET Core app is up and running on Azure</div>
21+
</div>
22+
</div>
23+
</div>
24+
<div class="row">
25+
<div class="col-md-4">
26+
<h2>Get started right away </h2>
27+
<p>
28+
Clone your code repository and start developing your application on IDE of your choice
29+
</p>
30+
<p><a class="btn btn-light" href="https://go.microsoft.com/fwlink/?linkid=862409">Learn more &raquo;</a></p>
31+
</div>
32+
<div class="col-md-4">
33+
<h2>Continuous Delivery</h2>
34+
<p>View your CI/CD pipeline on Azure Devops and customize it as per your needs</p>
35+
<p><a class="btn btn-light" href="https://go.microsoft.com/fwlink/?linkid=862410">Learn more &raquo;</a></p>
36+
</div>
37+
<div class="col-md-4">
38+
<h2>Azure DevOps Project</h2>
39+
<p>Learn more about all you can do with Azure DevOps project by visiting the documentation</p>
40+
<p><a class="btn btn-light" href="https://go.microsoft.com/fwlink/?linkid=862126">Learn more &raquo;</a></p>
41+
</div>
42+
</div>
43+

3-Docker/app/Pages/Index.cshtml.cs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Threading.Tasks;
5+
using Microsoft.AspNetCore.Mvc;
6+
using Microsoft.AspNetCore.Mvc.RazorPages;
7+
8+
namespace aspnet_core_dotnet_core.Pages
9+
{
10+
public class IndexModel : PageModel
11+
{
12+
public void OnGet()
13+
{
14+
15+
}
16+
public string DoTest()
17+
{
18+
return "Index";
19+
}
20+
}
21+
}

3-Docker/app/Pages/Privacy.cshtml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
@page
2+
@model PrivacyModel
3+
@{
4+
ViewData["Title"] = "Privacy Policy";
5+
}
6+
<h1>@ViewData["Title"]</h1>
7+
8+
<p>Use this page to detail your site's privacy policy.</p>

0 commit comments

Comments
 (0)