Skip to content

Commit

Permalink
(#239) Add Aspire
Browse files Browse the repository at this point in the history
  • Loading branch information
phongnguyend committed Jun 19, 2024
1 parent 59858c2 commit 9f6510b
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 84 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/.net-build-monolith.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.100
dotnet-version: 8.0.300

- name: Build
run: dotnet build --configuration Release
Expand Down
16 changes: 2 additions & 14 deletions src/Monolith/ClassifiedAds.BackgroundServer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,13 @@ WORKDIR /ClassifiedAds.Monolith

# Copy csproj and restore as distinct layers
COPY ./ClassifiedAds.Application/*.csproj ./ClassifiedAds.Application/
COPY ./ClassifiedAds.ArchTests/*.csproj ./ClassifiedAds.ArchTests/
COPY ./ClassifiedAds.BackgroundServer/*.csproj ./ClassifiedAds.BackgroundServer/
COPY ./ClassifiedAds.Blazor.Modules/*.csproj ./ClassifiedAds.Blazor.Modules/
COPY ./ClassifiedAds.BlazorServerSide/*.csproj ./ClassifiedAds.BlazorServerSide/
COPY ./ClassifiedAds.BlazorWebAssembly/*.csproj ./ClassifiedAds.BlazorWebAssembly/
COPY ./ClassifiedAds.ContractTests/*.csproj ./ClassifiedAds.ContractTests/
COPY ./ClassifiedAds.CrossCuttingConcerns/*.csproj ./ClassifiedAds.CrossCuttingConcerns/
COPY ./ClassifiedAds.Domain/*.csproj ./ClassifiedAds.Domain/
COPY ./ClassifiedAds.EndToEndTests/*.csproj ./ClassifiedAds.EndToEndTests/
COPY ./ClassifiedAds.GraphQL/*.csproj ./ClassifiedAds.GraphQL/
COPY ./ClassifiedAds.Infrastructure/*.csproj ./ClassifiedAds.Infrastructure/
COPY ./ClassifiedAds.IntegrationTests/*.csproj ./ClassifiedAds.IntegrationTests/
COPY ./ClassifiedAds.Migrator/*.csproj ./ClassifiedAds.Migrator/
COPY ./ClassifiedAds.Persistence/*.csproj ./ClassifiedAds.Persistence/
COPY ./ClassifiedAds.UnitTests/*.csproj ./ClassifiedAds.UnitTests/
COPY ./ClassifiedAds.WebAPI/*.csproj ./ClassifiedAds.WebAPI/
COPY ./ClassifiedAds.WebMVC/*.csproj ./ClassifiedAds.WebMVC/
COPY ./ClassifiedAds.Monolith.sln .
RUN dotnet restore

RUN dotnet restore ./ClassifiedAds.BackgroundServer/ClassifiedAds.BackgroundServer.csproj

# Copy everything else and build
COPY . ./
Expand Down
15 changes: 2 additions & 13 deletions src/Monolith/ClassifiedAds.BlazorServerSide/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,14 @@ WORKDIR /ClassifiedAds.Monolith

# Copy csproj and restore as distinct layers
COPY ./ClassifiedAds.Application/*.csproj ./ClassifiedAds.Application/
COPY ./ClassifiedAds.ArchTests/*.csproj ./ClassifiedAds.ArchTests/
COPY ./ClassifiedAds.BackgroundServer/*.csproj ./ClassifiedAds.BackgroundServer/
COPY ./ClassifiedAds.Blazor.Modules/*.csproj ./ClassifiedAds.Blazor.Modules/
COPY ./ClassifiedAds.BlazorServerSide/*.csproj ./ClassifiedAds.BlazorServerSide/
COPY ./ClassifiedAds.BlazorWebAssembly/*.csproj ./ClassifiedAds.BlazorWebAssembly/
COPY ./ClassifiedAds.ContractTests/*.csproj ./ClassifiedAds.ContractTests/
COPY ./ClassifiedAds.CrossCuttingConcerns/*.csproj ./ClassifiedAds.CrossCuttingConcerns/
COPY ./ClassifiedAds.Domain/*.csproj ./ClassifiedAds.Domain/
COPY ./ClassifiedAds.EndToEndTests/*.csproj ./ClassifiedAds.EndToEndTests/
COPY ./ClassifiedAds.GraphQL/*.csproj ./ClassifiedAds.GraphQL/
COPY ./ClassifiedAds.Infrastructure/*.csproj ./ClassifiedAds.Infrastructure/
COPY ./ClassifiedAds.IntegrationTests/*.csproj ./ClassifiedAds.IntegrationTests/
COPY ./ClassifiedAds.Migrator/*.csproj ./ClassifiedAds.Migrator/
COPY ./ClassifiedAds.Persistence/*.csproj ./ClassifiedAds.Persistence/
COPY ./ClassifiedAds.UnitTests/*.csproj ./ClassifiedAds.UnitTests/
COPY ./ClassifiedAds.WebAPI/*.csproj ./ClassifiedAds.WebAPI/
COPY ./ClassifiedAds.WebMVC/*.csproj ./ClassifiedAds.WebMVC/
COPY ./ClassifiedAds.Monolith.sln .
RUN dotnet restore

RUN dotnet restore ./ClassifiedAds.BlazorServerSide/ClassifiedAds.BlazorServerSide.csproj

# Copy everything else and build
COPY . ./
Expand Down
16 changes: 2 additions & 14 deletions src/Monolith/ClassifiedAds.GraphQL/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,13 @@ WORKDIR /ClassifiedAds.Monolith

# Copy csproj and restore as distinct layers
COPY ./ClassifiedAds.Application/*.csproj ./ClassifiedAds.Application/
COPY ./ClassifiedAds.ArchTests/*.csproj ./ClassifiedAds.ArchTests/
COPY ./ClassifiedAds.BackgroundServer/*.csproj ./ClassifiedAds.BackgroundServer/
COPY ./ClassifiedAds.Blazor.Modules/*.csproj ./ClassifiedAds.Blazor.Modules/
COPY ./ClassifiedAds.BlazorServerSide/*.csproj ./ClassifiedAds.BlazorServerSide/
COPY ./ClassifiedAds.BlazorWebAssembly/*.csproj ./ClassifiedAds.BlazorWebAssembly/
COPY ./ClassifiedAds.ContractTests/*.csproj ./ClassifiedAds.ContractTests/
COPY ./ClassifiedAds.CrossCuttingConcerns/*.csproj ./ClassifiedAds.CrossCuttingConcerns/
COPY ./ClassifiedAds.Domain/*.csproj ./ClassifiedAds.Domain/
COPY ./ClassifiedAds.EndToEndTests/*.csproj ./ClassifiedAds.EndToEndTests/
COPY ./ClassifiedAds.GraphQL/*.csproj ./ClassifiedAds.GraphQL/
COPY ./ClassifiedAds.Infrastructure/*.csproj ./ClassifiedAds.Infrastructure/
COPY ./ClassifiedAds.IntegrationTests/*.csproj ./ClassifiedAds.IntegrationTests/
COPY ./ClassifiedAds.Migrator/*.csproj ./ClassifiedAds.Migrator/
COPY ./ClassifiedAds.Persistence/*.csproj ./ClassifiedAds.Persistence/
COPY ./ClassifiedAds.UnitTests/*.csproj ./ClassifiedAds.UnitTests/
COPY ./ClassifiedAds.WebAPI/*.csproj ./ClassifiedAds.WebAPI/
COPY ./ClassifiedAds.WebMVC/*.csproj ./ClassifiedAds.WebMVC/
COPY ./ClassifiedAds.Monolith.sln .
RUN dotnet restore

RUN dotnet restore ./ClassifiedAds.GraphQL/ClassifiedAds.GraphQL.csproj

# Copy everything else and build
COPY . ./
Expand Down
16 changes: 2 additions & 14 deletions src/Monolith/ClassifiedAds.Migrator/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,13 @@ WORKDIR /ClassifiedAds.Monolith

# Copy csproj and restore as distinct layers
COPY ./ClassifiedAds.Application/*.csproj ./ClassifiedAds.Application/
COPY ./ClassifiedAds.ArchTests/*.csproj ./ClassifiedAds.ArchTests/
COPY ./ClassifiedAds.BackgroundServer/*.csproj ./ClassifiedAds.BackgroundServer/
COPY ./ClassifiedAds.Blazor.Modules/*.csproj ./ClassifiedAds.Blazor.Modules/
COPY ./ClassifiedAds.BlazorServerSide/*.csproj ./ClassifiedAds.BlazorServerSide/
COPY ./ClassifiedAds.BlazorWebAssembly/*.csproj ./ClassifiedAds.BlazorWebAssembly/
COPY ./ClassifiedAds.ContractTests/*.csproj ./ClassifiedAds.ContractTests/
COPY ./ClassifiedAds.CrossCuttingConcerns/*.csproj ./ClassifiedAds.CrossCuttingConcerns/
COPY ./ClassifiedAds.Domain/*.csproj ./ClassifiedAds.Domain/
COPY ./ClassifiedAds.EndToEndTests/*.csproj ./ClassifiedAds.EndToEndTests/
COPY ./ClassifiedAds.GraphQL/*.csproj ./ClassifiedAds.GraphQL/
COPY ./ClassifiedAds.Infrastructure/*.csproj ./ClassifiedAds.Infrastructure/
COPY ./ClassifiedAds.IntegrationTests/*.csproj ./ClassifiedAds.IntegrationTests/
COPY ./ClassifiedAds.Migrator/*.csproj ./ClassifiedAds.Migrator/
COPY ./ClassifiedAds.Persistence/*.csproj ./ClassifiedAds.Persistence/
COPY ./ClassifiedAds.UnitTests/*.csproj ./ClassifiedAds.UnitTests/
COPY ./ClassifiedAds.WebAPI/*.csproj ./ClassifiedAds.WebAPI/
COPY ./ClassifiedAds.WebMVC/*.csproj ./ClassifiedAds.WebMVC/
COPY ./ClassifiedAds.Monolith.sln .
RUN dotnet restore

RUN dotnet restore ./ClassifiedAds.Migrator/ClassifiedAds.Migrator.csproj

# Copy everything else and build
COPY . ./
Expand Down
16 changes: 2 additions & 14 deletions src/Monolith/ClassifiedAds.WebAPI/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,13 @@ WORKDIR /ClassifiedAds.Monolith

# Copy csproj and restore as distinct layers
COPY ./ClassifiedAds.Application/*.csproj ./ClassifiedAds.Application/
COPY ./ClassifiedAds.ArchTests/*.csproj ./ClassifiedAds.ArchTests/
COPY ./ClassifiedAds.BackgroundServer/*.csproj ./ClassifiedAds.BackgroundServer/
COPY ./ClassifiedAds.Blazor.Modules/*.csproj ./ClassifiedAds.Blazor.Modules/
COPY ./ClassifiedAds.BlazorServerSide/*.csproj ./ClassifiedAds.BlazorServerSide/
COPY ./ClassifiedAds.BlazorWebAssembly/*.csproj ./ClassifiedAds.BlazorWebAssembly/
COPY ./ClassifiedAds.ContractTests/*.csproj ./ClassifiedAds.ContractTests/
COPY ./ClassifiedAds.CrossCuttingConcerns/*.csproj ./ClassifiedAds.CrossCuttingConcerns/
COPY ./ClassifiedAds.Domain/*.csproj ./ClassifiedAds.Domain/
COPY ./ClassifiedAds.EndToEndTests/*.csproj ./ClassifiedAds.EndToEndTests/
COPY ./ClassifiedAds.GraphQL/*.csproj ./ClassifiedAds.GraphQL/
COPY ./ClassifiedAds.Infrastructure/*.csproj ./ClassifiedAds.Infrastructure/
COPY ./ClassifiedAds.IntegrationTests/*.csproj ./ClassifiedAds.IntegrationTests/
COPY ./ClassifiedAds.Migrator/*.csproj ./ClassifiedAds.Migrator/
COPY ./ClassifiedAds.Persistence/*.csproj ./ClassifiedAds.Persistence/
COPY ./ClassifiedAds.UnitTests/*.csproj ./ClassifiedAds.UnitTests/
COPY ./ClassifiedAds.WebAPI/*.csproj ./ClassifiedAds.WebAPI/
COPY ./ClassifiedAds.WebMVC/*.csproj ./ClassifiedAds.WebMVC/
COPY ./ClassifiedAds.Monolith.sln .
RUN dotnet restore

RUN dotnet restore ./ClassifiedAds.WebAPI/ClassifiedAds.WebAPI.csproj

# Copy everything else and build
COPY . ./
Expand Down
16 changes: 2 additions & 14 deletions src/Monolith/ClassifiedAds.WebMVC/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,13 @@ WORKDIR /ClassifiedAds.Monolith

# Copy csproj and restore as distinct layers
COPY ./ClassifiedAds.Application/*.csproj ./ClassifiedAds.Application/
COPY ./ClassifiedAds.ArchTests/*.csproj ./ClassifiedAds.ArchTests/
COPY ./ClassifiedAds.BackgroundServer/*.csproj ./ClassifiedAds.BackgroundServer/
COPY ./ClassifiedAds.Blazor.Modules/*.csproj ./ClassifiedAds.Blazor.Modules/
COPY ./ClassifiedAds.BlazorServerSide/*.csproj ./ClassifiedAds.BlazorServerSide/
COPY ./ClassifiedAds.BlazorWebAssembly/*.csproj ./ClassifiedAds.BlazorWebAssembly/
COPY ./ClassifiedAds.ContractTests/*.csproj ./ClassifiedAds.ContractTests/
COPY ./ClassifiedAds.CrossCuttingConcerns/*.csproj ./ClassifiedAds.CrossCuttingConcerns/
COPY ./ClassifiedAds.Domain/*.csproj ./ClassifiedAds.Domain/
COPY ./ClassifiedAds.EndToEndTests/*.csproj ./ClassifiedAds.EndToEndTests/
COPY ./ClassifiedAds.GraphQL/*.csproj ./ClassifiedAds.GraphQL/
COPY ./ClassifiedAds.Infrastructure/*.csproj ./ClassifiedAds.Infrastructure/
COPY ./ClassifiedAds.IntegrationTests/*.csproj ./ClassifiedAds.IntegrationTests/
COPY ./ClassifiedAds.Migrator/*.csproj ./ClassifiedAds.Migrator/
COPY ./ClassifiedAds.Persistence/*.csproj ./ClassifiedAds.Persistence/
COPY ./ClassifiedAds.UnitTests/*.csproj ./ClassifiedAds.UnitTests/
COPY ./ClassifiedAds.WebAPI/*.csproj ./ClassifiedAds.WebAPI/
COPY ./ClassifiedAds.WebMVC/*.csproj ./ClassifiedAds.WebMVC/
COPY ./ClassifiedAds.Monolith.sln .
RUN dotnet restore

RUN dotnet restore ./ClassifiedAds.WebMVC/ClassifiedAds.WebMVC.csproj

# Copy everything else and build
COPY . ./
Expand Down

0 comments on commit 9f6510b

Please sign in to comment.