Fase 10 — Nuova rotta: solo Docker (#184)
ci / test (postgres) (push) Successful in 4m50s
ci / test (sqlite) (push) Failing after 4m21s
ci / image (push) Skipped

ADR 0021-0026 for the new course of 2 December 2026, roadmap of phases 10-24. The desktop application is gone: Docker is the only form, and outside a container the server runs only for development and tests with --data-dir, on this computer only. Lighter image (829 MB to 410 MB), rotating logs, backtest and learning as one-shot commands.

refs #113 #114 #115 #78 #80 #81

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Alberto Balbo <alberto.balbo.96@gmail.com>
This commit was merged in pull request #184.
This commit is contained in:
Alby96andClaude Opus 5.5 authored and Alby96 committed 2026-12-03 19:59:00 +01:00
1 parent 3c57b3e84c
commit 1bc7e067fd
96 files changed
+1433 -1606

No files matched your search

+11 -8
View File
@@ -3,12 +3,13 @@
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY global.json Directory.Build.props Directory.Packages.props ./
COPY global.json Directory.Build.props Directory.Build.targets 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/
COPY src/Anubis.Guard/Anubis.Guard.csproj src/Anubis.Guard/packages.lock.json src/Anubis.Guard/
RUN dotnet restore src/Anubis.Server/Anubis.Server.csproj --locked-mode && \
dotnet restore src/Anubis.Guard/Anubis.Guard.csproj --locked-mode
# Only Linux x64 (ADR 0022): the native libraries of the other platforms stay out of the image.
RUN dotnet restore src/Anubis.Server/Anubis.Server.csproj -r linux-x64 --locked-mode && \
dotnet restore src/Anubis.Guard/Anubis.Guard.csproj -r linux-x64 --locked-mode
COPY src/Anubis/ src/Anubis/
COPY src/Anubis.Server/ src/Anubis.Server/
COPY src/Anubis.Guard/ src/Anubis.Guard/
@@ -19,17 +20,19 @@ COPY docs/backtests/ docs/backtests/
COPY docs/learning/ docs/learning/
# 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}
RUN dotnet publish src/Anubis.Server/Anubis.Server.csproj -c Release -r linux-x64 --self-contained false --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 ${ANUBIS_COMMIT:+-p:SourceRevisionId=$ANUBIS_COMMIT}
RUN dotnet publish src/Anubis.Guard/Anubis.Guard.csproj -c Release -r linux-x64 --self-contained false --no-restore -o /app ${ANUBIS_COMMIT:+-p:SourceRevisionId=$ANUBIS_COMMIT}
# No Windows library in /app (Directory.Build.targets): if one comes back, the image does not build.
RUN if ls /app | grep -qiE '^onnxruntime.*\.dll$'; then echo "Librerie di Windows in /app" >&2; exit 1; fi
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= \
# The port comes from PORT (8787 by default), read by the app; the base image's own port setting is cleared. The base
# image also sets DOTNET_RUNNING_IN_CONTAINER=true: server and guard know by themselves they are in the container (ADR 0022).
ENV ASPNETCORE_HTTP_PORTS= \
TZ=Europe/Rome \
PUID=99 \
PGID=100