Skip to content

Commit d660171

Browse files
committed
updated docker docs
1 parent 888c32a commit d660171

File tree

5 files changed

+25
-19
lines changed

5 files changed

+25
-19
lines changed

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,15 @@ So, here is an in-depth video that takes you through the BlazorHero Project! Do
5858
- Blazor WebAssembly 5.0 - ASP.NET Core Hosted Model
5959
- [Entity Framework Core 5.0](https://docs.microsoft.com/en-us/ef/core/)
6060

61-
# BlazorHero v2.1
61+
# BlazorHero v2.2
6262

63-
- minor bug fixes
64-
- UI improvements
65-
- validation messages fixed
66-
- fluent validation support
63+
- UI Improvements
64+
- Docker Support
65+
- Better Permissions Management
66+
- Code Cleanups
67+
- RTL Support
68+
- Minor Bug Fixes
69+
- Better Project Structure
6770

6871
# Getting Started 🦸
6972

@@ -81,6 +84,21 @@ The easiest way to get started with Blazor Hero is to install the [NuGet package
8184

8285
What to do next? Read the [entire guide on my blog](https://codewithmukesh.com/blog/blazor-hero-quick-start-guide/).
8386

87+
## Getting Started with Docker in Windows :rocket:
88+
89+
- Install Docker on Windows via `https://docs.docker.com/docker-for-windows/install/`
90+
- Open up Powershell on Windows and run the following
91+
- `cd c:\`
92+
- `dotnet dev-certs https -ep $env:USERPROFILE\.aspnet\https\aspnetapp.pfx -p securePassword123`
93+
- `dotnet dev-certs https --trust`
94+
- Note - Make sure that you use the same password that has been configured in the `docker-compose.yml` file. By default, `securePassword123` is configured.
95+
- 5005 & 5006 are the ports setup to run blazorHero on Docker, so make sure that these ports are free. You could also change the ports in the `docker-compose.yml` and `Server\Dockerfile` files.
96+
- Now navigate back to the root of the BlazorHero Project on your local machine and run the following via terminal - `docker-compose -f 'docker-compose.yml' up --build`
97+
- This will start pulling MSSQL Server Image from Docker Hub if you don't already have this image. It's around 500+ Mbs of download.
98+
- Once that is done, dotnet SDKs and runtimes are downloaded, if not present already. That's almost 200+ more Mbs of download.
99+
- PS If you find any issues while Docker installs the nuget packages, it is most likelt that your ssl certificates are not intalled properly. Apart from that I also added the `--disable-parallel` in the `Server\Dockerfile`to ensure network issues don't pop-up. You can remove this option to speed up the build process.
100+
- That's almost everything. Once the containers are available, migrations are updated in the MSSQL DB, default data is seeded.
101+
- Browse to https://localhost:5005/ to use your version of BlazorHero !
84102

85103
# Complete Documentation :rocket:
86104

docker-compose.dcproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
<DockerServiceName>server</DockerServiceName>
1010
</PropertyGroup>
1111
<ItemGroup>
12-
<None Include="docker-compose.override.yml">
13-
<DependentUpon>docker-compose.yml</DependentUpon>
14-
</None>
1512
<None Include="docker-compose.yml" />
1613
<None Include=".dockerignore" />
1714
</ItemGroup>

docker-compose.override.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ services:
88
dockerfile: src/Server/Dockerfile
99
environment:
1010
- "ConnectionStrings__DefaultConnection=Server=db;Database=BlazorHero;User=sa;Password=Your_password123;MultipleActiveResultSets=true"
11-
- "ASPNETCORE_Kestrel__Certificates__Default__Password=Your_password123"
11+
- "ASPNETCORE_Kestrel__Certificates__Default__Password=securePassword123"
1212
- "ASPNETCORE_Kestrel__Certificates__Default__Path=/https/aspnetapp.pfx"
1313
volumes:
1414
- ~/.aspnet/https:/https:ro

src/Server/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ COPY ["src/Infrastructure.Shared/Infrastructure.Shared.csproj", "src/Infrastruct
1616
COPY ["src/Infrastructure/Infrastructure.csproj", "src/Infrastructure/"]
1717
COPY ["src/Client/Client.csproj", "src/Client/"]
1818
COPY ["src/Client.Infrastructure/Client.Infrastructure.csproj", "src/Client.Infrastructure/"]
19-
RUN dotnet restore "src/Server/Server.csproj"
19+
RUN dotnet restore "src/Server/Server.csproj" --disable-parallel
2020
COPY . .
2121
WORKDIR "/src/src/Server"
2222
RUN dotnet build "Server.csproj" -c Release -o /app/build

0 commit comments

Comments
 (0)