0

Recently I started making a REST API. My plan was to use React.js, Flask and Postgres all being created with docker-compose during development and then in production use React and Flask services with docker-compose but make the database run on VPS (outside of docker container). I should also add that I am currently doing my migrations via Flask-Migrate module.

I was thinking of a way how to easily deploy the project to a VPS by git and build the docker-compose using git post-receive hook, since I want to have full control of the process, but...

  1. How would I make database migrations this way?
  2. Is this a good way to build & deploy a project?

Sorry for any inconvenience and feel free to ask me for further info if you can't understand my questions.

Davkk
  • 23
  • 1
  • 5

1 Answers1

0

There are a few options in this field, but I personally prefer to use Liquibase to manage my schema and migrations. I use Knex for my data access inside node who also provides some of the same capabilities, but I prefer Liquibase. I'm currently generating a docker image and publishing that which gets auto-run, but once my current project is nearing release I'll probably move to a manual step to run DB migrations via spinnaker.

Russ Brown
  • 361
  • 1
  • 6