some initial dockerfiles and catalog work. Proof of concept more than…pull/49/merge
@ -0,0 +1,7 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | |||||
<configuration> | |||||
<packageSources> | |||||
<add key="AspNetCore" value="https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json" /> | |||||
<add key="NuGet" value="https://api.nuget.org/v3/index.json" /> | |||||
</packageSources> | |||||
</configuration> |
@ -0,0 +1,8 @@ | |||||
#!/bin/sh | |||||
#dotnet restore | |||||
rm -rf ./pub | |||||
dotnet publish "$(pwd)/src/Services/Catalog/Catalog.API/project.json" -o "$(pwd)/pub/catalog" | |||||
dotnet publish "$(pwd)/src/Web/Microsoft.eShopOnContainers.WebMVC/project.json" -o "$(pwd)/pub/webMVC" | |||||
docker build -t eshop/web "$(pwd)/pub/webMVC" | |||||
docker build -t eshop/catalog.api "$(pwd)/pub/catalog" |
@ -0,0 +1,21 @@ | |||||
version: '2' | |||||
services: | |||||
webmvc: | |||||
image: eshop/web | |||||
environment: | |||||
- CatalogUrl=http://catalog.api | |||||
ports: | |||||
- "80:80" | |||||
depends_on: | |||||
- catalog.api | |||||
catalog.api: | |||||
image: eshop/catalog.api | |||||
environment: | |||||
- ConnectionString=Server=catalogdata;Port=5432;Database=postgres;username=postgres | |||||
expose: | |||||
- "80" | |||||
depends_on: | |||||
- catalogdata | |||||
catalogdata: | |||||
image: glennc/eshopdata |
@ -0,0 +1,73 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Threading.Tasks; | |||||
using Microsoft.AspNetCore.Mvc; | |||||
using Microsoft.eShopOnContainers.Services.Catalog.API.Model; | |||||
namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers | |||||
{ | |||||
[Route("/")] | |||||
public class CatalogController : ControllerBase | |||||
{ | |||||
private CatalogContext _context; | |||||
public CatalogController(CatalogContext context) | |||||
{ | |||||
_context = context; | |||||
} | |||||
// GET api/values | |||||
[HttpGet] | |||||
public IEnumerable<CatalogItem> Get() | |||||
{ | |||||
return _context.CatalogItems.ToList(); | |||||
} | |||||
// GET api/values/5 | |||||
[HttpGet("{id}")] | |||||
public IActionResult Get(Guid id) | |||||
{ | |||||
var item = _context.CatalogItems.FirstOrDefault(x=> x.Id == id); | |||||
if(item == null) | |||||
{ | |||||
return NotFound(); | |||||
} | |||||
return new OkObjectResult(item); | |||||
} | |||||
// POST api/values | |||||
[HttpPost] | |||||
public IActionResult Post([FromBody]CatalogItem item) | |||||
{ | |||||
try | |||||
{ | |||||
_context.CatalogItems.Add(item); | |||||
_context.SaveChanges(); | |||||
return Ok(); | |||||
} | |||||
catch | |||||
{ | |||||
return StatusCode(500, "Unable to add new catalog item"); | |||||
} | |||||
} | |||||
// PUT api/values/5 | |||||
[HttpPut("{id}")] | |||||
public IActionResult Put(int id, [FromBody]CatalogItem item) | |||||
{ | |||||
_context.CatalogItems.Update(item); | |||||
_context.SaveChanges(); | |||||
return Ok(); | |||||
} | |||||
// DELETE api/values/5 | |||||
[HttpDelete("{id}")] | |||||
public IActionResult Delete(Guid id) | |||||
{ | |||||
return Ok(); | |||||
} | |||||
} | |||||
} |
@ -1,44 +0,0 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Threading.Tasks; | |||||
using Microsoft.AspNetCore.Mvc; | |||||
namespace Microsoft.eShopOnContainers.Services.Catalog.API.Controllers | |||||
{ | |||||
[Route("api/[controller]")] | |||||
public class ValuesController : Controller | |||||
{ | |||||
// GET api/values | |||||
[HttpGet] | |||||
public IEnumerable<string> Get() | |||||
{ | |||||
return new string[] { "value1", "value2" }; | |||||
} | |||||
// GET api/values/5 | |||||
[HttpGet("{id}")] | |||||
public string Get(int id) | |||||
{ | |||||
return "value"; | |||||
} | |||||
// POST api/values | |||||
[HttpPost] | |||||
public void Post([FromBody]string value) | |||||
{ | |||||
} | |||||
// PUT api/values/5 | |||||
[HttpPut("{id}")] | |||||
public void Put(int id, [FromBody]string value) | |||||
{ | |||||
} | |||||
// DELETE api/values/5 | |||||
[HttpDelete("{id}")] | |||||
public void Delete(int id) | |||||
{ | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,5 @@ | |||||
FROM microsoft/aspnetcore | |||||
WORKDIR /app | |||||
EXPOSE 80 | |||||
ADD . /app | |||||
ENTRYPOINT dotnet Catalog.API.dll |
@ -0,0 +1,23 @@ | |||||
using Microsoft.EntityFrameworkCore; | |||||
using Npgsql.EntityFrameworkCore.PostgreSQL; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Threading.Tasks; | |||||
namespace Microsoft.eShopOnContainers.Services.Catalog.API.Model | |||||
{ | |||||
public class CatalogContext : DbContext | |||||
{ | |||||
public CatalogContext(DbContextOptions options): base(options) | |||||
{ | |||||
} | |||||
public DbSet<CatalogItem> CatalogItems { get; set; } | |||||
protected override void OnModelCreating(ModelBuilder builder) | |||||
{ | |||||
builder.HasPostgresExtension("uuid-ossp"); | |||||
} | |||||
} | |||||
} |
@ -0,0 +1,20 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Threading.Tasks; | |||||
namespace Microsoft.eShopOnContainers.Services.Catalog.API.Model | |||||
{ | |||||
public class CatalogItem | |||||
{ | |||||
public CatalogItem() | |||||
{ | |||||
} | |||||
public Guid Id { get; set; } | |||||
public string Name { get; set; } | |||||
public string Description { get; set; } | |||||
public decimal Price { get; set; } | |||||
public int ImageCount { get; set; } | |||||
} | |||||
} |
@ -1,187 +0,0 @@ | |||||
<!DOCTYPE html> | |||||
<html lang="en"> | |||||
<head> | |||||
<meta charset="utf-8" /> | |||||
<title>Welcome to ASP.NET Core</title> | |||||
<style> | |||||
html { | |||||
background: #f1f1f1; | |||||
height: 100%; | |||||
} | |||||
body { | |||||
background: #fff; | |||||
color: #505050; | |||||
font: 14px 'Segoe UI', tahoma, arial, helvetica, sans-serif; | |||||
margin: 1%; | |||||
min-height: 95.5%; | |||||
border: 1px solid silver; | |||||
position: relative; | |||||
} | |||||
#header { | |||||
padding: 0; | |||||
} | |||||
#header h1 { | |||||
font-size: 44px; | |||||
font-weight: normal; | |||||
margin: 0; | |||||
padding: 10px 30px 10px 30px; | |||||
} | |||||
#header span { | |||||
margin: 0; | |||||
padding: 0 30px; | |||||
display: block; | |||||
} | |||||
#header p { | |||||
font-size: 20px; | |||||
color: #fff; | |||||
background: #007acc; | |||||
padding: 0 30px; | |||||
line-height: 50px; | |||||
margin-top: 25px; | |||||
} | |||||
#header p a { | |||||
color: #fff; | |||||
text-decoration: underline; | |||||
font-weight: bold; | |||||
padding-right: 35px; | |||||
background: no-repeat right bottom url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAWCAMAAAAcqPc3AAAANlBMVEUAAAAAeswfitI9mthXp91us+KCvuaTx+mjz+2x1u+83PLH4vTR5/ba7Pjj8Pns9fv1+v3////wy3dWAAAAAXRSTlMAQObYZgAAAHxJREFUeNp9kVcSwCAIRMHUYoH7XzaxOxJ9P8oyQ1uIqNPwh3s2aLmIM2YtqrLcQIeQEylhuCeUOlhgve5yoBCfWmlnlgkN4H8ykbpaE7gR03AbUHiwoOxUH9Xp+ubd41p1HF3mBPrfC87BHeTdaB3ceeKL9HGpcvX9zu6+DdMWT9KQPvYAAAAASUVORK5CYII=); | |||||
} | |||||
#main { | |||||
padding: 5px 30px; | |||||
clear: both; | |||||
} | |||||
.section { | |||||
width: 21.7%; | |||||
float: left; | |||||
margin: 0 0 0 4%; | |||||
} | |||||
.section h2 { | |||||
font-size: 13px; | |||||
text-transform: uppercase; | |||||
margin: 0; | |||||
border-bottom: 1px solid silver; | |||||
padding-bottom: 12px; | |||||
margin-bottom: 8px; | |||||
} | |||||
.section.first { | |||||
margin-left: 0; | |||||
} | |||||
.section.first h2 { | |||||
font-size: 24px; | |||||
text-transform: none; | |||||
margin-bottom: 25px; | |||||
border: none; | |||||
} | |||||
.section.first li { | |||||
border-top: 1px solid silver; | |||||
padding: 8px 0; | |||||
} | |||||
.section.last { | |||||
margin-right: 0; | |||||
} | |||||
ul { | |||||
list-style: none; | |||||
padding: 0; | |||||
margin: 0; | |||||
line-height: 20px; | |||||
} | |||||
li { | |||||
padding: 4px 0; | |||||
} | |||||
a { | |||||
color: #267cb2; | |||||
text-decoration: none; | |||||
} | |||||
a:hover { | |||||
text-decoration: underline; | |||||
} | |||||
#footer { | |||||
clear: both; | |||||
padding-top: 50px; | |||||
} | |||||
#footer p { | |||||
position: absolute; | |||||
bottom: 10px; | |||||
} | |||||
</style> | |||||
</head> | |||||
<body> | |||||
<div id="header"> | |||||
<h1>Welcome to ASP.NET Core</h1> | |||||
<span> | |||||
We've made some big updates in this release, so it’s <b>important</b> that you spend | |||||
a few minutes to learn what’s new. | |||||
</span> | |||||
<p>You've created a new ASP.NET Core project. <a href="http://go.microsoft.com/fwlink/?LinkId=518016">Learn what's new</a></p> | |||||
</div> | |||||
<div id="main"> | |||||
<div class="section first"> | |||||
<h2>This application consists of:</h2> | |||||
<ul> | |||||
<li>Sample pages using ASP.NET Core MVC</li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side libraries</li> | |||||
<li>Theming using <a href="http://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li> | |||||
</ul> | |||||
</div> | |||||
<div class="section"> | |||||
<h2>How to</h2> | |||||
<ul> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398600">Add a Controller and View</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699562">Add an appsetting in config and access it in app.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699315">Manage User Secrets using Secret Manager.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699316">Use logging to log a message.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699317">Add packages using NuGet.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699318">Add client packages using Bower.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699319">Target development, staging or production environment.</a></li> | |||||
</ul> | |||||
</div> | |||||
<div class="section"> | |||||
<h2>Overview</h2> | |||||
<ul> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518008">Conceptual overview of what is ASP.NET Core</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699320">Fundamentals of ASP.NET Core such as Startup and middleware.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398602">Working with Data</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398603">Security</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699321">Client side development</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699322">Develop on different platforms</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699323">Read more on the documentation site</a></li> | |||||
</ul> | |||||
</div> | |||||
<div class="section last"> | |||||
<h2>Run & Deploy</h2> | |||||
<ul> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517851">Run your app</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517853">Run tools such as EF migrations and more</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398609">Publish to Microsoft Azure Web Apps</a></li> | |||||
</ul> | |||||
</div> | |||||
<div id="footer"> | |||||
<p>We would love to hear your <a href="http://go.microsoft.com/fwlink/?LinkId=518015">feedback</a></p> | |||||
</div> | |||||
</div> | |||||
</body> | |||||
</html> |
@ -1,4 +1,5 @@ | |||||
{ | { | ||||
"ConnectionString": "Server=127.0.0.1;Port=5432;Database=postgres;username=postgres", | |||||
"Logging": { | "Logging": { | ||||
"IncludeScopes": false, | "IncludeScopes": false, | ||||
"LogLevel": { | "LogLevel": { |
@ -1,14 +1,9 @@ | |||||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||||
<configuration> | <configuration> | ||||
<!-- | |||||
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380 | |||||
--> | |||||
<system.webServer> | <system.webServer> | ||||
<handlers> | <handlers> | ||||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified"/> | |||||
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" /> | |||||
</handlers> | </handlers> | ||||
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" forwardWindowsAuthToken="false"/> | |||||
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" forwardWindowsAuthToken="false" stdoutLogEnabled="false" /> | |||||
</system.webServer> | </system.webServer> | ||||
</configuration> | |||||
</configuration> |
@ -0,0 +1,32 @@ | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Linq; | |||||
using System.Threading.Tasks; | |||||
namespace Microsoft.eShopOnContainers.WebMVC | |||||
{ | |||||
public class AppSettings | |||||
{ | |||||
public Connectionstrings ConnectionStrings { get; set; } | |||||
public string CatalogUrl { get; set; } | |||||
public Logging Logging { get; set; } | |||||
} | |||||
public class Connectionstrings | |||||
{ | |||||
public string DefaultConnection { get; set; } | |||||
} | |||||
public class Logging | |||||
{ | |||||
public bool IncludeScopes { get; set; } | |||||
public Loglevel LogLevel { get; set; } | |||||
} | |||||
public class Loglevel | |||||
{ | |||||
public string Default { get; set; } | |||||
public string System { get; set; } | |||||
public string Microsoft { get; set; } | |||||
} | |||||
} |
@ -0,0 +1,7 @@ | |||||
FROM microsoft/dotnet:1.0.0-core | |||||
ARG source=. | |||||
WORKDIR /app | |||||
ENV ASPNETCORE_URLS http://*:80 | |||||
EXPOSE 80 | |||||
COPY $source . | |||||
ENTRYPOINT dotnet Microsoft.eShopOnContainers.WebMVC.dll |
@ -0,0 +1,12 @@ | |||||
using System; | |||||
namespace Microsoft.eShopOnContainers.WebMVC.Models | |||||
{ | |||||
public class CatalogItem | |||||
{ | |||||
public Guid Id { get; set; } | |||||
public string Name { get; set; } | |||||
public string Description { get; set; } | |||||
public decimal Price { get; set; } | |||||
} | |||||
} |
@ -1,187 +0,0 @@ | |||||
<!DOCTYPE html> | |||||
<html lang="en"> | |||||
<head> | |||||
<meta charset="utf-8" /> | |||||
<title>Welcome to ASP.NET Core</title> | |||||
<style> | |||||
html { | |||||
background: #f1f1f1; | |||||
height: 100%; | |||||
} | |||||
body { | |||||
background: #fff; | |||||
color: #505050; | |||||
font: 14px 'Segoe UI', tahoma, arial, helvetica, sans-serif; | |||||
margin: 1%; | |||||
min-height: 95.5%; | |||||
border: 1px solid silver; | |||||
position: relative; | |||||
} | |||||
#header { | |||||
padding: 0; | |||||
} | |||||
#header h1 { | |||||
font-size: 44px; | |||||
font-weight: normal; | |||||
margin: 0; | |||||
padding: 10px 30px 10px 30px; | |||||
} | |||||
#header span { | |||||
margin: 0; | |||||
padding: 0 30px; | |||||
display: block; | |||||
} | |||||
#header p { | |||||
font-size: 20px; | |||||
color: #fff; | |||||
background: #007acc; | |||||
padding: 0 30px; | |||||
line-height: 50px; | |||||
margin-top: 25px; | |||||
} | |||||
#header p a { | |||||
color: #fff; | |||||
text-decoration: underline; | |||||
font-weight: bold; | |||||
padding-right: 35px; | |||||
background: no-repeat right bottom url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAWCAMAAAAcqPc3AAAANlBMVEUAAAAAeswfitI9mthXp91us+KCvuaTx+mjz+2x1u+83PLH4vTR5/ba7Pjj8Pns9fv1+v3////wy3dWAAAAAXRSTlMAQObYZgAAAHxJREFUeNp9kVcSwCAIRMHUYoH7XzaxOxJ9P8oyQ1uIqNPwh3s2aLmIM2YtqrLcQIeQEylhuCeUOlhgve5yoBCfWmlnlgkN4H8ykbpaE7gR03AbUHiwoOxUH9Xp+ubd41p1HF3mBPrfC87BHeTdaB3ceeKL9HGpcvX9zu6+DdMWT9KQPvYAAAAASUVORK5CYII=); | |||||
} | |||||
#main { | |||||
padding: 5px 30px; | |||||
clear: both; | |||||
} | |||||
.section { | |||||
width: 21.7%; | |||||
float: left; | |||||
margin: 0 0 0 4%; | |||||
} | |||||
.section h2 { | |||||
font-size: 13px; | |||||
text-transform: uppercase; | |||||
margin: 0; | |||||
border-bottom: 1px solid silver; | |||||
padding-bottom: 12px; | |||||
margin-bottom: 8px; | |||||
} | |||||
.section.first { | |||||
margin-left: 0; | |||||
} | |||||
.section.first h2 { | |||||
font-size: 24px; | |||||
text-transform: none; | |||||
margin-bottom: 25px; | |||||
border: none; | |||||
} | |||||
.section.first li { | |||||
border-top: 1px solid silver; | |||||
padding: 8px 0; | |||||
} | |||||
.section.last { | |||||
margin-right: 0; | |||||
} | |||||
ul { | |||||
list-style: none; | |||||
padding: 0; | |||||
margin: 0; | |||||
line-height: 20px; | |||||
} | |||||
li { | |||||
padding: 4px 0; | |||||
} | |||||
a { | |||||
color: #267cb2; | |||||
text-decoration: none; | |||||
} | |||||
a:hover { | |||||
text-decoration: underline; | |||||
} | |||||
#footer { | |||||
clear: both; | |||||
padding-top: 50px; | |||||
} | |||||
#footer p { | |||||
position: absolute; | |||||
bottom: 10px; | |||||
} | |||||
</style> | |||||
</head> | |||||
<body> | |||||
<div id="header"> | |||||
<h1>Welcome to ASP.NET Core</h1> | |||||
<span> | |||||
We've made some big updates in this release, so it’s <b>important</b> that you spend | |||||
a few minutes to learn what’s new. | |||||
</span> | |||||
<p>You've created a new ASP.NET Core project. <a href="http://go.microsoft.com/fwlink/?LinkId=518016">Learn what's new</a></p> | |||||
</div> | |||||
<div id="main"> | |||||
<div class="section first"> | |||||
<h2>This application consists of:</h2> | |||||
<ul> | |||||
<li>Sample pages using ASP.NET Core MVC</li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side libraries</li> | |||||
<li>Theming using <a href="http://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li> | |||||
</ul> | |||||
</div> | |||||
<div class="section"> | |||||
<h2>How to</h2> | |||||
<ul> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398600">Add a Controller and View</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699562">Add an appsetting in config and access it in app.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699315">Manage User Secrets using Secret Manager.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699316">Use logging to log a message.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699317">Add packages using NuGet.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699318">Add client packages using Bower.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699319">Target development, staging or production environment.</a></li> | |||||
</ul> | |||||
</div> | |||||
<div class="section"> | |||||
<h2>Overview</h2> | |||||
<ul> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518008">Conceptual overview of what is ASP.NET Core</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699320">Fundamentals of ASP.NET Core such as Startup and middleware.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398602">Working with Data</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398603">Security</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699321">Client side development</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699322">Develop on different platforms</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699323">Read more on the documentation site</a></li> | |||||
</ul> | |||||
</div> | |||||
<div class="section last"> | |||||
<h2>Run & Deploy</h2> | |||||
<ul> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517851">Run your app</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517853">Run tools such as EF migrations and more</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398609">Publish to Microsoft Azure Web Apps</a></li> | |||||
</ul> | |||||
</div> | |||||
<div id="footer"> | |||||
<p>We would love to hear your <a href="http://go.microsoft.com/fwlink/?LinkId=518015">feedback</a></p> | |||||
</div> | |||||
</div> | |||||
</body> | |||||
</html> |
@ -1,109 +1,16 @@ | |||||
@{ | @{ | ||||
ViewData["Title"] = "Home Page"; | ViewData["Title"] = "Home Page"; | ||||
@model IEnumerable<CatalogItem> | |||||
} | } | ||||
<div id="myCarousel" class="carousel slide" data-ride="carousel" data-interval="6000"> | |||||
<ol class="carousel-indicators"> | |||||
<li data-target="#myCarousel" data-slide-to="0" class="active"></li> | |||||
<li data-target="#myCarousel" data-slide-to="1"></li> | |||||
<li data-target="#myCarousel" data-slide-to="2"></li> | |||||
<li data-target="#myCarousel" data-slide-to="3"></li> | |||||
</ol> | |||||
<div class="carousel-inner" role="listbox"> | |||||
<div class="item active"> | |||||
<img src="~/images/banner1.svg" alt="ASP.NET" class="img-responsive" /> | |||||
<div class="carousel-caption" role="option"> | |||||
<p> | |||||
Learn how to build ASP.NET apps that can run anywhere. | |||||
<a class="btn btn-default" href="http://go.microsoft.com/fwlink/?LinkID=525028&clcid=0x409"> | |||||
Learn More | |||||
</a> | |||||
</p> | |||||
</div> | |||||
@foreach (var catalogItem in Model) | |||||
{ | |||||
<div class="panel panel-default"> | |||||
<div class="panel-heading"> | |||||
<h3 class="panel-title">@catalogItem.Name</h3> | |||||
</div> | </div> | ||||
<div class="item"> | |||||
<img src="~/images/banner2.svg" alt="Visual Studio" class="img-responsive" /> | |||||
<div class="carousel-caption" role="option"> | |||||
<p> | |||||
There are powerful new features in Visual Studio for building modern web apps. | |||||
<a class="btn btn-default" href="http://go.microsoft.com/fwlink/?LinkID=525030&clcid=0x409"> | |||||
Learn More | |||||
</a> | |||||
</p> | |||||
</div> | |||||
<div class="panel-body"> | |||||
@catalogItem.Description | |||||
</div> | </div> | ||||
<div class="item"> | |||||
<img src="~/images/banner3.svg" alt="Package Management" class="img-responsive" /> | |||||
<div class="carousel-caption" role="option"> | |||||
<p> | |||||
Bring in libraries from NuGet, Bower, and npm, and automate tasks using Grunt or Gulp. | |||||
<a class="btn btn-default" href="http://go.microsoft.com/fwlink/?LinkID=525029&clcid=0x409"> | |||||
Learn More | |||||
</a> | |||||
</p> | |||||
</div> | |||||
</div> | |||||
<div class="item"> | |||||
<img src="~/images/banner4.svg" alt="Microsoft Azure" class="img-responsive" /> | |||||
<div class="carousel-caption" role="option"> | |||||
<p> | |||||
Learn how Microsoft's Azure cloud platform allows you to build, deploy, and scale web apps. | |||||
<a class="btn btn-default" href="http://go.microsoft.com/fwlink/?LinkID=525027&clcid=0x409"> | |||||
Learn More | |||||
</a> | |||||
</p> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev"> | |||||
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> | |||||
<span class="sr-only">Previous</span> | |||||
</a> | |||||
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next"> | |||||
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> | |||||
<span class="sr-only">Next</span> | |||||
</a> | |||||
</div> | |||||
<div class="row"> | |||||
<div class="col-md-3"> | |||||
<h2>Application uses</h2> | |||||
<ul> | |||||
<li>Sample pages using ASP.NET Core MVC</li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518004">Bower</a> for managing client-side libraries</li> | |||||
<li>Theming using <a href="http://go.microsoft.com/fwlink/?LinkID=398939">Bootstrap</a></li> | |||||
</ul> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<h2>How to</h2> | |||||
<ul> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398600">Add a Controller and View</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699562">Add an appsetting in config and access it in app.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699315">Manage User Secrets using Secret Manager.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699316">Use logging to log a message.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699317">Add packages using NuGet.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699318">Add client packages using Bower.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699319">Target development, staging or production environment.</a></li> | |||||
</ul> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<h2>Overview</h2> | |||||
<ul> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=518008">Conceptual overview of what is ASP.NET Core</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=699320">Fundamentals of ASP.NET Core such as Startup and middleware.</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398602">Working with Data</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkId=398603">Security</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699321">Client side development</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699322">Develop on different platforms</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=699323">Read more on the documentation site</a></li> | |||||
</ul> | |||||
</div> | |||||
<div class="col-md-3"> | |||||
<h2>Run & Deploy</h2> | |||||
<ul> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517851">Run your app</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=517853">Run tools such as EF migrations and more</a></li> | |||||
<li><a href="http://go.microsoft.com/fwlink/?LinkID=398609">Publish to Microsoft Azure Web Apps</a></li> | |||||
</ul> | |||||
</div> | </div> | ||||
</div> | |||||
} |
@ -0,0 +1,17 @@ | |||||
version: '2' | |||||
services: | |||||
microsoft.eshoponcontainers.webmvc: | |||||
build: | |||||
args: | |||||
source: obj/Docker/empty/ | |||||
labels: | |||||
- "com.microsoft.visualstudio.targetoperatingsystem=linux" | |||||
environment: | |||||
- ASPNETCORE_ENVIRONMENT=Development | |||||
- DOTNET_USE_POLLING_FILE_WATCHER=1 | |||||
volumes: | |||||
- .:/app | |||||
- ~/.nuget/packages:/root/.nuget/packages:ro | |||||
- ~/clrdbg:/clrdbg:ro | |||||
entrypoint: tail -f /dev/null |
@ -0,0 +1,9 @@ | |||||
version: '2' | |||||
services: | |||||
microsoft.eshoponcontainers.webmvc: | |||||
labels: | |||||
- "com.microsoft.visualstudio.targetoperatingsystem=linux" | |||||
volumes: | |||||
- ~/clrdbg:/clrdbg:ro | |||||
entrypoint: tail -f /dev/null |
@ -0,0 +1,10 @@ | |||||
version: '2' | |||||
services: | |||||
microsoft.eshoponcontainers.webmvc: | |||||
image: user/microsoft.eshoponcontainers.webmvc${TAG} | |||||
build: | |||||
context: . | |||||
dockerfile: Dockerfile | |||||
ports: | |||||
- "80" |
@ -0,0 +1 @@ | |||||
// Write your Javascript code. |