mirror of
https://codeberg.org/gigirassy/teletraan.git
synced 2026-08-30 15:27:38 +00:00
add thc
This commit is contained in:
+11
-2
@@ -1,3 +1,6 @@
|
|||||||
|
# we use thc for healthchecks
|
||||||
|
FROM codeberg.org/gigirassy/thc:latest AS thc
|
||||||
|
|
||||||
# alpine for static binaries
|
# alpine for static binaries
|
||||||
FROM rust:alpine AS build
|
FROM rust:alpine AS build
|
||||||
|
|
||||||
@@ -19,6 +22,11 @@ USER 65535:65535
|
|||||||
|
|
||||||
# copy binary into path
|
# copy binary into path
|
||||||
COPY --from=build --chown=65535:65535 /tmp/bin/teletraan /teletraan
|
COPY --from=build --chown=65535:65535 /tmp/bin/teletraan /teletraan
|
||||||
|
COPY --from=thc /thc /thc
|
||||||
|
|
||||||
|
# configure thc
|
||||||
|
ENV THC_PORT=3000 \
|
||||||
|
THC_PATH=/
|
||||||
|
|
||||||
# data workdir. this allows using teletraan as the base for images easily via simply ``COPY --from=build /app/dist .``
|
# data workdir. this allows using teletraan as the base for images easily via simply ``COPY --from=build /app/dist .``
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
@@ -26,6 +34,7 @@ WORKDIR /data
|
|||||||
# expose
|
# expose
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
# to run it. the cmd is left free so people can serve single page apps with the -s flag
|
# to run it and thc. the cmd is left free so people can serve single page apps with the -s flag
|
||||||
ENTRYPOINT ["/teletraan"]
|
ENTRYPOINT ["/teletraan"]
|
||||||
CMD [""]
|
CMD [""]
|
||||||
|
HEALTHCHECK --interval=5s --timeout=5s --start-period=10s --retries=5 CMD ["/thc"]
|
||||||
Reference in New Issue
Block a user