From fc46b101ec103c7b7ad8d560e91e9fd7b804bafb Mon Sep 17 00:00:00 2001 From: Will Kelly Date: Tue, 14 Nov 2023 09:45:46 -0600 Subject: [PATCH] did I do it?.. wow.. --- app.ini | 2 +- wacs-gitea/Dockerfile | 13 +++++-------- wacs-gitea/merge-locale/merge.go | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/app.ini b/app.ini index 4a7558e..7ddeeb4 100644 --- a/app.ini +++ b/app.ini @@ -180,7 +180,7 @@ IS_INPUT_FILE = false [oauth2] ENABLE = true -JWT_SECRET = u4MdWtHbCQRH_d_VPfwijAsIr2vaBf7y2OhrT1JN3Cs +JWT_SECRET = z5cfDHMLMxESOI-JrLvMKtcKpzyBK8amnBpcr44C2EY [default] RUN_MODE = dev diff --git a/wacs-gitea/Dockerfile b/wacs-gitea/Dockerfile index c107a69..12d425c 100644 --- a/wacs-gitea/Dockerfile +++ b/wacs-gitea/Dockerfile @@ -14,6 +14,7 @@ COPY custom/options/locale /wa-locale # output files to /output-locale/*.ini RUN mkdir /output-locale RUN go build -o localeMerger +RUN /merge-locale/localeMerger # RUN npm install -ci # RUN node localeMerge.js @@ -21,18 +22,14 @@ RUN go build -o localeMerger FROM gitea/gitea:${GITEA_VERSION}-rootless ENV GITEA_CUSTOM=/custom -COPY --from=LOCALE_BUILDER /merge-locale/localeMerger /merge-locale/localeMerger -COPY --from=LOCALE_SOURCE /var/lib/gitea/options/locale /gitea-locale -COPY merge-locale /merge-locale -COPY custom/options/locale /wa-locale -# COPY --from=LOCALE_BUILDER /output-locale/*.ini /custom/options/locale/ +COPY --chown=git:git --from=LOCALE_BUILDER /output-locale/*.ini /custom/options/locale/ COPY --chown=git:git ./custom/templates /custom/templates -COPY --chown=git:git ./custom/options/locale /custom/options/locale COPY ./custom/public /custom/public - ENV READER_BASE_LINK=read-dev.bibleineverylanguage.org + ENTRYPOINT ["/usr/bin/dumb-init", "--"] -CMD ["bash", "-c", "cat /custom/templates/custom/extra_tabs.tmpl | envsubst > /tmp/extra_tabs.tmpl && mv /tmp/extra_tabs.tmpl /custom/templates/custom/extra_tabs.tmpl && /merge-locale/localeMerger && /usr/local/bin/docker-entrypoint.sh"] + +CMD ["sh", "-c", "cat /custom/templates/custom/extra_tabs.tmpl | envsubst > /tmp/extra_tabs.tmpl && mv /tmp/extra_tabs.tmpl /custom/templates/custom/extra_tabs.tmpl && /usr/local/bin/docker-entrypoint.sh"] \ No newline at end of file diff --git a/wacs-gitea/merge-locale/merge.go b/wacs-gitea/merge-locale/merge.go index 20833e3..4ecb2cd 100644 --- a/wacs-gitea/merge-locale/merge.go +++ b/wacs-gitea/merge-locale/merge.go @@ -15,7 +15,7 @@ func main() { // Define directory paths waLocaleDir := path.Join("/wa-locale") giteaLocaleDir := path.Join("/gitea-locale") - outputDir := ("/outputDir") + outputDir := ("/output-locale") // Read custom locales waLocaleFiles, err := os.ReadDir(waLocaleDir)