Publish the image on version tags and test what is delivered
A v* tag now builds, tries and publishes the image: the version must be the one of Directory.Build.props, latest only moves forward and the registry token is in one step, given to docker on its input. The same script works by hand. The image says its version and commit, and its health check also covers the engine loop and the live prices. The Unraid template is final: a test compares it with appendix E and with the variables the loader really reads, and another reads the workflow. refs #70 refs #71 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4d92a39fef
commit
3cd214ae78
16 files changed
+859
-27
No files matched your search
@@ -17,9 +17,11 @@ COPY docs/design/logo/ docs/design/logo/
|
||||
# The backtest outcomes are read at the first start (SPEC 12.3); .dockerignore lets only their JSON files through.
|
||||
COPY docs/backtests/ docs/backtests/
|
||||
COPY docs/learning/ docs/learning/
|
||||
RUN dotnet publish src/Anubis.Server/Anubis.Server.csproj -c Release --no-restore -o /app
|
||||
# The commit goes into the version shown by the diagnostics report; empty when not given.
|
||||
ARG ANUBIS_COMMIT=
|
||||
RUN dotnet publish src/Anubis.Server/Anubis.Server.csproj -c Release --no-restore -o /app ${ANUBIS_COMMIT:+-p:SourceRevisionId=$ANUBIS_COMMIT}
|
||||
# The guard (SPEC 9.3, ADR 0012) is the main process and starts the engine next to it, from the same folder.
|
||||
RUN dotnet publish src/Anubis.Guard/Anubis.Guard.csproj -c Release --no-restore -o /app
|
||||
RUN dotnet publish src/Anubis.Guard/Anubis.Guard.csproj -c Release --no-restore -o /app ${ANUBIS_COMMIT:+-p:SourceRevisionId=$ANUBIS_COMMIT}
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0
|
||||
WORKDIR /app
|
||||
@@ -35,7 +37,16 @@ EXPOSE 8787
|
||||
VOLUME /data
|
||||
# Starts as root only to give /data to PUID:PGID, then runs the guard as that user (entrypoint.sh); the guard starts
|
||||
# the engine. "docker run --rm <image> drill" runs the guard drill instead (issue #48).
|
||||
# Health through bash's /dev/tcp: no curl or wget in the image. 503 (database down) counts as unhealthy.
|
||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s --retries=3 \
|
||||
# Health through bash's /dev/tcp: no curl or wget in the image. 503 (database down, loops stopped, no prices) counts as unhealthy.
|
||||
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
|
||||
CMD ["bash", "-c", "exec 3<>/dev/tcp/127.0.0.1/${PORT:-8787} && printf 'GET /health HTTP/1.0\r\nHost: localhost\r\n\r\n' >&3 && head -n 1 <&3 | grep -q ' 200 '"]
|
||||
ENTRYPOINT ["anubis-entrypoint"]
|
||||
ARG ANUBIS_VERSION=dev
|
||||
ARG ANUBIS_COMMIT=
|
||||
LABEL org.opencontainers.image.title="Anubis" \
|
||||
org.opencontainers.image.description="Bot di trading personale: azioni USA e crypto spot, senza leva" \
|
||||
org.opencontainers.image.vendor="BalboSoft" \
|
||||
org.opencontainers.image.url="https://gitea.encke-hake.ts.net/BalboSoft/Anubis" \
|
||||
org.opencontainers.image.source="https://gitea.encke-hake.ts.net/BalboSoft/Anubis" \
|
||||
org.opencontainers.image.version="$ANUBIS_VERSION" \
|
||||
org.opencontainers.image.revision="$ANUBIS_COMMIT"
|
||||
Reference in new issue
Block a user