Skip to content

Commit

Permalink
comment dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan committed Nov 28, 2023
1 parent 383534b commit 76b9abd
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion wacs-gitea/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,20 @@ RUN /merge-locale/localeMerger
FROM gitea/gitea:${GITEA_VERSION}-rootless

ENV GITEA_CUSTOM=/custom
# This ENV is functional, but it is here as an example of what the value should be at runtime
ENV READER_BASE_LINK=https://read-dev.bibleineverylanguage.org/

# COPY's need permissions set for rootless
COPY --chown=git:git --from=LOCALE_BUILDER /output-locale/*.ini /custom/options/locale/
COPY --chown=git:git ./custom/templates /custom/templates
COPY ./custom/public /custom/public
COPY --chown=git:git ./custom/public /custom/public

# dumb-init for clean startup and shutdown as per the parent image.
# Startup is done this way to still use dumb-init like the partent image; this is how dumb-init suggests to do it.
ENTRYPOINT ["/usr/bin/dumb-init", "--"]

# Cat feeds the extra_tabs.tmpl file into envsubst
# envsubst replaces the env vars in the file with the values from the environment and writes out a temp file
# Temp file is then moved to the real location
# Gitea entrypoint starts gitea
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"]

0 comments on commit 76b9abd

Please sign in to comment.