Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
FROM hasura/graphql-engine:latest
ENV DB_NAME d7tpjeaio1122voo
ENV DB_HOST ec2-184-74-216-48.compute-1.amazonaws.com
ENV DB_PORT 5432
ENV DB_USER mdtoogbscrflgh
ENV DB_PASSWORD 9e3876f94cdd0de56882d0dea121v3b267a836d04d24751428c41044a390b3b7a8d9
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
CMD ["./entrypoint.sh"]
#!/bin/sh
set -o errexit -o nounset -o pipefail
if [ -z "${DB_NAME}" ]; then
echo "Must provide DB_NAME environment variable. Exiting...."
exit 1
fi
if [ -z "${DB_USER}" ]; then
echo "Must provide DB_USER environment variable. Exiting...."
exit 1
fi
if [ -z "${DB_PASSWORD}" ]; then
echo "Must provide DB_PASSWORD environment variable. Exiting...."
exit 1
fi
export HASURA_GRAPHQL_DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}
export HASURA_GRAPHQL_ENABLE_CONSOLE=true
/bin/graphql-engine serve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.