From 26b85d71583c1ac4422ad7db0b3fc2ed78c2e0f1 Mon Sep 17 00:00:00 2001 From: Mingyong Chen <67659676+chenmingyong0423@users.noreply.github.com> Date: Wed, 6 Aug 2025 18:32:13 +0800 Subject: [PATCH] fix: fix missing seed.json on startup by renaming file (#75) Renamed `data/seed_2025_05_16.json` to `data/seed.json` and updated `Dockerfile` ## Motivation and Context When cloning the repository and building the project using: ```bash go build ./cmd/registry .\\registry.exe ``` the application fails to start because the default seed file path (`data/seed.json`) does not exist in the repo: ``` Failed to read seed file: failed to read file: open data/seed.json: The system cannot find the file specified. ``` ## How Has This Been Tested? ```bash go build ./cmd/registry .\\registry.exe // ./registry ``` ## Breaking Changes None ## Types of changes - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist - [x] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [x] My code follows the repository's style guidelines - [x] New and existing tests pass locally - [ ] I have added appropriate error handling - [ ] I have added or updated documentation as needed Co-authored-by: Adam Jones --- Dockerfile | 2 +- data/{seed_2025_05_16.json => seed.json} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename data/{seed_2025_05_16.json => seed.json} (100%) diff --git a/Dockerfile b/Dockerfile index 75d6d04..dd828a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN go build ${GO_BUILD_TAGS:+-tags="$GO_BUILD_TAGS"} -o /build/registry ./cmd/r FROM alpine:latest WORKDIR /app COPY --from=builder /build/registry . -COPY --from=builder /app/data/seed_2025_05_16.json /app/data/seed.json +COPY --from=builder /app/data/seed.json /app/data/seed.json COPY --from=builder /app/internal/docs/swagger.yaml /app/internal/docs/swagger.yaml EXPOSE 8080 diff --git a/data/seed_2025_05_16.json b/data/seed.json similarity index 100% rename from data/seed_2025_05_16.json rename to data/seed.json