[Question] How to handle/init/persist migrations in Docker Image
See original GitHub issueIf someone is using Hasura (cli-migrations) docker image, what is the recommended way to init
migrations and share metadata and migrations with host?
I could not find anything related to docker management in the documentation. All information is about when running docker locally.
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
How do you perform Django database migrations when using ...
The first time I run Django's manage.py migrate, using the command sudo docker-compose run web python manage.py migrate , it works as expected....
Read more >Docker frequently asked questions (FAQ)
Most frequently asked questions. ... This container can be transferred to any Docker-enabled machine. The container can be executed there with the guarantee ......
Read more >Prisma Migrate: Deploy Migration with Docker - notiz.dev
One question about the guide Dockerizing a NestJS app with Prisma and PostgreSQL was asked frequently: "How to run database migrations in ...
Read more >Migrating to Docker: How to Plan a Migration and ... - Codefresh
And the most important question, that has to be answered before departing on ... Whether your product is ready to run as a...
Read more >Migrate your Applications to Containers at Scale - Amazon AWS
Modernize with AWS App2Container · Packages the application artifact and identified dependencies into container images · Configures the network ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The workflow you can use with Docker/Kubernetes and the
.cli-migrations
image is to make a customDockerfile
where you copy the migrations folder from the host to the container and let it apply them.If you are using the V2 migrations format:
If you are using the V1 format:
Assuming that your migrations/metadata are stored in those directories. You can also customize the location from which Hasura reads migrations/metadata by setting environment variables:
The workflow looks like this:
.cli-migrations
image applies them on startDo you think the documentation would be improved by putting more information about the specifics of the entire workflow, outside of what pertains to CI/CD here?
https://hasura.io/docs/1.0/graphql/manual/migrations/auto-apply-migrations.html#
Got it running. I need to use
0.0.0.0
to make sure it is available outside the container. (localhost is not)Thanks @GavinRay97