Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimpleCommerce with Dotnet Core 5 - Build Images as standalone or with postgres and pgadmin via dockercompose #960

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
*.sln.docstates

# Build results

[Dd]ebug/
[Rr]elease/
x64/
Expand All @@ -18,6 +17,10 @@ node_modules/
bower_components/
.vs/


#Database files
*.db

# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
!packages/*/build/

Expand Down Expand Up @@ -57,6 +60,9 @@ ipch/
*.sdf
*.cachefile

*.csproj-e
*.cs-e

# Visual Studio profiler
*.psess
*.vsp
Expand Down
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env

WORKDIR /app
COPY . ./

RUN sed -i 's#<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0" />#<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.0" />#' src/SimplCommerce.WebHost/SimplCommerce.WebHost.csproj
RUN sed -i 's#<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0" />#<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.0"/>#' src/SimplCommerce.WebHost/SimplCommerce.WebHost.csproj
RUN sed -i 's/UseSqlServer/UseNpgsql/' src/SimplCommerce.WebHost/Program.cs
RUN sed -i 's/UseSqlServer/UseNpgsql/' src/SimplCommerce.WebHost/Extensions/ServiceCollectionExtensions.cs

RUN rm src/SimplCommerce.WebHost/Migrations/* && cp -f src/SimplCommerce.WebHost/appsettings.docker.json src/SimplCommerce.WebHost/appsettings.json

RUN dotnet tool install --global dotnet-ef --version 3.1.0
RUN dotnet tool install --global dotnet-ef --version 5.0.1
ENV PATH="${PATH}:/root/.dotnet/tools"

# ef core migrations run in debug, so we have to build in Debug for copying module correctly
Expand All @@ -26,7 +26,7 @@ RUN dotnet build -c Release \
# remove BOM for psql
RUN sed -i -e '1s/^\xEF\xBB\xBF//' /app/src/SimplCommerce.WebHost/dbscript.sql

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
FROM mcr.microsoft.com/dotnet/aspnet:5.0

# hack to make postgresql-client install work on slim
RUN mkdir -p /usr/share/man/man1 \
Expand All @@ -35,6 +35,7 @@ RUN mkdir -p /usr/share/man/man1 \
RUN apt-get update \
&& apt-get install -y --no-install-recommends postgresql-client \
&& apt-get install libgdiplus -y \
&& apt-get install curl -y \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app
Expand Down
11 changes: 7 additions & 4 deletions Dockerfile-sqlite
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build-env

WORKDIR /app
COPY . ./

RUN sed -i 's#<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0" />#<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.0" />#' src/SimplCommerce.WebHost/SimplCommerce.WebHost.csproj
RUN sed -i 's#<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0"/>#<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.0"/>#' src/SimplCommerce.WebHost/SimplCommerce.WebHost.csproj
RUN sed -i 's/UseSqlServer/UseSqlite/' src/SimplCommerce.WebHost/Program.cs
RUN sed -i 's/UseSqlServer/UseSqlite/' src/SimplCommerce.WebHost/Extensions/ServiceCollectionExtensions.cs
RUN sed -i 's/UseNpgsql/UseSqlite/' src/SimplCommerce.WebHost/Program.cs
RUN sed -i 's/UseNpgsql/UseSqlite/' src/SimplCommerce.WebHost/Extensions/ServiceCollectionExtensions.cs
RUN sed -i 's/"DefaultConnection": ".*"/"DefaultConnection": "Data Source=simplcommerce.db"/' src/SimplCommerce.WebHost/appsettings.json

RUN rm src/SimplCommerce.WebHost/Migrations/*

RUN dotnet tool install --global dotnet-ef --version 3.1.0
RUN dotnet tool install --global dotnet-ef --version 5.0.1
ENV PATH="${PATH}:/root/.dotnet/tools"

# ef core migrations run in debug, so we have to build in Debug for copying module correctly
Expand All @@ -24,10 +26,11 @@ RUN dotnet build -c Release \
&& dotnet build -c Release \
&& dotnet publish -c Release -o out

FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
FROM mcr.microsoft.com/dotnet/aspnet:5.0

RUN apt-get update \
&& apt-get install libgdiplus -y \
&& apt-get install curl -y \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /app
Expand Down
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core

trigger:
- master
- dotnet5/docker

jobs:
- job: Linux
Expand Down
56 changes: 56 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
version: '3.5'

services:
simpldb:
container_name: postgres_container
image: postgres
hostname: simpldb
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
volumes:
- postgres:/var/lib/postgresql/data/
# Uncomment this section if you want to expose the database on the host.
# Otherwise is only reachable for the commerce and pgadmin over simpldb host/service
#ports:
# - "5432:5432"
networks:
- gateway
restart: unless-stopped

pgadmin:
container_name: pgadmin_container
image: dpage/pgadmin4
hostname: pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-pgadmin4@pgadmin.org}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-admin}
volumes:
- pgadmin:/root/.pgadmin
ports:
- "${PGADMIN_PORT:-8080}:80"
networks:
- gateway
restart: unless-stopped

simplcommerce:
container_name: simplcommerce_container
hostname: simplcommerce
image: shinojosa/simplcommerce
environment:
PGPASSWORD: ${POSTGRES_PASSWORD:-postgres}
depends_on:
- simpldb
ports:
- "80:80"
networks:
- gateway
restart: unless-stopped

networks:
gateway:

volumes:
postgres:
pgadmin:
3 changes: 3 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#!/bin/bash
set -e

# Just for dev pourpouses.
export POSTGRES_PASSWORD=postgres

if psql -h simpldb --username postgres -lqt | cut -d \| -f 1 | grep -qw simplcommerce; then
echo "simplcommerce database existed"
else
Expand Down
49 changes: 49 additions & 0 deletions howto-build-withdocker.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# simplcommerce with sqlite
You can make the build locally with `./simpl-build-sqlite.sh`
Then create the container: `docker build --rm -t simplcommerce-sqlite -f Dockerfile-sqlite . `

# simplcommerce with postgres
You can make the build locally with `./simpl-build.sh`
Before running the build make sure you have an instance of postgres up and running. Depending on your goal you can persist the data by mounting a volume or not. Here a sample way to achieve it
## Persisting Data
`mkdir ${HOME}/postgres-data/`
`docker run -d --name postgres -e POSTGRES_PASSWORD=postgres -v ${HOME}/postgres-data/:/var/lib/postgresql/data -p 5432:5432 postgres`
## Data inside container. Recreate it as you want.
`docker run -d --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres`

### Routing simpldb to localhost or wherever the DB is running
An easy hack for calling (finding) the dabase under the name `simpledb` we make a change in the hosts file of the OS.
> For localhost we do a mapping in /etc/hosts
`127.0.0.1 simpldb`
## Build the container
`docker build --rm -t simplcommerce -f Dockerfile . `

# Docker Compose with Simplecommerce, Postgres & PgAdmin
So you can test docker compose, the images are already created. You only need `docker` and `docker-compose`.


## Docker-compose commands
> build the app with clean DB
docker-compose up
> In detached mode
docker-compose up -d

> Gracefully shutdown (persisting data)
docker-compose down

> Destroy data (clean DB)
docker-compose down -v

## For Kubernetes is just the name of the service exposing postgresql in the same namespace


### Run postgre container for dev pourpouses standard ports on localhost (mount a postrgres-data directory for the Database)
`mkdir ${HOME}/postgres-data/`
`docker run -d --name postgres -e POSTGRES_PASSWORD=postgres -v ${HOME}/postgres-data/:/var/lib/postgresql/data -p 5432:5432 postgres`
###

### Run PGAdming to access the UI and do dbadmin stuff
`docker run -p 8080:80 -e 'PGADMIN_DEFAULT_EMAIL=user@domain.local' -e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' --name pgadmin -d dpage/pgadmin4`

Without docker-compose or defining a network you need to type the internal IP of the container so pgamin can connect it usually is something like 172.17.0.2 under IPAddress
`docker inspect postgres -f "{{json .NetworkSettings.Networks }}"`
27 changes: 27 additions & 0 deletions simpl-build-sqlite.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
## Shell script for compiling the app. This build does not depend on a database (sqlite), it will create a simplcommerce.db file.
##
set -e

sed -i'' -e 's|<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0"/>|<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.1"/>|' src/SimplCommerce.WebHost/SimplCommerce.WebHost.csproj
sed -i'' -e 's|<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.0"/>|<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.1"/>|' src/SimplCommerce.WebHost/SimplCommerce.WebHost.csproj

sed -i'' -e 's/UseSqlServer/UseSqlite/' src/SimplCommerce.WebHost/Program.cs
sed -i'' -e 's/UseSqlServer/UseSqlite/' src/SimplCommerce.WebHost/Extensions/ServiceCollectionExtensions.cs

sed -i'' -e 's/UseNpgsql/UseSqlite/' src/SimplCommerce.WebHost/Program.cs
sed -i'' -e 's/UseNpgsql/UseSqlite/' src/SimplCommerce.WebHost/Extensions/ServiceCollectionExtensions.cs

sed -i'' -e 's/"DefaultConnection": ".*"/"DefaultConnection": "Data Source=simplcommerce.db"/' src/SimplCommerce.WebHost/appsettings.json

rm -rf src/SimplCommerce.WebHost/Migrations/*
rm -rf src/SimplCommerce.WebHost/simplcommerce.db

dotnet restore && dotnet build

cd src/SimplCommerce.WebHost \
&& dotnet ef migrations add initialSchema \
&& dotnet ef database update

echo "The database schema has been created. Please execute the src/Database/StaticData_Postgres.sql to insert static data."
echo "Then type 'dotnet run' in src/SimplCommerce.WebHost to start the app."
14 changes: 13 additions & 1 deletion simpl-build.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
#!/bin/bash
## Shell script for compiling the app. THe uilding depends on a postgresql connection. If you don'T have one running,
## you can easily expose one with Docker like this:
## docker run -d --name postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres
## Also be sure to do the mapping to ETC Hosts or change the server to localhost.

set -e

sed -i'' -e 's|<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0" />|<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.0" />|' src/SimplCommerce.WebHost/SimplCommerce.WebHost.csproj
sed -i'' -e 's|<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.0"/>|<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.0"/>|' src/SimplCommerce.WebHost/SimplCommerce.WebHost.csproj
sed -i'' -e 's|<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.1"/>|<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.0"/>|' src/SimplCommerce.WebHost/SimplCommerce.WebHost.csproj
sed -i'' -e 's/UseSqlServer/UseNpgsql/' src/SimplCommerce.WebHost/Program.cs
sed -i'' -e 's/UseSqlServer/UseNpgsql/' src/SimplCommerce.WebHost/Extensions/ServiceCollectionExtensions.cs

sed -i'' -e 's/UseSqlite/UseNpgsql/' src/SimplCommerce.WebHost/Program.cs
sed -i'' -e 's/UseSqlite/UseNpgsql/' src/SimplCommerce.WebHost/Extensions/ServiceCollectionExtensions.cs

# For this to work you need a connection to the database. Spin an postgresql in howto-build-docker.md
sed -i'' -e 's/"DefaultConnection": ".*"/"DefaultConnection": "User ID=postgres;Password=postgres;Server=simpldb;Port=5432;Database=simplcommerce;Pooling=true;"/' src/SimplCommerce.WebHost/appsettings.json

rm -rf src/SimplCommerce.WebHost/Migrations/*

dotnet restore && dotnet build
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ public void Build(ModelBuilder modelBuilder)
);

modelBuilder.Entity<Widget>().HasData(
new Widget("CategoryWidget") { Name = "Category Widget", ViewComponentName = "CategoryWidget", CreateUrl = "widget-category-create", EditUrl = "widget-category-edit", CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 160, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)) },
new Widget("ProductWidget") { Name = "Product Widget", ViewComponentName = "ProductWidget", CreateUrl = "widget-product-create", EditUrl = "widget-product-edit", CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 163, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)) },
new Widget("SimpleProductWidget") { Name = "Simple Product Widget", ViewComponentName = "SimpleProductWidget", CreateUrl = "widget-simple-product-create", EditUrl = "widget-simple-product-edit", CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 163, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)) }
new Widget("CategoryWidget") { Name = "Category Widget", ViewComponentName = "CategoryWidget", CreateUrl = "widget-category-create", EditUrl = "widget-category-edit", CreatedOn = new DateTimeOffset(new DateTime(2020, 5, 29, 4, 33, 39, 160, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)) },
new Widget("ProductWidget") { Name = "Product Widget", ViewComponentName = "ProductWidget", CreateUrl = "widget-product-create", EditUrl = "widget-product-edit", CreatedOn = new DateTimeOffset(new DateTime(2020, 5, 29, 4, 33, 39, 163, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)) },
new Widget("SimpleProductWidget") { Name = "Simple Product Widget", ViewComponentName = "SimpleProductWidget", CreateUrl = "widget-simple-product-create", EditUrl = "widget-simple-product-edit", CreatedOn = new DateTimeOffset(new DateTime(2020, 5, 29, 4, 33, 39, 163, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)) }
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public void Build(ModelBuilder modelBuilder)
);

modelBuilder.Entity<Widget>().HasData(
new Widget("HtmlWidget") { Name = "Html Widget", ViewComponentName = "HtmlWidget", CreateUrl = "widget-html-create", EditUrl = "widget-html-edit", CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 164, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)) },
new Widget("CarouselWidget") { Name = "Carousel Widget", ViewComponentName = "CarouselWidget", CreateUrl = "widget-carousel-create", EditUrl = "widget-carousel-edit", CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 164, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)) },
new Widget("SpaceBarWidget") { Name = "SpaceBar Widget", ViewComponentName = "SpaceBarWidget", CreateUrl = "widget-spacebar-create", EditUrl = "widget-spacebar-edit", CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 164, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)) }
new Widget("HtmlWidget") { Name = "Html Widget", ViewComponentName = "HtmlWidget", CreateUrl = "widget-html-create", EditUrl = "widget-html-edit", CreatedOn = new DateTimeOffset(new DateTime(2020, 5, 29, 4, 33, 39, 164, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)) },
new Widget("CarouselWidget") { Name = "Carousel Widget", ViewComponentName = "CarouselWidget", CreateUrl = "widget-carousel-create", EditUrl = "widget-carousel-edit", CreatedOn = new DateTimeOffset(new DateTime(2020, 5, 29, 4, 33, 39, 164, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)) },
new Widget("SpaceBarWidget") { Name = "SpaceBar Widget", ViewComponentName = "SpaceBarWidget", CreateUrl = "widget-spacebar-create", EditUrl = "widget-spacebar-edit", CreatedOn = new DateTimeOffset(new DateTime(2020, 5, 29, 4, 33, 39, 164, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)) }
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Modules/SimplCommerce.Module.Core/Data/CoreSeedData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public static void SeedData(ModelBuilder builder)
);

builder.Entity<User>().HasData(
new User { Id = 2L, AccessFailedCount = 0, ConcurrencyStamp = "101cd6ae-a8ef-4a37-97fd-04ac2dd630e4", CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 189, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), Email = "system@simplcommerce.com", EmailConfirmed = false, FullName = "System User", IsDeleted = true, LockoutEnabled = false, NormalizedEmail = "SYSTEM@SIMPLCOMMERCE.COM", NormalizedUserName = "SYSTEM@SIMPLCOMMERCE.COM", PasswordHash = "AQAAAAEAACcQAAAAEAEqSCV8Bpg69irmeg8N86U503jGEAYf75fBuzvL00/mr/FGEsiUqfR0rWBbBUwqtw==", PhoneNumberConfirmed = false, SecurityStamp = "a9565acb-cee6-425f-9833-419a793f5fba", TwoFactorEnabled = false, LatestUpdatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 189, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), UserGuid = new Guid("5f72f83b-7436-4221-869c-1b69b2e23aae"), UserName = "system@simplcommerce.com" },
new User { Id = 10L, AccessFailedCount = 0, ConcurrencyStamp = "c83afcbc-312c-4589-bad7-8686bd4754c0", CreatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 190, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), Email = "admin@simplcommerce.com", EmailConfirmed = false, FullName = "Shop Admin", IsDeleted = false, LockoutEnabled = false, NormalizedEmail = "ADMIN@SIMPLCOMMERCE.COM", NormalizedUserName = "ADMIN@SIMPLCOMMERCE.COM", PasswordHash = "AQAAAAEAACcQAAAAEAEqSCV8Bpg69irmeg8N86U503jGEAYf75fBuzvL00/mr/FGEsiUqfR0rWBbBUwqtw==", PhoneNumberConfirmed = false, SecurityStamp = "d6847450-47f0-4c7a-9fed-0c66234bf61f", TwoFactorEnabled = false, LatestUpdatedOn = new DateTimeOffset(new DateTime(2018, 5, 29, 4, 33, 39, 190, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), UserGuid = new Guid("ed8210c3-24b0-4823-a744-80078cf12eb4"), UserName = "admin@simplcommerce.com" }
new User { Id = 2L, AccessFailedCount = 0, ConcurrencyStamp = "101cd6ae-a8ef-4a37-97fd-04ac2dd630e4", CreatedOn = new DateTimeOffset(new DateTime(2020, 5, 29, 4, 33, 39, 189, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), Email = "system@simplcommerce.com", EmailConfirmed = false, FullName = "System User", IsDeleted = true, LockoutEnabled = false, NormalizedEmail = "SYSTEM@SIMPLCOMMERCE.COM", NormalizedUserName = "SYSTEM@SIMPLCOMMERCE.COM", PasswordHash = "AQAAAAEAACcQAAAAEAEqSCV8Bpg69irmeg8N86U503jGEAYf75fBuzvL00/mr/FGEsiUqfR0rWBbBUwqtw==", PhoneNumberConfirmed = false, SecurityStamp = "a9565acb-cee6-425f-9833-419a793f5fba", TwoFactorEnabled = false, LatestUpdatedOn = new DateTimeOffset(new DateTime(2020, 5, 29, 4, 33, 39, 189, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), UserGuid = new Guid("5f72f83b-7436-4221-869c-1b69b2e23aae"), UserName = "system@simplcommerce.com" },
new User { Id = 10L, AccessFailedCount = 0, ConcurrencyStamp = "c83afcbc-312c-4589-bad7-8686bd4754c0", CreatedOn = new DateTimeOffset(new DateTime(2020, 5, 29, 4, 33, 39, 190, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), Email = "admin@simplcommerce.com", EmailConfirmed = false, FullName = "Shop Admin", IsDeleted = false, LockoutEnabled = false, NormalizedEmail = "ADMIN@SIMPLCOMMERCE.COM", NormalizedUserName = "ADMIN@SIMPLCOMMERCE.COM", PasswordHash = "AQAAAAEAACcQAAAAEAEqSCV8Bpg69irmeg8N86U503jGEAYf75fBuzvL00/mr/FGEsiUqfR0rWBbBUwqtw==", PhoneNumberConfirmed = false, SecurityStamp = "d6847450-47f0-4c7a-9fed-0c66234bf61f", TwoFactorEnabled = false, LatestUpdatedOn = new DateTimeOffset(new DateTime(2020, 5, 29, 4, 33, 39, 190, DateTimeKind.Unspecified), new TimeSpan(0, 7, 0, 0, 0)), UserGuid = new Guid("ed8210c3-24b0-4823-a744-80078cf12eb4"), UserName = "admin@simplcommerce.com" }
);

builder.Entity<UserRole>().HasData(
Expand Down