Major update
This commit is contained in:
25
leagues/.dockerignore
Normal file
25
leagues/.dockerignore
Normal file
@@ -0,0 +1,25 @@
|
||||
**/.classpath
|
||||
**/.dockerignore
|
||||
**/.env
|
||||
**/.git
|
||||
**/.gitignore
|
||||
**/.project
|
||||
**/.settings
|
||||
**/.toolstarget
|
||||
**/.vs
|
||||
**/.vscode
|
||||
**/*.*proj.user
|
||||
**/*.dbmdl
|
||||
**/*.jfm
|
||||
**/azds.yaml
|
||||
**/bin
|
||||
**/charts
|
||||
**/docker-compose*
|
||||
**/Dockerfile*
|
||||
**/node_modules
|
||||
**/npm-debug.log
|
||||
**/obj
|
||||
**/secrets.dev.yaml
|
||||
**/values.dev.yaml
|
||||
LICENSE
|
||||
README.md
|
||||
3
leagues/.gitignore
vendored
Normal file
3
leagues/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
.vs/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
54
leagues/Controllers/LeaguesController.cs
Normal file
54
leagues/Controllers/LeaguesController.cs
Normal file
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net.Http.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
using Leagues.Queries;
|
||||
using MediatR;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Leagues.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("api/leagues")]
|
||||
public class LeaguesController : ControllerBase
|
||||
{
|
||||
private readonly ISender _sender;
|
||||
|
||||
public LeaguesController(ISender sender) => _sender = sender;
|
||||
|
||||
[HttpGet]
|
||||
public async Task<ActionResult> GetLeagues([FromQuery] int pageNumber, [FromQuery] int pageSize)
|
||||
{
|
||||
var leagues = await _sender.Send(new GetLeaguesQuery
|
||||
{
|
||||
PageNumber = pageNumber,
|
||||
PageSize = pageSize
|
||||
});
|
||||
|
||||
Response.Headers.Add("X-Pagination", JsonConvert.SerializeObject(new
|
||||
{
|
||||
leagues.CurrentPage,
|
||||
leagues.PageSize,
|
||||
leagues.TotalCount,
|
||||
leagues.TotalPages
|
||||
}));
|
||||
|
||||
return Ok(leagues);
|
||||
}
|
||||
|
||||
[HttpGet("{id}")]
|
||||
public async Task<ActionResult> GetLeagueById(int id)
|
||||
{
|
||||
var league = await _sender.Send(new GetLeagueByIdQuery
|
||||
{
|
||||
LeagueId = id
|
||||
});
|
||||
|
||||
return Ok(league);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
81
leagues/DbContexts/LeaguesContext.cs
Normal file
81
leagues/DbContexts/LeaguesContext.cs
Normal file
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Leagues.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
|
||||
namespace Leagues.DbContexts
|
||||
{
|
||||
public partial class LeaguesContext : DbContext
|
||||
{
|
||||
public LeaguesContext()
|
||||
{
|
||||
}
|
||||
|
||||
public LeaguesContext(DbContextOptions<LeaguesContext> options)
|
||||
: base(options)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual DbSet<League> Leagues { get; set; } = null!;
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
if (!optionsBuilder.IsConfigured)
|
||||
{
|
||||
#warning To protect potentially sensitive information in your connection string, you should move it out of source code. You can avoid scaffolding the connection string by using the Name= syntax to read it from configuration - see https://go.microsoft.com/fwlink/?linkid=2131148. For more guidance on storing connection strings, see http://go.microsoft.com/fwlink/?LinkId=723263.
|
||||
optionsBuilder.UseNpgsql("Host=localhost;Port=5430;Database=leagues;Username=postgres;Password=postgres");
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<League>(entity =>
|
||||
{
|
||||
entity.HasNoKey();
|
||||
|
||||
entity.ToTable("league");
|
||||
|
||||
entity.Property(e => e.Abbreviation).HasColumnName("abbreviation");
|
||||
|
||||
entity.Property(e => e.Active).HasColumnName("active");
|
||||
|
||||
entity.Property(e => e.ConferencesInUse).HasColumnName("conferencesInUse");
|
||||
|
||||
entity.Property(e => e.DivisionsInUse).HasColumnName("divisionsInUse");
|
||||
|
||||
entity.Property(e => e.HasPlayoffPoints).HasColumnName("hasPlayoffPoints");
|
||||
|
||||
entity.Property(e => e.HasSplitSeason).HasColumnName("hasSplitSeason");
|
||||
|
||||
entity.Property(e => e.HasWildCard).HasColumnName("hasWildCard");
|
||||
|
||||
entity.Property(e => e.Id).HasColumnName("id");
|
||||
|
||||
entity.Property(e => e.Link).HasColumnName("link");
|
||||
|
||||
entity.Property(e => e.Name).HasColumnName("name");
|
||||
|
||||
entity.Property(e => e.NameShort).HasColumnName("nameShort");
|
||||
|
||||
entity.Property(e => e.NumGames).HasColumnName("numGames");
|
||||
|
||||
entity.Property(e => e.NumTeams).HasColumnName("numTeams");
|
||||
|
||||
entity.Property(e => e.NumWildcardTeams).HasColumnName("numWildcardTeams");
|
||||
|
||||
entity.Property(e => e.OrgCode).HasColumnName("orgCode");
|
||||
|
||||
entity.Property(e => e.SeasonState).HasColumnName("seasonState");
|
||||
|
||||
entity.Property(e => e.SortOrder).HasColumnName("sortOrder");
|
||||
|
||||
entity.Property(e => e.SportId).HasColumnName("sportId");
|
||||
});
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
}
|
||||
|
||||
partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
|
||||
}
|
||||
}
|
||||
22
leagues/Dockerfile
Normal file
22
leagues/Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["Leagues.csproj", "."]
|
||||
RUN dotnet restore "./Leagues.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/."
|
||||
RUN dotnet build "Leagues.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN dotnet publish "Leagues.csproj" -c Release -o /app/publish /p:UseAppHost=false
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "Leagues.dll"]
|
||||
27
leagues/Entities/League.cs
Normal file
27
leagues/Entities/League.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Leagues.Entities
|
||||
{
|
||||
public partial class League
|
||||
{
|
||||
public int? Id { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Link { get; set; }
|
||||
public string? Abbreviation { get; set; }
|
||||
public string? NameShort { get; set; }
|
||||
public string? SeasonState { get; set; }
|
||||
public string? HasWildCard { get; set; }
|
||||
public string? HasSplitSeason { get; set; }
|
||||
public int? NumGames { get; set; }
|
||||
public string? HasPlayoffPoints { get; set; }
|
||||
public int? NumTeams { get; set; }
|
||||
public int? NumWildcardTeams { get; set; }
|
||||
public string? OrgCode { get; set; }
|
||||
public string? ConferencesInUse { get; set; }
|
||||
public string? DivisionsInUse { get; set; }
|
||||
public int? SportId { get; set; }
|
||||
public int? SortOrder { get; set; }
|
||||
public string? Active { get; set; }
|
||||
}
|
||||
}
|
||||
25
leagues/Handlers/GetLeagueByIdQueryHandler.cs
Normal file
25
leagues/Handlers/GetLeagueByIdQueryHandler.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using Leagues.DbContexts;
|
||||
using Leagues.Entities;
|
||||
using Leagues.Queries;
|
||||
using MediatR;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Leagues.Handlers
|
||||
{
|
||||
public class GetLeagueByIdQueryHandler : IRequestHandler<GetLeagueByIdQuery, League>
|
||||
{
|
||||
private readonly LeaguesContext _dbContext;
|
||||
|
||||
public GetLeagueByIdQueryHandler(LeaguesContext dbContext)
|
||||
{
|
||||
_dbContext = dbContext ?? throw new ArgumentException(nameof(dbContext));
|
||||
}
|
||||
|
||||
public async Task<League> Handle(GetLeagueByIdQuery request, CancellationToken cancellation)
|
||||
{
|
||||
return await _dbContext.Leagues.Where(l => l.Id == request.LeagueId).FirstOrDefaultAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
27
leagues/Handlers/GetLeaguesQueryHandler.cs
Normal file
27
leagues/Handlers/GetLeaguesQueryHandler.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using Leagues.DbContexts;
|
||||
using Leagues.Entities;
|
||||
using Leagues.Helpers;
|
||||
using Leagues.Queries;
|
||||
using MediatR;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Leagues.Handlers
|
||||
{
|
||||
public class GetLeaguesQueryHandler : IRequestHandler<GetLeaguesQuery, PagedList<League>>
|
||||
{
|
||||
private readonly LeaguesContext _dbContext;
|
||||
|
||||
public GetLeaguesQueryHandler(LeaguesContext dbContext)
|
||||
{
|
||||
_dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext));
|
||||
}
|
||||
|
||||
public async Task<PagedList<League>> Handle(GetLeaguesQuery request, CancellationToken cancellationToken)
|
||||
{
|
||||
var leagues = await _dbContext.Leagues.ToListAsync();
|
||||
return PagedList<League>.ToPagedList(await _dbContext.Leagues.ToListAsync(), request.PageNumber, request.PageSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
33
leagues/Helpers/PagedList.cs
Normal file
33
leagues/Helpers/PagedList.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
|
||||
namespace Leagues.Helpers
|
||||
{
|
||||
public class PagedList<T> : List<T>
|
||||
{
|
||||
public int CurrentPage { get; set; }
|
||||
public int PageSize { get; private set; }
|
||||
public int TotalCount { get; private set; }
|
||||
public int TotalPages { get; private set; }
|
||||
|
||||
public PagedList(List<T> items, int count, int pageNumber, int pageSize)
|
||||
{
|
||||
CurrentPage = pageNumber;
|
||||
PageSize = pageSize;
|
||||
TotalCount = count;
|
||||
TotalPages = (int)Math.Ceiling(count / (double)pageSize);
|
||||
|
||||
AddRange(items);
|
||||
}
|
||||
|
||||
public static PagedList<T> ToPagedList(List<T> source, int pageNumber, int pageSize)
|
||||
{
|
||||
var count = source.Count();
|
||||
var items = source.Skip((pageNumber - 1) * pageSize)
|
||||
.Take(pageSize)
|
||||
.ToList();
|
||||
|
||||
return new PagedList<T>(items, count, pageNumber, pageSize);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
42
leagues/Leagues.csproj
Normal file
42
leagues/Leagues.csproj
Normal file
@@ -0,0 +1,42 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<DockerComposeProjectPath>docker-compose.dcproj</DockerComposeProjectPath>
|
||||
<UserSecretsId>0b95fa61-db3b-4772-b9a4-a8297fd2aaa3</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.14">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="MediatR.Extensions.Microsoft.DependencyInjection" Version="11.1.0" />
|
||||
<PackageReference Include="MediatR" Version="11.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="MediatR" />
|
||||
<None Remove="MediatR.Extensions.Microsoft.DependencyInjection" />
|
||||
<None Remove="Commands\" />
|
||||
<None Remove="Queries\" />
|
||||
<None Remove="Handlers\" />
|
||||
<None Remove="DbContexts\" />
|
||||
<None Remove="Npgsql.EntityFrameworkCore.PostgreSQL" />
|
||||
<None Remove="Microsoft.EntityFrameworkCore.Tools" />
|
||||
<None Remove="Helpers\" />
|
||||
<None Remove="Newtonsoft.Json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Commands\" />
|
||||
<Folder Include="Queries\" />
|
||||
<Folder Include="Handlers\" />
|
||||
<Folder Include="DbContexts\" />
|
||||
<Folder Include="Helpers\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
31
leagues/Leagues.sln
Normal file
31
leagues/Leagues.sln
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 25.0.1704.2
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Leagues", "Leagues.csproj", "{5B0AD12C-DA44-430A-B488-231A317A0C19}"
|
||||
EndProject
|
||||
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "docker-compose.dcproj", "{F55D28D7-C1E6-4EC0-AC74-E7FD532F502E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{5B0AD12C-DA44-430A-B488-231A317A0C19}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5B0AD12C-DA44-430A-B488-231A317A0C19}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5B0AD12C-DA44-430A-B488-231A317A0C19}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5B0AD12C-DA44-430A-B488-231A317A0C19}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{F55D28D7-C1E6-4EC0-AC74-E7FD532F502E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{F55D28D7-C1E6-4EC0-AC74-E7FD532F502E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{F55D28D7-C1E6-4EC0-AC74-E7FD532F502E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{F55D28D7-C1E6-4EC0-AC74-E7FD532F502E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {0394487B-2CBD-4283-BE74-21572A5E3D11}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
36
leagues/Program.cs
Normal file
36
leagues/Program.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Leagues.DbContexts;
|
||||
using MediatR;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add services to the container.
|
||||
|
||||
builder.Services.AddMediatR(typeof(Program));
|
||||
|
||||
builder.Services.AddControllers();
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
builder.Services.AddDbContext<LeaguesContext>(dbContextOptions =>
|
||||
dbContextOptions.UseNpgsql(builder.Configuration["ConnectionStrings:DBConnectionString"])
|
||||
);
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
}
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
|
||||
30
leagues/Properties/launchSettings.json
Normal file
30
leagues/Properties/launchSettings.json
Normal file
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:47406",
|
||||
"sslPort": 44388
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"Leagues": {
|
||||
"commandName": "Project",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "https://localhost:7530;http://localhost:5530",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
leagues/Queries/GetLeagueByIdQuery.cs
Normal file
11
leagues/Queries/GetLeagueByIdQuery.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
using System;
|
||||
using Leagues.Entities;
|
||||
using MediatR;
|
||||
|
||||
namespace Leagues.Queries
|
||||
{
|
||||
public record GetLeagueByIdQuery : IRequest<League>
|
||||
{
|
||||
public int LeagueId { get; set; }
|
||||
}
|
||||
}
|
||||
13
leagues/Queries/GetLeaguesQuery.cs
Normal file
13
leagues/Queries/GetLeaguesQuery.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using Leagues.Entities;
|
||||
using Leagues.Helpers;
|
||||
using MediatR;
|
||||
|
||||
namespace Leagues.Queries
|
||||
{
|
||||
public record GetLeaguesQuery : IRequest<PagedList<League>>
|
||||
{
|
||||
public int PageNumber { get; set; }
|
||||
public int PageSize { get; set; }
|
||||
}
|
||||
}
|
||||
13
leagues/appsettings.Development.json
Normal file
13
leagues/appsettings.Development.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"DBConnectionString": "Host=localhost;Port=5430;Database=leagues;Username=postgres;Password=postgres"
|
||||
}
|
||||
}
|
||||
|
||||
10
leagues/appsettings.json
Normal file
10
leagues/appsettings.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
}
|
||||
|
||||
18
leagues/docker-compose.dcproj
Normal file
18
leagues/docker-compose.dcproj
Normal file
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" Sdk="Microsoft.Docker.Sdk" DefaultTargets="Build">
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectVersion>2.1</ProjectVersion>
|
||||
<DockerTargetOS>Linux</DockerTargetOS>
|
||||
<ProjectGuid>{F55D28D7-C1E6-4EC0-AC74-E7FD532F502E}</ProjectGuid>
|
||||
<DockerLaunchBrowser>True</DockerLaunchBrowser>
|
||||
<DockerServiceUrl>{Scheme}://localhost:{ServicePort}/swagger</DockerServiceUrl>
|
||||
<DockerServiceName>leagues</DockerServiceName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="docker-compose.override.yml">
|
||||
<DependentUpon>docker-compose.yml</DependentUpon>
|
||||
</None>
|
||||
<None Include="docker-compose.yml" />
|
||||
<None Include=".dockerignore" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
13
leagues/docker-compose.override.yml
Normal file
13
leagues/docker-compose.override.yml
Normal file
@@ -0,0 +1,13 @@
|
||||
version: '3.4'
|
||||
|
||||
services:
|
||||
leagues:
|
||||
environment:
|
||||
- ASPNETCORE_ENVIRONMENT=Development
|
||||
- ASPNETCORE_URLS=https://+:443;http://+:80
|
||||
ports:
|
||||
- "80"
|
||||
- "443"
|
||||
volumes:
|
||||
- ~/.aspnet/https:/root/.aspnet/https:ro
|
||||
- ~/.microsoft/usersecrets:/root/.microsoft/usersecrets:ro
|
||||
8
leagues/docker-compose.yml
Normal file
8
leagues/docker-compose.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
version: '3.4'
|
||||
|
||||
services:
|
||||
leagues:
|
||||
image: ${DOCKER_REGISTRY-}leagues
|
||||
build:
|
||||
context: .
|
||||
dockerfile: ./Dockerfile
|
||||
Reference in New Issue
Block a user