-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
1,161 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<Project> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<AnalysisLevel>8.0-all</AnalysisLevel> | ||
<GenerateDocumentationFile>true</GenerateDocumentationFile> | ||
<Authors>GeoWerkstatt GmbH</Authors> | ||
<Company>GeoWerkstatt GmbH</Company> | ||
<PackageOutputPath>$(MSBuildThisFileDirectory)/artifacts</PackageOutputPath> | ||
<PackageProjectUrl>https://github.com/swisstopo/swissgeol-boreholes-suite</PackageProjectUrl> | ||
<RepositoryUrl>https://github.com/swisstopo/swissgeol-boreholes-suite.git</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild> | ||
</PropertyGroup> | ||
|
||
<ItemGroup Condition="'$(MSBuildProjectExtension)' != '.dcproj' And '$(MSBuildProjectExtension)' != '.esproj'"> | ||
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> | ||
</PackageReference> | ||
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo"> | ||
<_Parameter1>$(AssemblyName).Test</_Parameter1> | ||
</AssemblyAttribute> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
namespace BDMS; | ||
|
||
/// <summary> | ||
/// <see cref="BdmsContext"/> constants. | ||
/// </summary> | ||
public static class BdmsContextConstants | ||
{ | ||
/// <summary> | ||
/// The name of the boreholes database. | ||
/// </summary> | ||
public const string BoreholesDatabaseName = "bdms"; | ||
|
||
/// <summary> | ||
/// The name of the boreholes database schema. | ||
/// </summary> | ||
public const string BoreholesDatabaseSchemaName = "bdms"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> | ||
<Product>BDMS.ExternSync</Product> | ||
<OutputType>Exe</OutputType> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<None Remove="docker-compose.services.yml" /> | ||
<None Remove="docker-compose.yml" /> | ||
<None Remove="Dockerfile" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Npgsql.DependencyInjection" Version="8.0.0" /> | ||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.0" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\api\BDMS.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Folder Include="Properties\" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# syntax=docker/dockerfile:1.7-labs | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build | ||
ARG VERSION | ||
ARG REVISION | ||
WORKDIR /src | ||
|
||
# Restore dependencies and tools | ||
COPY --parents "extern-sync/BDMS.ExternSync.csproj" "api/BDMS.csproj" "Directory.Build.props" ./ | ||
RUN dotnet restore "./extern-sync/BDMS.ExternSync.csproj" | ||
|
||
# Create optimized production build | ||
COPY --parents "extern-sync/" "api/" ./ | ||
RUN dotnet publish "./extern-sync/BDMS.ExternSync.csproj" \ | ||
-c Release \ | ||
-p:UseAppHost=false \ | ||
-p:VersionPrefix=${VERSION} \ | ||
-p:SourceRevisionId=${REVISION} \ | ||
-o /app/publish | ||
|
||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS deploy | ||
ENV ASPNETCORE_ENVIRONMENT=Production | ||
WORKDIR /app | ||
|
||
# Set default locale | ||
ENV LANG=C.UTF-8 | ||
ENV LC_ALL=C.UTF-8 | ||
|
||
COPY --from=build /app/publish . | ||
|
||
# Switch to the non-root user 'app' defined in the base image | ||
USER $APP_UID | ||
ENTRYPOINT ["dotnet", "BDMS.ExternSync.dll"] |
Oops, something went wrong.