Skip to content

Commit e0e5517

Browse files
committed
added initial sln structure and nuget packages
1 parent 64bcae3 commit e0e5517

File tree

9 files changed

+165
-0
lines changed

9 files changed

+165
-0
lines changed
+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31903.59
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CqrsSqlServer.Shared", "src\CqrsSqlServer.Shared\CqrsSqlServer.Shared.csproj", "{0D4E5405-9584-43BB-AFA5-11ECB4150264}"
7+
EndProject
8+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CqrsSqlServer.Backend", "src\CqrsSqlServer.Backend\CqrsSqlServer.Backend.csproj", "{EC803A09-89B0-4004-9CEB-FC0EADC17677}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|Any CPU = Debug|Any CPU
13+
Release|Any CPU = Release|Any CPU
14+
EndGlobalSection
15+
GlobalSection(SolutionProperties) = preSolution
16+
HideSolutionNode = FALSE
17+
EndGlobalSection
18+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
19+
{0D4E5405-9584-43BB-AFA5-11ECB4150264}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
20+
{0D4E5405-9584-43BB-AFA5-11ECB4150264}.Debug|Any CPU.Build.0 = Debug|Any CPU
21+
{0D4E5405-9584-43BB-AFA5-11ECB4150264}.Release|Any CPU.ActiveCfg = Release|Any CPU
22+
{0D4E5405-9584-43BB-AFA5-11ECB4150264}.Release|Any CPU.Build.0 = Release|Any CPU
23+
{EC803A09-89B0-4004-9CEB-FC0EADC17677}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
24+
{EC803A09-89B0-4004-9CEB-FC0EADC17677}.Debug|Any CPU.Build.0 = Debug|Any CPU
25+
{EC803A09-89B0-4004-9CEB-FC0EADC17677}.Release|Any CPU.ActiveCfg = Release|Any CPU
26+
{EC803A09-89B0-4004-9CEB-FC0EADC17677}.Release|Any CPU.Build.0 = Release|Any CPU
27+
EndGlobalSection
28+
EndGlobal

src/cqrs/cqrs-sqlserver/build.cmd

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@echo off
2+
REM builds all docker images
3+
4+
set version="0.1.0"
5+
set hostImageName="sqlsharding.host"
6+
set webImageName="sqlsharding.web"
7+
8+
if "%~1"=="" (
9+
REM No version tag specified
10+
echo No tag for [%hostImageName%] specified. Defaulting to [%version%]
11+
echo No tag for [%webImageName%] specified. Defaulting to [%version%]
12+
) else (
13+
set version="%~1"
14+
echo Building [%hostImageName%] with tag [%version%]
15+
echo Building [%webImageName%] with tag [%version%]
16+
)
17+
18+
dotnet publish %~dp0/SqlSharding.Host/SqlSharding.Host.csproj -c Release -p:Version=%version%
19+
20+
docker build %~dp0/SqlSharding.Host/. -t "%hostImageName%:%version%"
21+
22+
dotnet publish %~dp0/SqlSharding.WebApp/SqlSharding.WebApp.csproj -c Release -p:Version=%version%
23+
24+
docker build %~dp0/SqlSharding.WebApp/. -t "%webImageName%:%version%"

src/cqrs/cqrs-sqlserver/build.sh

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
# Builds docker images
3+
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
4+
cd "$parent_path"
5+
6+
version="0.1.0"
7+
hostImageName="sqlsharding.host"
8+
webImageName="sqlsharding.web"
9+
10+
if [ -z $1 ]; then
11+
echo "No tag for [${hostImageName}] specified. Defaulting to [${version}]"
12+
echo "No tag for [${webImageName}] specified. Defaulting to [${version}]"
13+
else
14+
version="$1"
15+
echo "Building [${hostImageName}] with tag [${version}]"
16+
echo "Building [${webImageName}] with tag [${version}]"
17+
fi
18+
19+
dotnet publish ./SqlSharding.Host/SqlSharding.Host.csproj -c Release -p:Version=${version}
20+
21+
docker build ./SqlSharding.Host/. -t "${imageName}:${version}"
22+
23+
dotnet publish ./SqlSharding.WebApp/SqlSharding.WebApp.csproj -c Release -p:Version=${version}
24+
25+
docker build ./SqlSharding.WebApp/. -t "${imageName}:${version}"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<OutputType>Exe</OutputType>
5+
<TargetFramework>net8.0</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
</PropertyGroup>
9+
10+
<ItemGroup>
11+
<ProjectReference Include="..\CqrsSqlServer.Shared\CqrsSqlServer.Shared.csproj"/>
12+
</ItemGroup>
13+
14+
<ItemGroup>
15+
<PackageReference Include="Akka.Cluster.Hosting" Version="1.5.18"/>
16+
<PackageReference Include="Akka.Persistence.SqlServer.Hosting" Version="1.5.15"/>
17+
<PackageReference Include="Petabridge.Cmd.Cluster" Version="$(PbmVersion)"/>
18+
<PackageReference Include="Petabridge.Cmd.Cluster.Sharding" Version="$(PbmVersion)"/>
19+
<PackageReference Include="Petabridge.Cmd.Host" Version="$(PbmVersion)"/>
20+
</ItemGroup>
21+
22+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// See https://aka.ms/new-console-template for more information
2+
3+
Console.WriteLine("Hello, World!");
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
namespace CqrsSqlServer.Shared;
2+
3+
public class Class1
4+
{
5+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<ImplicitUsings>enable</ImplicitUsings>
6+
<Nullable>enable</Nullable>
7+
</PropertyGroup>
8+
9+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
@echo off
2+
REM launches local SQL Server dependency so we can run from Visual Studio
3+
4+
set version="0.1.0"
5+
set imageName="akkadotnet.sqlserver"
6+
7+
if "%~1"=="" (
8+
REM No version tag specified
9+
echo No tag for [%imageName%] specified. Defaulting to [%version%]
10+
) else (
11+
set version="%~1"
12+
echo Running [%imageName%] with tag [%~1]
13+
)
14+
15+
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=yourStrong(!)Password" -p 1533:1433 --name "sqlsharding-sql" -d "%imageName%:%version%"
16+
17+
if errorlevel 1 (
18+
echo "failed to start akkadotnet.sqlserver - building image first then retrying"
19+
call %~dp0../../../infrastructure/build.all.cmd %version%
20+
if errorlevel 1 (
21+
echo "failed to build akkadotnet.sqlserver - aborting"
22+
exit -1
23+
) else (
24+
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=yourStrong(!)Password" -p 1533:1433 --name "sqlsharding-sql" -d "%imageName%:%version%"
25+
)
26+
)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/env bash
2+
# launches local SQL Server dependency so we can run from Visual Studio
3+
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
4+
5+
version="0.1.0"
6+
imageName="akkadotnet.sqlserver"
7+
8+
if [ -z $1 ]; then
9+
echo "No tag for [${imageName}] specified. Defaulting to [${version}]"
10+
else
11+
version="$1"
12+
echo "Building [${imageName}] with tag [${version}]"
13+
fi
14+
15+
if docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=yourStrong(!)Password" -p 1533:1433 --name "sqlsharding-sql" -d "${imageName}:${version}" ; then
16+
echo "failed to start akkadotnet.sqlserver - building image first then retrying"
17+
18+
if ../../../infrastructure/build.all.sh $1 ; then
19+
echo "failed to build akkadotnet.sqlserver - aborting"
20+
return -1
21+
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=yourStrong(!)Password" -p 1533:1433 --name "sqlsharding-sql" -d "${imageName}:${version}"
22+
fi
23+
fi

0 commit comments

Comments
 (0)