V
V
Valery2019-01-09 18:25:20
Django
Valery, 2019-01-09 18:25:20

Where is the best place to upload files when using a docker container?

Suppose I created a python3 + Django2 docker container and another one with a database, for example PostgreSQL.
In my application, you can upload files up to 100Mb
And because of my inexperience, I wondered where it is better to upload files ?.
I'm afraid that if, say, they are uploaded to the / media / folder in the docker container, and for example, in a couple of months I have to make changes that I will do on the local machine, then after rebuilding the container on the server, all downloaded files will be lost.
Therefore, I thought, maybe use a separate container for storage or not store it in a non-container?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Shitskov, 2019-01-09
@dezzignet

store not in a container

https://docs.docker.com/storage/volumes/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question