Skip to content

Commit

Permalink
make wk2 have master dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
wkelly17 committed Nov 14, 2023
1 parent 23b22c9 commit 3187650
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions wacs-gitea/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,34 @@ FROM gitea/gitea:${GITEA_VERSION}-rootless as LOCALE_SOURCE
RUN gitea embedded extract --destination /var/lib/gitea/ options/locale/**.*

# Build locale files from gitea, with WA's overrides and new keys
FROM node:20-slim as LOCALE_BUILDER
FROM golang:1.20 as LOCALE_BUILDER
# copy gitea's locale files
COPY --from=LOCALE_SOURCE /var/lib/gitea/options/locale /gitea-locale
WORKDIR /merge-locale
COPY --from=LOCALE_SOURCE /var/lib/gitea/options/locale /gitea-locale
COPY merge-locale /merge-locale
COPY custom/options/locale /wa-locale
# output files to /output-locale/*.ini
RUN mkdir /output-locale
RUN npm install -ci
RUN node localeMerge.js
RUN go build -o localeMerger

# RUN npm install -ci
# RUN node localeMerge.js

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 --chown=git:git --from=LOCALE_BUILDER /output-locale/*.ini /custom/options/locale/
# COPY --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 ["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"]
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"]

0 comments on commit 3187650

Please sign in to comment.