Created
September 15, 2019 05:37
-
-
Save luandevpro/af3c289c722b974a208f70c36861c586 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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