SQLite-backed (Microsoft.Data.Sqlite, WAL) minimal API storing NestRecord
metadata plus the .nest archive as a BLOB. Endpoints: GET/POST /api/nests,
GET /api/nests/{id}[/file], PUT /api/nests/{id}/file, PUT
/api/nests/{id}/metadata, DELETE /api/nests/{id}, GET /healthz. Multipart
upload contract matches RemoteNestRepository (metadata JSON part + file
part). Added to OpenNest.sln, builds standalone on Linux. Dockerfile
publishes to a runtime image listening on :8090 with a /app/data volume
for the SQLite file. docs/nest-storage.md documents the wire contract,
endpoints and deployment.
Full curl round trip verified manually against a running instance:
upload (server-assigned id + computed fileSize), list, get, byte-exact
file download, metadata-only update (archive unchanged), file update
(new archive persisted), 404s for unknown ids, delete, post-delete 404.
24 lines
806 B
Docker
24 lines
806 B
Docker
# Build from the repository root: docker build -f OpenNest.Server/Dockerfile -t opennest-server .
|
|
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
|
WORKDIR /src
|
|
|
|
COPY OpenNest.Server/OpenNest.Server.csproj OpenNest.Server/
|
|
COPY OpenNest.Data/OpenNest.Data.csproj OpenNest.Data/
|
|
RUN dotnet restore OpenNest.Server/OpenNest.Server.csproj
|
|
|
|
COPY OpenNest.Server/ OpenNest.Server/
|
|
COPY OpenNest.Data/ OpenNest.Data/
|
|
RUN dotnet publish OpenNest.Server/OpenNest.Server.csproj -c Release -o /app --no-restore
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime
|
|
WORKDIR /app
|
|
COPY --from=build /app .
|
|
|
|
# SQLite database + .nest blobs live here; mount a volume at this path.
|
|
VOLUME /app/data
|
|
ENV OPENNEST_DB=/app/data/nests.db
|
|
ENV ASPNETCORE_URLS=http://+:8090
|
|
EXPOSE 8090
|
|
|
|
ENTRYPOINT ["dotnet", "OpenNest.Server.dll"]
|