Configuration files can either be in YAML or JSON; their names are derived from the
GO_ENV variable, for example
GO_ENV=prod will cause the
prod.yaml config file to be used,
GO_ENV=dev will use the
dev.yaml. A path to look for the config files can be specified using the
-path <folder> command line argument.
We've tried to ensure that the config file is self-documenting and easy to work with.
If deploying into environments like Kubernetes it's useful to be able to configure things like secrets and hosts through environment variables therefore we expose the below environment variables. This is especially useful for secrets since they are usually injected in via a secrets management framework (ie. Kubernetes Secrets).
Keep in mind any value can be overwritten using environment variables, for example
auth.jwt.public_key_type converts to
SG_AUTH_JWT_PUBLIC_KEY_TYPE. In short prefix
SG_, uppercase and all
. should changed to
Yugabyte is an open-source, geo-distrubuted cloud-native relational DB that scales horizontally. GraphJin works with Yugabyte right out of the box. If you think you're data needs will outgrow Postgres and you don't really want to deal with sharding then Yugabyte is the way to go. Just point GraphJin to your Yugabyte DB and everything will just work including running migrations, seeding, querying, mutations, etc.
To use Yugabyte in your local development flow just uncomment the following lines in the
docker-compose.yml file that is part of your GraphJin app. Also remember to comment out the originl postgres