Skip to content

dvasdekis/hasura-cli-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 

Repository files navigation

hasura-cli-docker

Hasura CLI in a docker instance, so that hasura metadata migrations can be applied ephemerally without giving your main Hasura instance CREATE SCHEMA access on your production DB.

Your migrations folder should resemble the below:

.
├── config.yaml
└── metadata
└── migrations
   └── metadata.json
└── seeds

Usage:

[Optional] Init project - migrations:
docker run --rm --mount type=bind,source="/path/to/your/migrations_home",target=/hasuracli:rw docker.io/dvasdekis/hasura-cli-docker:latest init migrations --endpoint "http://your_hasura_address:80" --admin-secret "your_hasura_admin_secret"

Run/Apply migrations:
docker run --restart on-failure --rm --volume /path/to/your/migrations/folder:/hasuracli/migrations docker.io/dvasdekis/hasura-cli-docker:latest metadata apply --endpoint "http://your_hasura_address:80" --admin-secret "your_hasura_admin_secret" --project migrations

Docker Hub link
Cli Docs

Hasura CLI version: v2.4.0

About

Hasura CLI in a docker instance

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published