Conversation
.dockerignore didn't exclude .env files, defaultConnection.json, cert-info/ (self-signed dev certs), *.local.* files, or dist/ build output. A developer who has run Graph Explorer locally has all of these in their working tree, so a local docker build . bakes their database endpoint, AWS region, and locally generated certs into an image layer. CI builds from a clean checkout, so published images are unaffected. Patterns use a **/ prefix since these files can live at any depth in the workspace (e.g. cert-info lives under packages/graph-explorer-proxy-server/), matching the equivalent .gitignore patterns.
**/.env* excluded packages/graph-explorer/.env, a tracked default that docker-entrypoint.sh requires to exist at startup. **/cert-info/ excluded cert-info/cert.conf and csr.conf, tracked OpenSSL templates setup-ssl.sh needs to generate a cert at runtime. Both would have broken every container built from this image. Narrowed to **/.env.local (the project's actual local-override convention per docs/development.md) and to the specific generated cert artifacts (*.key, *.crt, *.csr, *.srl) inside cert-info/, leaving the tracked templates in place. Verified by building the image and running the real docker-entrypoint.sh (HOST=localhost, not overridden) end to end: container starts, generates a self-signed cert, and serves the app over HTTPS.
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
.dockerignoredidn't exclude.env*files,defaultConnection.json,cert-info/(self-signed dev certs),*.local.*files, ordist/build output. The Dockerfile copies the whole tree (COPY . /graph-explorer/), so a developer who has run Graph Explorer locally has all of these in their working tree, and a localdocker build .bakes their database endpoint, AWS region, and locally generated certs into an image layer.This only affects images built locally. CI builds from a clean checkout, so published images are unaffected.
An initial pass at this used blanket patterns (
**/.env*,**/cert-info/) and broke real functionality:packages/graph-explorer/.envis a tracked default thatdocker-entrypoint.shrequires to exist at startup, andcert-info/cert.conf/csr.confare tracked OpenSSL templatessetup-ssl.shneeds to generate a cert at runtime. The patterns are narrowed to**/.env.local(the project's actual local-override convention, perdocs/development.md) and to the specific generated cert artifacts (*.key,*.crt,*.csr,*.srl) insidecert-info/, leaving the tracked templates in place.How to read
**/since these files can live at any depth in the workspace (e.g.cert-info/lives underpackages/graph-explorer-proxy-server/).Validation
Verified end to end with actual
docker build/docker run, not just by reading the patterns:packages/graph-explorer/.env.local,defaultConnection.json,config.local.json, a fake generated cert set (rootCA.key,rootCA.crt,rootCA.srl,server.key,server.csr,server.crt) insidecert-info/, and a staledist/marker.txt..dockerignoreand confirmed all of it was present and readable inside the image.packages/graph-explorer/.envandcert-info/{cert,csr}.conf(tracked, required at runtime) were still present.docker run --env HOST=localhost ..., entrypoint not overridden): it generated a real self-signed cert, started the proxy server, and served/explorerover HTTPS (301response). This is what caught the first pass's regression — inspecting the image with--entrypoint shalone wouldn't have.pnpm checksandpnpm test(222 files, 2707 tests) pass.Related Issues
None found in the backlog for this specific gap.
Check List
pnpm checkspasses with no errors.pnpm testpasses with no failures..dockerignorepattern change isn't unit-testable; verified with an actualdocker build/docker runinstead, see Validation.)