Search code examples
dockerhasura

Run Hasura without Docker


I'm looking for the way to run Hasura without Docker, but can't find any way to do that - is there any option to achieve that?

Have a negative experience with Prisma in Docker, would like to try Hasura, but no, please, no Docker.

Any help would be much appreciated!


Solution

  • You can run the GraphQL Engine as a binary by building the Haskell executable with Cabal following the instructions here:

    https://github.com/hasura/graphql-engine/blob/master/server/CONTRIBUTING.md#run-and-test-manually

    You'll need to download and install GHC 8.6.5 and Cabal, which if you read the instructions, can be done using ghcup:

    https://www.haskell.org/ghcup/

    After following the previous instructions to compile, you can run the engine without Docker with the following:

    cabal new-run -- exe:graphql-engine \
      --database-url='postgres://<user>:<password>@<host>:<port>/<dbname>' \
      serve --enable-console --console-assets-dir=../console/static/dist