regen-network / indexer

:rocket: Blockchain indexer and database
Other
2 stars 0 forks source link

Update docker environment to work with graphile-migrate watch, commit and uncommit commands #49

Open wgwz opened 1 year ago

wgwz commented 1 year ago

The current docker environment and in particular the indexer container do not support the watch, commit and uncommit commands from graphile-migrate.

At the moment, the only way to use those commands is to run them locally (on your host computer, not with docker). It may be nice to be able to support those commands with the docker setup. That said, I personally think it may be fine to leave it as is for a while. The migrations/README.md documents how to run these locally without docker.

In order to support these commands I think we would need to set up a volume that mounts at minimum these files and paths:

The watch command watches migrations/current.sql and runs the file against the db any time a change is detected. The commit command commits the changes in migrations/current.sql and adds a file to migrations/committed/. The uncommit command reverse the commit command.