Conversation
Co-authored-by: Aniruddh25 <3513779+Aniruddh25@users.noreply.github.com>
Co-authored-by: Aniruddh25 <3513779+Aniruddh25@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a default dab-config.json into the published Docker image to improve first-run experience (container can start without mounting a config file, relying on an env-provided connection string).
Changes:
- Added a new root-level
dab-config.jsonintended to be baked into the Docker image as the default runtime configuration. - Updated
Dockerfileto copydab-config.jsoninto/App/dab-config.jsonin the runtime image. - Updated
.gitignoreto ensure the rootdab-config.jsonis not ignored by the existingdab-config*.jsonrule.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
dab-config.json |
Introduces a default runtime config intended for Docker image consumption. |
Dockerfile |
Bakes the default config into the runtime image at /App/dab-config.json. |
.gitignore |
Ensures the root default config is tracked despite existing ignore patterns. |
|
|
||
| COPY --from=build /out /App | ||
| # Add default dab-config.json to /App in the image | ||
| COPY dab-config.json /App/dab-config.json |
There was a problem hiding this comment.
@copilot, test if a container started with this image runs accurately
There was a problem hiding this comment.
Tested in dc2bc0e. Built an image with the pre-compiled service and dab-config.json, then ran the container with DAB_CONNSTRING set. Startup logs confirm it works:
Loading config file from /App/dab-config.json.
...
Now listening on: http://[::]:5000
Application started.
Also fixed "provider": "Unauthenticated" → "Simulator" (the original value failed JSON schema validation and would throw NotSupportedException at startup since it was treated as a JWT provider requiring Audience/Issuer).
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
Co-authored-by: Aniruddh25 <3513779+Aniruddh25@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
/azp run |
|
Azure Pipelines successfully started running 6 pipeline(s). |
| *.dab-config.json | ||
| !dab-config.*reference.json | ||
| !dab-config.*.example.json | ||
| !/dab-config.json |
Why make this change?
The Docker image shipped with no default configuration file, requiring users to supply one before the container would start — a poor out-of-the-box experience for first-time users.
What is this change?
dab-config.json(new, repo root) — Default configuration baked into the image:mssqldatabase type; connection string resolved at runtime via@env('DAB_CONNSTRING')(no secrets committed)/api), GraphQL (/graphql), and MCP (/mcp) endpoints enabledautoentities.defaulttemplate withdml-toolsenabled and explicitanonymous: ["create", "read", "update", "delete"]permissions"Simulator"(valid dev-mode provider per schema)development$schemapoints toreleases/latest/download/dab.draft.schema.json(always current, never stale)Dockerfile— Copies the default config into the runtime image:.gitignore— Added!/dab-config.jsonexception; the existingdab-config*.jsonrule was silently excluding this file from version control.How was this tested?
Container startup was manually verified: built an image using the compiled service binary and the default
dab-config.json, then ran it withDAB_CONNSTRINGset. Logs confirmed successful startup:JSON schema validation was also confirmed to pass against
schemas/dab.draft.schema.json.Sample Request(s)
Run the container with just a connection string — no config mount required:
Override the default config by mounting your own:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.