docs: add Koyeb as a deployment option

GITHUB_PR_NUMBER: 6859
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/6859

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/1270
Co-authored-by: Edouard Bonlieu <2520463+edouardb@users.noreply.github.com>
Co-authored-by: Rikin Kachhia <54616969+rikinsk@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
GitOrigin-RevId: c084a60b50b405452e60581e16dc27c1fa0b22fc
This commit is contained in:
hasura-bot 2022-01-18 18:03:21 +05:30
parent 11478c0b44
commit 69ea0e7026
4 changed files with 79 additions and 0 deletions

View File

@ -48,6 +48,7 @@ Choose from the full list of deployment guides:
- `Deploy using Instant GraphQL on AWS RDS (blog) <https://hasura.io/blog/instant-graphql-on-aws-rds-1edfb85b5985/>`__
- :ref:`Deploy using Render One-click Deploy with Managed PostgreSQL <deploy_render>`
- :ref:`Deploy using Nhost One-click Deploy with Managed PostgreSQL, Storage, and Auth <deploy_nhost>`
- :ref:`Deploy using Koyeb Serverless Platform <deploy_koyeb>`
.. admonition:: Custom Docker images or binaries
@ -67,3 +68,4 @@ Choose from the full list of deployment guides:
Using Google Cloud Platform & Kubernetes <google-kubernetes-engine-cloud-sql>
Using Render (one-click) <render-one-click>
Using Nhost (one-click) <nhost-one-click>
Using Koyeb Serverless Platform <koyeb>

View File

@ -0,0 +1,77 @@
.. meta::
:description: Deploy Hasura GraphQL engine on Koyeb Serverless Platform with Docker
:keywords: hasura, docs, guide, deployment, koyeb, postgresql, firecracker
.. _deploy_koyeb:
Deploying Hasura GraphQL engine on Koyeb
========================================
.. contents::
:backlinks: none
:depth: 1
:local:
Introduction
------------
This guide explains how to deploy the Hasura GraphQL engine on the `Koyeb Serverless Platform <https://koyeb.com>`__.
Prerequisites
-------------
To successfully follow and complete this guide, you need:
- A PostgreSQL database to use as the Hasura GraphQL engine backend.
- A `Koyeb account <https://app.koyeb.com>`__ to deploy and run the Hasura GraphQL engine.
Deploy Hasura GraphQL engine on Koyeb
-------------------------------------
To deploy the Hasura GraphQL engine on Koyeb, we use the ``hasura/graphql-engine`` Docker image.
On the Koyeb control panel, click the **Create App** button.
You land on the Koyeb App creation form.
.. thumbnail:: /img/graphql/core/deployment/koyeb-hasura-app-creation.png
:alt: Koyeb control panel
1. Fill the `Docker image` field with `hasura/graphql-engine`.
2. In the *Ports* section, change the export port from `80` to `8080`, which is the port the ``hasura/graphql-engine`` Docker image app is
listening on. This setting is required to let Koyeb know which port your application is listening to and properly route incoming HTTP requests.
If you want the Hasura GraphQL engine to be available on a specific path, you can change the default one (``/``) to the path of your choice.
3. In the *Environment variables* section, configure the environment variables required to properly run the Hasura GraphQL engine.
- HASURA_GRAPHQL_DATABASE_URL: The environment variable containing the PostgreSQL URL, i.e. ``postgres://<user>:<password>@<host>:<port>/<database>``.
To store this value which contains sensitive information, we strongly recommend configuring the environment variable using Koyeb secrets instead of
storing it as a plaintext value. Secrets are encrypted at rest. They are ideal to store sensitive data like API keys, OAuth tokens, etc.
- HASURA_GRAPHQL_ENABLE_CONSOLE: Set to `true`. This will expose and allow you to access the Hasura console.
- HASURA_GRAPHQL_ADMIN_SECRET: The secret to access the Hasura Graphql admin. As for the `HASURA_GRAPHQL_DATABASE_URL`, we strongly recommend using
a secret to store this value.
4. Give your App a name, i.e `hasura-demo`, and click **Create App**.
The deployment should be up and running in a few seconds.
Access the Hasura console
-------------------------
Once your Koyeb App is deployed, you can click the App link in the Koyeb control panel to access the Hasura console.
.. thumbnail:: /img/graphql/core/deployment/koyeb-hasura-service.png
:alt: Koyeb control panel
.. code-block:: bash
https://<your-app-name>-<your-org-name>.koyeb.app/
At any time, you can track your Harsura service status in the Koyeb control panel and visualize the Hasura GraphQlLengine web service logs in the
**Logs** tab of your service.
References
----------
- `Koyeb Docs <https://koyeb.com/docs>`_
- `Koyeb Hasura tutorial <https://www.koyeb.com/tutorials/deploy-the-hasura-graphql-engine-to-expose-and-create-apis-from-your-databases-on-koyeb>`_

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB