mirror of
https://codeberg.org/gigirassy/teletraan.git
synced 2026-08-30 15:27:38 +00:00
add thc
This commit is contained in:
+10
-1
@@ -1,3 +1,6 @@
|
||||
# we use thc for healthchecks
|
||||
FROM codeberg.org/gigirassy/thc:latest AS thc
|
||||
|
||||
# alpine for static binaries
|
||||
FROM rust:alpine AS build
|
||||
|
||||
@@ -19,6 +22,11 @@ USER 65535:65535
|
||||
|
||||
# copy binary into path
|
||||
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 .``
|
||||
WORKDIR /data
|
||||
@@ -26,6 +34,7 @@ WORKDIR /data
|
||||
# expose
|
||||
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"]
|
||||
CMD [""]
|
||||
HEALTHCHECK --interval=5s --timeout=5s --start-period=10s --retries=5 CMD ["/thc"]
|
||||
Reference in New Issue
Block a user