Dockerize strapi guide for keeping uploads

Hi, Built an application using strapi but on the CD we have difficulties keeping the uploads so we decided to use docker volume mapping to keep the files out of the source code. is there any existing Dockerfile or boilerplate we can use?

You need to bind it to the host.
So if you are using dockerfile and a docker run command it’s something with

docker run -v /folder/on/host/to/store:/public/uploads

Now I don’t know if your using this or docker compose etc, so it’s a bit hard to say. Here is some reading material since there is no code provided with a dockerfile etc.

3 Likes

Thanks, I did the same, problem solved :slight_smile:

Hello! Thanks for your response, I tried to look it up but strapi documentations seems to not having this. I suggest it should be added!

It is open source so you can also feel free to add something where you feel it’s missing :slight_smile: