Added dockerfile, added compose

This commit is contained in:
2020-11-23 09:23:05 +01:00
parent 9d55c39e33
commit 85320d3cf3
14 changed files with 217 additions and 7 deletions

View File

@@ -20,6 +20,12 @@ namespace Birdmap.API
logger.Debug("Building host...");
var host = CreateHostBuilder(args).Build();
using (var scope = host.Services.CreateScope())
{
var db = scope.ServiceProvider.GetRequiredService<BirdmapContext>();
db.Database.EnsureCreated();
}
logger.Debug("Seeding database...");
SeedDatabase(host);