mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 04:24:35 +03:00
25 lines
791 B
ReStructuredText
25 lines
791 B
ReStructuredText
Securing the GraphQL endpoint (Docker)
|
|
======================================
|
|
|
|
To make sure that your GraphQL endpoint and the Hasura console are not publicly accessible, you need to
|
|
configure an access key.
|
|
|
|
Run the docker command with an access-key env var
|
|
-------------------------------------------------
|
|
|
|
.. code-block:: bash
|
|
:emphasize-lines: 5
|
|
|
|
#! /bin/bash
|
|
docker run -d -p 8080:8080 \
|
|
-e HASURA_GRAPHQL_DATABASE_URL=postgres://username:password@hostname:port/dbname \
|
|
-e HASURA_GRAPHQL_ENABLE_CONSOLE=true \
|
|
-e HASURA_GRAPHQL_ACCESS_KEY=mysecretkey \
|
|
hasura/graphql-engine:latest
|
|
|
|
|
|
.. note::
|
|
|
|
If you're looking at adding authentication and access control to your GraphQL API then head
|
|
to :doc:`Authentication / access control <../../auth/index>`.
|