KBMOD Extra Life Podcast Build Guides Reviews Battlestations Join Us Merch Multistream About

Best Methods to Run DB Locally for Development


I am in the process of starting a project that will use Django, SCSS, and more, and will involve a relational database of either MySQL or more likely the fork MariaDB. My question is in regards to best practice for managing the DB in development. Is my best bet to use a Docker container for MariaDB / MySQL?


Docker probably isn’t a bad idea, but I’ve personally never used it for dev work. I used Virtualbox for a while because it was easy to fully contain the development environment, which is especially important since my host OS is Arch and I can keep the VM at whatever OS version (usually Ubuntu Server) I needed. Just forward the port(s) you need and you’re good to go.


I’ve done a tad bit of research and I think I am going to go the Docker route for the DB – maybe it will force me to read that Pro Docker book I got in a recent Humble Book Bundle. Now the question is whether I want to put Django in a venv or Docker container? I guess it doesn’t really matter.


Virtualenv is nice just because it’s specifically meant for Python (it has always worked nicely for my Django projects). Aside from that, yeah it’s just a matter of preference/experience.


I went the Virtualenv route just to have experience doing it.