From d9efa5f06de922fe5a83809e83f7ef97bd6a8a97 Mon Sep 17 00:00:00 2001 From: Owen Qwen Date: Mon, 29 Jun 2026 20:14:43 -0500 Subject: [PATCH] Fix Railway Docker volume build --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a5813c2..7165c2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,13 +5,14 @@ WORKDIR /src COPY go.mod go.sum ./ RUN go mod download COPY . . -RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /out/urapt-server ./cmd/urapt-server \ +RUN mkdir -p /out/data/store \ + && CGO_ENABLED=0 go build -ldflags="-s -w" -o /out/urapt-server ./cmd/urapt-server \ && CGO_ENABLED=0 go build -ldflags="-s -w" -o /out/urapt ./cmd/urapt FROM gcr.io/distroless/static-debian12:nonroot COPY --from=build /out/urapt-server /usr/local/bin/urapt-server +COPY --from=build --chown=nonroot:nonroot /out/data /data EXPOSE 8080 -VOLUME ["/data"] ENV URAPT_STORE_DIR=/data/store ENV URAPT_BASE_URL=http://localhost:8080 USER nonroot:nonroot