Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Version values referenced from https://hub.docker.com/_/microsoft-dotnet-aspnet

FROM mcr.microsoft.com/dotnet/sdk:8.0-cbl-mariner2.0. AS build
FROM mcr.microsoft.com/dotnet/sdk:8.0-cbl-mariner2.0 AS build


WORKDIR /src
Expand All @@ -11,7 +11,7 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0-cbl-mariner2.0 AS runtime

COPY --from=build /out /App
# Add default dab-config.json to /App in the image
COPY dab-config.json /App/dab-config.json
COPY --from=build /out/dab-config.json /App/dab-config.json
Comment thread
Aniruddh25 marked this conversation as resolved.
WORKDIR /App
ENV ASPNETCORE_URLS=http://+:5000
ENTRYPOINT ["dotnet", "Azure.DataApiBuilder.Service.dll"]
58 changes: 0 additions & 58 deletions dab-config.json

This file was deleted.

8 changes: 4 additions & 4 deletions src/Aspire.AppHost/AppHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@

if (sqlDbContainer is null)
{
mssqlService.WithEnvironment("ConnectionStrings__Database", databaseConnectionString);
mssqlService.WithEnvironment("DAB_CONNSTRING", databaseConnectionString);
}
else
{
mssqlService.WithEnvironment("ConnectionStrings__Database", sqlDbContainer)
mssqlService.WithEnvironment("DAB_CONNSTRING", sqlDbContainer)
.WaitFor(sqlDbContainer);
}

Expand Down Expand Up @@ -79,11 +79,11 @@

if (postgresDB is null)
{
pgService.WithEnvironment("ConnectionStrings__Database", databaseConnectionString);
pgService.WithEnvironment("DAB_CONNSTRING", databaseConnectionString);
}
else
{
pgService.WithEnvironment("ConnectionStrings__Database", postgresDB)
pgService.WithEnvironment("DAB_CONNSTRING", postgresDB)
.WaitFor(postgresDB);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,7 @@ private async Task PopulateSourceDefinitionAsync(
&& IsGraphQLReservedName(entity, columnName, graphQLEnabledGlobally: runtimeConfig.IsGraphQLEnabled))
{
throw new DataApiBuilderException(
message: $"The column '{columnName}' violates GraphQL name restrictions.",
message: $"The column '{columnName}' from '{entityName}' violates GraphQL name restrictions.",
statusCode: HttpStatusCode.ServiceUnavailable,
subStatusCode: DataApiBuilderException.SubStatusCodes.ErrorInInitialization);
}
Expand Down
8 changes: 3 additions & 5 deletions src/Service/Azure.DataApiBuilder.Service.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@
</ItemGroup>

<!--
Set the CopyToOutputDirectory action based on the configuration.
In Debug/Release, we'll copy the config, appsettings, sql and gql files, but not in Docker configuration since we don't want them to end up in the docker image.
Set the CopyToOutputDirectory action to Always since we only have appsettings and default config
as additional files that are both expected to be in the output directory.
-->
<PropertyGroup>
<CopyToOutputDirectoryAction Condition="'$(Configuration)' == 'Debug'">Always</CopyToOutputDirectoryAction>
<CopyToOutputDirectoryAction Condition="'$(Configuration)' == 'Release'">Always</CopyToOutputDirectoryAction>
<CopyToOutputDirectoryAction Condition="'$(Configuration)'=='Docker'">Never</CopyToOutputDirectoryAction>
<CopyToOutputDirectoryAction>Always</CopyToOutputDirectoryAction>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
</PropertyGroup>

Expand Down
Loading