Files
Anubis/deploy/docker/Dockerfile
T
Alby96andClaude Opus 5.5 7041533ce2 Add the honest backtests of the base strategies (refs #44)
crypto_trend now has a backtest report and an outcome file, computed by
"anubis backtest base" on the Binance daily archives from 2019 to October
2026. Prices are converted from USDT to euro with the ECB rate of the day,
and delisted coins stay in the universe, so survivors do not flatter the
result. The protocol runs the broad universe and BTC, ETH and SOL, with
costs doubled and tripled and buy and hold beside. Both universes must pass.

The outcome is "not passed": the broad universe falls 29.1% (limit 25%) and
the narrow one has a probability of overfitting of 0.84 (limit 0.40). The
strategy therefore stays in observation. The stock strategies wait for the
Alpaca keys and stay in observation too. The bot reads the outcome files at
every start.

Trials now read 450 days of history before their start, only so the
indicators and the 400-day listing age are ready on the first day. Before
this, 2019 was spent warming up and BTC and ETH could not be chosen until
2020. A daily series also stops at a hole longer than a week, so the LUNA
relaunched in 2022 is not mistaken for the coin that collapsed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 16:13:23 +01:00

35 lines
1.8 KiB
Docker

# Anubis image (ADR 0003, SPEC 15.2). Build from the repository root:
# docker build -f deploy/docker/Dockerfile -t gitea.encke-hake.ts.net/balbosoft/anubis:dev .
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY global.json Directory.Build.props Directory.Packages.props ./
COPY src/Anubis/Anubis.csproj src/Anubis/packages.lock.json src/Anubis/
COPY src/Anubis.Server/Anubis.Server.csproj src/Anubis.Server/packages.lock.json src/Anubis.Server/
RUN dotnet restore src/Anubis.Server/Anubis.Server.csproj --locked-mode
COPY src/Anubis/ src/Anubis/
COPY src/Anubis.Server/ src/Anubis.Server/
# The logo is embedded from docs/design/logo, its only source (ADR 0005).
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/
RUN dotnet publish src/Anubis.Server/Anubis.Server.csproj -c Release --no-restore -o /app
FROM mcr.microsoft.com/dotnet/aspnet:10.0
WORKDIR /app
COPY --from=build /app ./
COPY --chmod=755 deploy/docker/entrypoint.sh /usr/local/bin/anubis-entrypoint
# The port comes from PORT (8787 by default), read by the app; the base image's own port setting is cleared.
ENV ANUBIS_PLATFORM=docker \
ASPNETCORE_HTTP_PORTS= \
TZ=Europe/Rome \
PUID=99 \
PGID=100
EXPOSE 8787
VOLUME /data
# Starts as root only to give /data to PUID:PGID, then runs the app as that user (entrypoint.sh).
# 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 \
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"]