From 633e3c8e5c0b7f98701b97d207c10656e6f75541 Mon Sep 17 00:00:00 2001 From: Yasuhiro Matsumoto Date: Thu, 4 Jul 2024 00:05:10 +0900 Subject: [PATCH] file file --- Dockerfile | 1 + main.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8de6918..9232e55 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,4 +17,5 @@ COPY --link --from=build-dev /go/src/app/Koruri-Regular.ttf /go/bin/Koruri-Regul COPY --from=build-dev /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ ENV USERDIC=/go/bin/userdic.txt ENV IGNORES=/go/bin/ignores.txt +ENV FONTFILE=/go/bin/Koruri-Regular.ttf CMD ["/go/bin/nostr-buzzword"] diff --git a/main.go b/main.go index d73d23f..3cb4461 100644 --- a/main.go +++ b/main.go @@ -344,7 +344,7 @@ func makeWordCloud(items []*HotItem, sign func(*nostr.Event) error) (string, err inputWords[item.Word] = item.Count } img := wordclouds.NewWordcloud(inputWords, - wordclouds.FontFile("Koruri-Regular.ttf"), + wordclouds.FontFile(env("FONTFILE", "Koruri-Regular.ttf")), wordclouds.FontMaxSize(100), wordclouds.FontMinSize(10), wordclouds.Colors(colors),