A
A
Andrey2021-08-28 17:27:11
linux
Andrey, 2021-08-28 17:27:11

Creating a file store for api(.net) or microservice in docker?

Greetings.

A simple api is being made (asp.net + docker + linux).
You need a file storage so that you can download the report by receiving a link to it in the api. (probably through the HATEOAS pattern).
If you need local storage, then how best to organize it. I thought the container with Linux is being mounted, some kind of samba is being configured there. I am advised to use docker volume. There was an idea to store files in the database, but something like that looks terrible.

Unfortunately, there are examples on the net where, for example, Azure blob is used, or folders are created directly in the project and a file is written to the root.

I want to clarify how this is done in 2021. Or at least throw a reference to the theory.
Thank you.

PS (files like excel reports. size from 100 kb to 250 mb. But mostly 10-15 mb. There will be no more than one and a half thousand files. The load is small, about 100 write and read requests per day.)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
Loli E1ON, 2021-08-28
@E1ON

1. Store files on S3
2. Either store locally and transfer folders through docker volumes

S
samizdam, 2021-09-02
@samizdam

Minio look. S3 compatible storage, easy to run in a container. There is an sdk for any stack, the client should also work with S3.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question