Skip to content

Commit

Permalink
Merge pull request #77 from neuroglia-io/feat-file-based-seeding
Browse files Browse the repository at this point in the history
Add a new `DatabaseProvisioner` service, used to seed the database using supplied files
  • Loading branch information
cdavernas authored Jan 22, 2025
2 parents 1422b45 + 9e1d18b commit a492b0c
Show file tree
Hide file tree
Showing 23 changed files with 443 additions and 129 deletions.
82 changes: 82 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: Bug Report
description: Create a bug report
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
:pray: Thanks for taking the time to fill out this bug report!
- type: markdown
attributes:
value: |
## Bug Report
- type: textarea
id: i-tried-this
attributes:
label: "I tried this:"
placeholder: "What did you try to do? A code snippet or example helps."
validations:
required: true

- type: textarea
id: instead-what-happened
attributes:
label: "This happened:"
placeholder: "What happened instead of what you've expected?"
validations:
required: true

- type: textarea
id: what-did-you-expect
attributes:
label: "I expected this:"
placeholder: "What did you expect to happen? Describe the output or behavior you expected to see (unless it's obvious)."

- type: textarea
id: workaround
attributes:
label: "Is there a workaround?"
placeholder: "What's the workaround to avoid this issue?"

- type: textarea
attributes:
label: Anything else?
placeholder: |
Links? References? Logs? Anything that will give us more context about the issue you are encountering.
Tip: You can attach images or log files by dragging files in.
- type: markdown
attributes:
value: |
## Environment
- type: dropdown
id: component
attributes:
label: "Component(s)"
multiple: true
options:
- Api
- Broker
- Gateway

- type: dropdown
id: platform
attributes:
label: "Platform(s)"
multiple: true
options:
- MacOS
- Linux
- Windows
- Other

- type: textarea
attributes:
label: Community Notes
value: |
<!-- Please keep this note for the community -->
* Please vote by adding a 👍 reaction to the issue to help us prioritize.
* If you are interested to work on this issue, please leave a comment.name: Bug Report 🐞
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
blank_issues_enabled: false
contact_links: []
47 changes: 47 additions & 0 deletions .github/ISSUE_TEMPLATE/feature.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Feature Request
description: Create a feature request
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
:pray: Thanks for taking the time to fill out this feature request!
- type: markdown
attributes:
value: |
## Feature Request
- type: textarea
id: what-would-you-like-to-be-added
attributes:
label: "What would you like to be added?"
placeholder: "Description of the feature you'd like to see."
validations:
required: true

- type: textarea
id: proposals
attributes:
label: "Proposal(s):"
placeholder: "Describe your proposal(s) and any relevant details here."

- type: textarea
id: alternatives
attributes:
label: "Alternative(s):"
placeholder: "Describe any alternative approaches, options, or suggestions you’d like to consider."

- type: textarea
id: additional-info
attributes:
label: "Additional info:"
placeholder: "Provide any supplementary details, context, or supporting information here."

- type: textarea
attributes:
label: Community Notes
value: |
<!-- Please keep this note for the community -->
* Please vote by adding a 👍 reaction to the feature to help us prioritize.
* If you are interested to work on this feature, please leave a comment.
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**Many thanks for submitting your Pull Request :heart:!**

**What this PR does / why we need it**:

**Special notes for reviewers**:

**Additional information (if needed):**
12 changes: 11 additions & 1 deletion CloudStreams.sln
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,24 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CloudStreams.Dashboard.Stat
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{129B2507-0C27-4324-AFC9-2C802E25E51D}"
ProjectSection(SolutionItems) = preProject
LICENSE = LICENSE
code-of-conduct.md = code-of-conduct.md
LICENSE = LICENSE
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "deployments", "deployments", "{990DE5C0-9BDB-417C-91D9-B3883C5FCA3E}"
EndProject
Project("{E53339B2-1760-4266-BCC7-CA923CBCF16C}") = "docker-compose", "deployments\docker-compose\docker-compose.dcproj", "{0050C106-97E3-40BD-8C2C-34503B5757DF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{9EDAC21F-3617-413B-8C54-469851036E9B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "issue_template", "issue_template", "{63F334BA-8ECE-42CC-8948-A15E9CCFF4CE}"
ProjectSection(SolutionItems) = preProject
.github\ISSUE_TEMPLATE\bug.yml = .github\ISSUE_TEMPLATE\bug.yml
.github\ISSUE_TEMPLATE\config.yml = .github\ISSUE_TEMPLATE\config.yml
.github\ISSUE_TEMPLATE\feature.yml = .github\ISSUE_TEMPLATE\feature.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -114,6 +123,7 @@ Global
{DEF277AF-8024-49D8-BD80-338A79431F8C} = {BDA26004-D077-442C-A4F7-F389D5AC9FE5}
{7BD5FCBA-1D5A-4DF2-BDC3-5672D3507C06} = {BDA26004-D077-442C-A4F7-F389D5AC9FE5}
{0050C106-97E3-40BD-8C2C-34503B5757DF} = {990DE5C0-9BDB-417C-91D9-B3883C5FCA3E}
{63F334BA-8ECE-42CC-8948-A15E9CCFF4CE} = {9EDAC21F-3617-413B-8C54-469851036E9B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {5E10D9D7-D5B5-4C0B-B7AC-AC10FF33DA3F}
Expand Down
19 changes: 10 additions & 9 deletions deployments/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ services:
image: redis:latest

gateway:
image: cloud-streams/gateway
# image: ${DOCKER_REGISTRY-}gateway
# build:
# context: ../../
# dockerfile: ./src/gateway/CloudStreams.Gateway.Api/Dockerfile
# image: cloud-streams/gateway
image: ${DOCKER_REGISTRY-}gateway
build:
context: ../../
dockerfile: ./src/gateway/CloudStreams.Gateway.Api/Dockerfile
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_HTTP_PORTS: 80
Expand All @@ -36,10 +36,11 @@ services:
- eventstore

broker:
image: ${DOCKER_REGISTRY-}broker
build:
context: ../../
dockerfile: ./src/broker/CloudStreams.Broker.Api/Dockerfile
image: cloud-streams/broker
# image: ${DOCKER_REGISTRY-}broker
# build:
# context: ../../
# dockerfile: ./src/broker/CloudStreams.Broker.Api/Dockerfile
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_HTTP_PORTS: 80
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<VersionPrefix>0.28.0</VersionPrefix>
Expand All @@ -25,12 +25,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="8.0.1" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="9.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Neuroglia.Data.Expressions.JQ" Version="4.15.0" />
<PackageReference Include="Neuroglia.Security.AspNetCore" Version="4.15.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.7.3" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.7.3" />
<PackageReference Include="Neuroglia.Data.Expressions.JQ" Version="4.18.1" />
<PackageReference Include="Neuroglia.Security.AspNetCore" Version="4.18.1" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="7.2.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/broker/CloudStreams.Broker.Api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
USER root
RUN apt-get update
RUN apt-get install -y jq
USER app
WORKDIR /app
EXPOSE 80

FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["src/broker/CloudStreams.Broker.Api/CloudStreams.Broker.Api.csproj", "src/broker/CloudStreams.Broker.Api/"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<VersionPrefix>0.28.0</VersionPrefix>
Expand All @@ -19,10 +19,10 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="FluentValidation" Version="11.9.2" />
<PackageReference Include="Grpc.Core.Api" Version="2.65.0" />
<PackageReference Include="Neuroglia.Data.Expressions.Abstractions" Version="4.15.0" />
<PackageReference Include="Polly" Version="8.4.1" />
<PackageReference Include="FluentValidation" Version="11.11.0" />
<PackageReference Include="Grpc.Core.Api" Version="2.67.0" />
<PackageReference Include="Neuroglia.Data.Expressions.Abstractions" Version="4.18.1" />
<PackageReference Include="Polly" Version="8.5.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<VersionPrefix>0.28.0</VersionPrefix>
Expand All @@ -19,7 +19,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.8" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="9.0.1" />
<PackageReference Include="System.Reactive" Version="6.0.1" />
</ItemGroup>

Expand Down
30 changes: 15 additions & 15 deletions src/core/CloudStreams.Core.Api/CloudStreams.Core.Api.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<VersionPrefix>0.28.0</VersionPrefix>
Expand All @@ -24,21 +24,21 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="8.0.1" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.9.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.8" />
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="9.0.0" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.11.0" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.1" />
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
<PackageReference Include="Neuroglia.Data.Infrastructure.EventSourcing.EventStore" Version="4.15.0" />
<PackageReference Include="Neuroglia.Data.Infrastructure.ResourceOriented.Redis" Version="4.15.0" />
<PackageReference Include="Neuroglia.Mediation.AspNetCore" Version="4.15.0" />
<PackageReference Include="Neuroglia.Data.Expressions.JQ" Version="4.15.0" />
<PackageReference Include="Neuroglia.Security.AspNetCore" Version="4.15.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.7.3" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.7.3" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.9.0" />
<PackageReference Include="Neuroglia.Data.Infrastructure.EventSourcing.EventStore" Version="4.18.1" />
<PackageReference Include="Neuroglia.Data.Infrastructure.ResourceOriented.Redis" Version="4.18.1" />
<PackageReference Include="Neuroglia.Mediation.AspNetCore" Version="4.18.1" />
<PackageReference Include="Neuroglia.Data.Expressions.JQ" Version="4.18.1" />
<PackageReference Include="Neuroglia.Security.AspNetCore" Version="4.18.1" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="7.2.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.2.0" />
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" Version="1.11.0" />
<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.11.0" />
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.10.1" />
<PackageReference Include="OpenTelemetry.Instrumentation.Http" Version="1.10.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit a492b0c

Please sign in to comment.