Skip to content

Essentially, I'm going to put together a collection of small Docker contained Microservices for a reference or quickstart guide

Notifications You must be signed in to change notification settings

rogueco/Dotnet5.Docker.Templates.PostGresMicroservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Whats the purpose

Essentially, I'm going to put together a collection of small Docker contained Microservices for a reference or quickstart guide

image

Run Project

Just run from the root directory & the applicaiton will build

docker-compose -f docker-compose.yml -f docker-compose.override.yml up -d

Database Connection

To look at the database you can use the following connections (Please note that you'll need to have the image running to connect)

Username: admin
Password: admin1234
Port: 5432

Docker Image

If you don't want to pull down a PostGRES SQL database, you can just copy the following to create a docker image

docker run --name some-postgres -e POSTGRES_USER=admin -e POSTGRES_PASSWORD=admin1234 -p 5432:5432 -d postgres:latest

These credentials will give you access to the DB

Add Migration

Navigate to the base of the solution

dotnet-ef migrations add MigrationName

Update Database

Any migration that are pending are handled automatically by the process in Program.cs

var context = services.GetRequiredService<DataContext>();
await context.Database.MigrateAsync();
await TodoSeedDataContext.SeedData(context);

About

Essentially, I'm going to put together a collection of small Docker contained Microservices for a reference or quickstart guide

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published