-
Notifications
You must be signed in to change notification settings - Fork 316
Open
Copy link
Description
Problem
The current Docker image does not include a default configuration file, making it less user-friendly for those getting started.
Proposal
- Add a default configuration file named
dab-config.jsonto the Docker image. - The file should be available in a standard location within the image, such as
/App/dab-config.json(see the Dockerfile below). - The file should contain the following settings:
{
"$schema": "https://github.com/Azure/data-api-builder/releases/download/v1.7.86-rc/dab.draft.schema.json",
"data-source": {
"database-type": "mssql",
"connection-string": "@env('DAB_CONNSTRING')",
"options": {
"set-session-context": false
}
},
"runtime": {
"rest": {
"enabled": true,
"path": "/api",
"request-body-strict": false
},
"graphql": {
"enabled": true,
"path": "/graphql",
"allow-introspection": true
},
"mcp": {
"enabled": true,
"path": "/mcp"
},
"host": {
"cors": {
"origins": [],
"allow-credentials": false
},
"authentication": {
"provider": "Unauthenticated"
},
"mode": "development"
}
},
"entities": {},
"autoentities": {
"default": {
"template": {
"mcp": { "dml-tool": true },
"rest": { "enabled": true},
"graphql": { "enabled": true },
"health": { "enabled": true },
"cache": {
"enabled": false
}
},
"permissions": [
{
"role": "anonymous",
"actions": [
"*"
]
}
]
}
}
}Benefit
Including this configuration file will provide immediate guidance for users, improve out-of-the-box experience, and make Docker-based experimentation much easier.
Relevant code locations
Dockerfile
The Docker image is defined by Dockerfile:
FROM mcr.microsoft.com/dotnet/sdk:8.0-cbl-mariner2.0. AS build
WORKDIR /src
COPY [".", "./"]
RUN dotnet build "./src/Service/Azure.DataApiBuilder.Service.csproj" -c Docker -o /out -r linux-x64
FROM mcr.microsoft.com/dotnet/aspnet:8.0-cbl-mariner2.0 AS runtime
COPY --from=build /out /App
WORKDIR /App
ENV ASPNETCORE_URLS=http://+:5000
ENTRYPOINT ["dotnet", "Azure.DataApiBuilder.Service.dll"]To add the default config, include a line such as:
# Add default dab-config.json to /App in the image
COPY dab-config.json /App/dab-config.jsonReferences in deployment scripts and samples
samples/aspire/apphost.csbindsdab-config.jsoninto the container at/App/dab-config.json.samples/azure/bicep/dab-on-aca.bicepand
samples/azure/azure-container-apps-deploy.sh
reference mounting and passingdab-config.json.- Documentation and deployment code often expect this file to be named
dab-config.jsonand placed at/App/dab-config.jsonor a similar standard path.
Please ensure the Docker image has this default config at
/App/dab-config.json, and consider documenting override patterns for cloud and local deployments.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Review In Progress