this post was submitted on 10 Feb 2025
40 points (97.6% liked)
Explain Like I'm Five
14968 readers
2 users here now
Simplifying Complexity, One Answer at a Time!
Rules
- Be respectful and inclusive.
- No harassment, hate speech, or trolling.
- Engage in constructive discussions.
- Share relevant content.
- Follow guidelines and moderators' instructions.
- Use appropriate language and tone.
- Report violations.
- Foster a continuous learning environment.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
You would probably make your own image that would depend on another Django image. Building that image would put your code into the container you made. To ease development you would mount your development directory into the container.
Then when you release your app you would update your container image with the latest code and also update the django container it depends on.
MySQL would live in another container separate from yours. It would need its own mounted directory where all the database files live on the host.
If you needed some other app with a web API or so you would put that in its own container as well.
To put everything together you would use docker-compose. That puts them into one network and defines how they may talk with each other, what directories or files from the host to mount and other configuration.