Bake phrases.yaml into the runtime image
Some checks are pending
CI / test (push) Waiting to run

Only config.yaml was bind-mounted into the container, so phrases_file's
default "./phrases.yaml" had nothing to resolve to at runtime and the bot
crash-looped on startup. phrases.yaml is repo-tracked source, not a secret,
so it belongs in the image like the binary itself.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
awayatan 2026-07-26 23:44:28 +09:00
parent 22eecea9ef
commit e24cf2c2a7

View file

@ -8,6 +8,7 @@ RUN CGO_ENABLED=0 go build -o /out/yaju-keisatsu ./cmd/yaju-is-always-watching-y
FROM alpine:3.20 FROM alpine:3.20
RUN apk add --no-cache ca-certificates RUN apk add --no-cache ca-certificates
COPY --from=build /out/yaju-keisatsu /usr/local/bin/yaju-keisatsu COPY --from=build /out/yaju-keisatsu /usr/local/bin/yaju-keisatsu
COPY phrases.yaml /etc/yaju-keisatsu/phrases.yaml
EXPOSE 8080 EXPOSE 8080
ENTRYPOINT ["/usr/local/bin/yaju-keisatsu"] ENTRYPOINT ["/usr/local/bin/yaju-keisatsu"]
CMD ["-config", "/etc/yaju-keisatsu/config.yaml"] CMD ["-config", "/etc/yaju-keisatsu/config.yaml"]