site icon indicating copy to clipboard operation
site copied to clipboard

Easy docker migrations

Open ChrisLovering opened this issue 2 years ago • 4 comments

This PR adds two things

  1. An easy way to generate migrations running under a pure docker setup
    • Simply run poetry run task dockermigrations and all the migrations will be created
    • Under the hood this calls docker exec and then through the magic of volumes it appears in the local system
  2. Add a persistent volume for postgres data
    • This means docker-compose down won't lose your db data anymore.
    • If needed you can still do docker-compose down --volumes

ChrisLovering avatar Nov 11 '21 21:11 ChrisLovering

✔️ Deploy Preview for pydis-static ready!

🔨 Explore the source changes: 8080d24da3b76697d5f63edba10248ae0eb6e346

🔍 Inspect the deploy log: https://app.netlify.com/sites/pydis-static/deploys/618d867f4fd12000080c78e9

😎 Browse the preview: https://deploy-preview-622--pydis-static.netlify.app

netlify[bot] avatar Nov 11 '21 21:11 netlify[bot]

Coverage Status

Coverage remained the same at 100.0% when pulling 8080d24da3b76697d5f63edba10248ae0eb6e346 on easy-docker-migrations into 613e0730c5391c33d35106049bb6e8537e644446 on main.

coveralls avatar Nov 11 '21 21:11 coveralls

The home app's migrations should also be mounted. This seems to be the only other app that has models.

MarkKoz avatar Nov 11 '21 21:11 MarkKoz

The home app's migrations should also be mounted. This seems to be the only other app that has models.

Not sure why I forgot you mentioning other apps having migrations yesterday. I've force pushed a new mount 👍

ChrisLovering avatar Nov 11 '21 21:11 ChrisLovering