Prerequisites

MinIO must be running and the target bucket must exist before the service starts. The service retries the bucket check on startup, so MinIO does not need to be ready at the exact same time, but the bucket must be created manually.

MinIO is managed by stand-infra. Run docker compose up there first.

Development

Requires .NET 8 SDK.

Create an appsettings.local.json file at the project root (see Configuration) then run:

  dotnet run --project src/IngestSvc
  

To see all log levels including Debug:

  Logging__LogLevel__Default=Debug dotnet run --project src/IngestSvc
  

Docker

Images are published to the GitHub Container Registry on each release.

  docker pull ghcr.io/association-ephemere/ingest-svc:latest
  
  docker run \
  -e Watcher__Path=/data/watch \
  -e Watcher__StandId=stand-1 \
  -e Watcher__ProcessedPath=/data/processed \
  -e Watcher__FailedPath=/data/failed \
  -e Storage__Endpoint=<minio-host>:9000 \
  -e Storage__AccessKey=<access-key> \
  -e Storage__SecretKey=<secret-key> \
  -e Storage__Bucket=photos \
  -v /path/to/watch:/data/watch \
  -v /path/to/processed:/data/processed \
  -v /path/to/failed:/data/failed \
  ghcr.io/association-ephemere/ingest-svc:latest
  

On Windows with Docker Desktop, use host.docker.internal to reach a MinIO instance running on the host machine:

  -e Storage__Endpoint=host.docker.internal:9000
  

Graceful shutdown

Sending SIGTERM to the process (or stopping the container with docker stop) triggers a graceful shutdown. The service stops accepting new files, waits for all ongoing uploads to complete, then exits. The default timeout is 5 minutes.