Coder Social home page Coder Social logo

hasura / graphql-engine-heroku Goto Github PK

View Code? Open in Web Editor NEW
229.0 29.0 234.0 632 KB

Blazing fast, instant realtime GraphQL APIs on Postgres with fine grained access control, also trigger webhooks on database events.

Home Page: https://hasura.io

Dockerfile 100.00%
heroku hasura postgres graphql

graphql-engine-heroku's Introduction

Hasura GraphQL Engine on Heroku

GitHub stars

Hasura GraphQL Engine is a blazing-fast GraphQL server that gives you ⚡ instant, realtime GraphQL APIs over Postgres, with webhook triggers on database events for asynchronous business logic.

Hasura helps you build GraphQL apps backed by Postgres or incrementally move to GraphQL for existing applications using Postgres.

Deploy Hasura GraphQL Engine on Heroku and get a GraphQL endpoint in under 30 seconds 🕐

Read more at hasura.io and the docs.

Quickstart

1. Deploy to Heroku

Deploy to Heroku and instantly get a realtime GraphQL API backed by Heroku Postgres:

Deploy to Heroku

Create New App - Heroku

2. Open Hasura Console

Once the deployment is complete, click on the View button as marked above. This will take you to the Hasura Console, where you can connect your database, create a table and make your first GraphQL query.

Hasura Console

3. Connect a database

Head to the Data tab on the console and connect your database. If you do not have an existing database, you can connect to the Heroku Postgres database that was set up with your deployment using the DATABASE_URL env var.

heroku_connect_db

4. Create a table

Navigate to Data -> Create table on the console and create a table called profile with the following columns:

name type
id Integer (auto-increment)
name Text

Choose id as the Primary key and click the Create button.

Hasura Console - Create table

5. Insert sample data

Once the table is created, go to the Insert Row tab and insert some sample rows:

Thor
Iron Man
Hulk
Captain America
Black Widow

Hasura Console - Insert rows

6. Try out GraphQL

Switch to the GraphiQL tab on top and execute the following GraphQL query:

query {
  profile {
    id
    name
  }
}

Hasura Console - GraphQL query

Support & Troubleshooting

Feel free to talk to us on Discord about anything and everything. You can also contact us using one of the following channels:

Next steps

Further reading

graphql-engine-heroku's People

Contributors

0x777 avatar alexander-mart avatar ananya-2410 avatar arvi3411301 avatar coco98 avatar codingkarthik avatar dliub avatar ecthiender avatar hasura-bot avatar karthikvt26 avatar malhotrachetan avatar marionschleifer avatar praveenweb avatar rakeshkky avatar rikinsk avatar scriptnull avatar scriptonist avatar shahidhk avatar shark-h avatar tirumaraiselvan avatar wawhal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

graphql-engine-heroku's Issues

Deployment via heroku fails

When i try to deploy via git push heroku master i get this error message.

Enumerating objects: 283, done. Counting objects: 100% (283/283), done. Delta compression using up to 12 threads Compressing objects: 100% (134/134), done. Writing objects: 100% (283/283), 537.93 KiB | 268.96 MiB/s, done. Total 283 (delta 147), reused 283 (delta 147) remote: Compressing source files... done. remote: Building source: remote: remote: ! No default language could be detected for this app. remote: HINT: This occurs when Heroku cannot detect the buildpack to use for this application automatically. remote: See https://devcenter.heroku.com/articles/buildpacks remote: remote: ! Push failed remote: Verifying deploy... remote: remote: ! Push rejected to cc-olu-dp. remote: To https://git.heroku.com/cc-olu-dp.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'https://git.heroku.com/cc-olu-dp.git'

Error when host hasura on heroku using Dockerfile with migrations/metadada files setup

I'm trying to deploy on Heroku Dockerfile with hasura folder with metada/migrations without success:

# FROM hasura/graphql-engine:v2.6.0
FROM hasura/graphql-engine:v2.0.4.cli-migrations-v3

COPY ./hasura/migrations /hasura-migrations
COPY ./hasura/metadata /hasura-metadata
WORKDIR /

# Enable the console
ENV HASURA_GRAPHQL_ENABLE_CONSOLE=true

# Enable debugging mode. It should be disabled in production.
ENV HASURA_GRAPHQL_DEV_MODE=true

# Heroku hobby tier PG has few limitations including 20 max connections
# https://devcenter.heroku.com/articles/heroku-postgres-plans#hobby-tier
ENV HASURA_GRAPHQL_PG_CONNECTIONS=15

CMD HASURA_GRAPHQL_METADATA_DATABASE_URL=$DATABASE_URL graphql-engine \
    --database-url $DATABASE_URL \
    --metadata-database-url $DATABASE_URL \
    serve \
    --server-port $PORT

Error:

Fatal Error: Either of --metadata-database-url or --database-url option expected
2022-04-28T21:09:06.983085+00:00 app[web.1]: {"timestamp":"2022-04-28T21:09:06.000+0000","level":"info","type":"startup","detail":{"kind":"migrations-startup","info":"failed waiting for 9691, try increasing HASURA_GRAPHQL_MIGRATIONS_SERVER_TIMEOUT (default: 30)"}}
2022-04-28T21:09:07.088317+00:00 heroku[web.1]: Process exited with status 1
2022-04-28T21:09:07.171946+00:00 heroku[web.1]: State changed from starting to crashed

structure folder:

~/Developer/popstand/graphql-engine-heroku (master) » tree -L 2                                                                          130 ↵ tgmarinho@Thiagos-MacBook-Pro
.
├── Dockerfile
├── README.md
├── app.json
├── assets
│   ├── console.png
│   ├── create_new_app_heroku.png
│   ├── create_new_app_heroku_2.png
│   ├── create_new_app_heroku_3.png
│   ├── hasura_console.png
│   ├── hasura_create_table.png
│   ├── hasura_graphql_query.png
│   ├── hasura_insert_row.png
│   ├── heroku-create-new-app.png
│   └── heroku_connect_db.png
├── hasura
│   ├── config.yaml
│   ├── metadata
│   ├── migrations
│   └── seeds
├── heroku copy.yml
└── heroku.yml

database.yaml:

- name: default
  kind: postgres
  configuration:
    connection_info:
      database_url:
        # Prod: DATABASE_URL 
        # Dev: HASURA_GRAPHQL_DATABASE_URL
        from_env: DATABASE_URL
      isolation_level: read-committed
      pool_settings:
        connection_lifetime: 600
        idle_timeout: 180
        max_connections: 50
        retries: 1
      use_prepared_statements: true
  tables: "!include default/tables/tables.yaml"


config.yaml

version: 3
 # Prod: HASURA_GRAPHQL_ENDPOINT  
 # Dev: http://localhost:8080
endpoint: http://localhost:8080
metadata_directory: metadata
actions:
  kind: synchronous
   # Prod: HASURA_GRAPHQL_ENDPOINT  
   # Dev: http://localhost:8080
  handler_webhook_baseurl: http://localhost:8080

I suggest putting some sample to Doc with migration/metadata custom hasura project

OpenSSL 3 security fixes in Heroku

Hi Team,

We are using Harsua GraphQL in Heroku as per the one click deployment documents (https://elements.heroku.com/buttons/hasura/graphql-engine-heroku), Currently our application in PROD.

For OpenSSL 3 Security issue, Heroku suggested us to redeploy with the updated docker image.
image

Please help me with the steps to rebuild the updated docker image with OpenSSL 3 security fix.
Is the docker file present in latest git code have the fix for OpenSSl 3 security?

Thanks
Deepak BH

Error while deploying with heroku

=== Fetching app code
=== Building web (Dockerfile)
Sending build context to Docker daemon  585.2kBStep 1/3 : FROM hasura/graphql-engine:v1.0.0-beta.01
manifest for hasura/graphql-engine:v1.0.0-beta.01 not found

image

Stuck loading on Safari

Steps done:

  1. Created a new Heroku repository following the instructions
  2. Clicked "View" button
  3. (On Safari 13.1/macOS Catalina 10.15.4) The Loading screen persists
  4. Console outputs this

Screen Shot 2020-04-30 at 6 39 12 PM

Launching on Chrome however was no issue

Error when upgrading Postgres version

I've swapped out the underlying database for version 12.1 on Heroku. I'm now getting errors similar to #57, and I'm unable to reset the metadata.

When resetting the metadata in the console, I get "unexpected : relation "hdb_catalog.hdb_function" does not exist".

I know I could have followed a proper migration as described in the docs, but there wasn't any data yet, so I just intend to set the Postgres version to 12.1 and then load data into it from a dump.

Is the intention that you can't do a hard-reset of Hasura's metdata on a fresh DB without going through the procedure of backing up the metadata?

Not able to deploy hasura graphql engine on Heroku

I want to deploy the version 1.3.3 but the readme.md file's button is not working.
The error is:
Screenshot 2023-07-11 at 3 02 22 PM

The app.json in your code still has hobby-dev plan which is deprecated from heroku.

Please update it to the mini plan.
It is really urgent.

1-Click Deploy - App Crashing

Attempted to use "Deploy to Heroku" button several times today.
(https://heroku.com/deploy?template=https://github.com/hasura/graphql-engine-heroku)
I continue to get "Application Error", with the server crashing.

I checked the logs with heroku logs --tail -a [app-name], getting this:

2022-08-04T23:11:43.006177+00:00 app[web.1]: {"detail":{"info":{"admin_secret_set":false,"auth_hook":null,"auth_hook_mode":null,"console_assets_dir":null,"cors_config":{"allowed_origins":"*","disabled":false,"ws_read_cookie":null},"enable_allowlist":false,"enable_console":true,"enable_maintenance_mode":false,"enable_metadata_query_logging":false,"enable_telemetry":true,"enabled_apis":["config","pgdump","graphql","metadata"],"enabled_log_types":["startup","webhook-log","websocket-log","http-log"],"events_fetch_batch_size":100,"experimental_features":[],"graceful_shutdown_timeout":60,"infer_function_permissions":true,"jwt_secret":[],"live_query_options":{"batch_size":100,"refetch_delay":1},"log_level":"info","port":40462,"remote_schema_permissions":false,"server_host":"HostAny","stringify_numeric_types":false,"transaction_isolation":"ISOLATION LEVEL READ COMMITTED","unauth_role":null,"use_prepared_statements":true,"v1-boolean-null-collapse":false,"websocket_compression_options":"NoCompression","websocket_connection_init_timeout":"WSConnectionInitTimeout {unWSConnectionInitTimeout = Seconds {seconds = 3s}}","websocket_keep_alive":"KeepAliveDelay {unKeepAliveDelay = Seconds {seconds = 5s}}"},"kind":"server_configuration"},"level":"info","timestamp":"2022-08-04T23:11:43.003+0000","type":"startup"}
2022-08-04T23:11:43.006185+00:00 app[web.1]: {"detail":{"info":{"database_url":"postgres://eavsbuwcdjkxdi:[email protected]:5432/d2fu2qakftai2n","retries":1},"kind":"postgres_connection"},"level":"info","timestamp":"2022-08-04T23:11:43.003+0000","type":"startup"}
2022-08-04T23:11:43.198475+00:00 app[web.1]: {"detail":{"info":{"code":"postgres-error","error":"pgcrypto extension is required, but it could not be created; encountered unknown postgres error","internal":{"arguments":[],"error":{"description":null,"exec_status":"FatalError","hint":null,"message":"extension \"pgcrypto\" must be installed in schema \"heroku_ext\"","status_code":"0A000"},"prepared":false,"statement":"CREATE EXTENSION IF NOT EXISTS pgcrypto SCHEMA public"},"path":"$"},"kind":"catalog_migrate"},"level":"error","timestamp":"2022-08-04T23:11:43.003+0000","type":"startup"}
2022-08-04T23:11:43.198553+00:00 app[web.1]: {"code":"postgres-error","error":"pgcrypto extension is required, but it could not be created; encountered unknown postgres error","internal":{"arguments":[],"error":{"description":null,"exec_status":"FatalError","hint":null,"message":"extension \"pgcrypto\" must be installed in schema \"heroku_ext\"","status_code":"0A000"},"prepared":false,"statement":"CREATE EXTENSION IF NOT EXISTS pgcrypto SCHEMA public"},"path":"$"}
2022-08-04T23:11:43.322838+00:00 heroku[web.1]: Process exited with status 1
2022-08-04T23:11:43.372902+00:00 heroku[web.1]: State changed from starting to crashed
2022-08-04T23:11:50.100147+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=stage-exitweb2.herokuapp.com request_id=70c09e30-7670-4e70-812a-e39a09e23afa fwd="76.21.127.10" dyno= connect= service= status=503 bytes= protocol=https
2022-08-04T23:11:50.581709+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=stage-exitweb2.herokuapp.com request_id=7be5826b-0a2a-4de5-9374-9498d59ad5a8 fwd="76.21.127.10" dyno= connect= service= status=503 bytes= protocol=https

Seems like it might have something to do with the postgres extension "pgcrypto"?

Any guidance here would be greatly appreciated.

Heroku instance of Hasura not working

Hello everyone, I'm currently getting this error:

image

Logs:

2020-07-21T04:51:26.794186+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/v1/graphql" host=transportec-api.herokuapp.com request_id=MY-SECRET-ID fwd="MY-SECRET-IP" dyno= connect= service= status=503 bytes= protocol=https
2020-07-21T04:52:06.469031+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/v1/graphql" host=transportec-api.herokuapp.com request_id=MY-SECRET-ID fwd="MY-SECRET-IP" dyno= connect= service= status=503 bytes= protocol=https

All the other logs are basically the same as these two above.

I noticed (from my emails) that a release came out today (v1.3.0). Maybe this new version somehow broke my Heroku app?

Thanks in advance. I'm opening this issue (similar to this one #71 ) in case anyone is having the same issue with the version 1.3.0 as of today

Can Hasura be autoscaled on Heroku?

Hey 👋 first i want to say thanks for this amazing project 🥇

Im currently starting a new project and would like to keep the necessary devops to a minimum, so i thought to setup Hasura on Heroku … thinking about the future it would be a dream if i could just scale the heroku dynos to multiple instances - but would that work? And if not automatically, what would be necessary to achieve that (if possible)?

"We're sorry, but something went wrong."

...If you are the application owner check the logs for more information.

Logs:

root@localhost:~# dokku logs company-core
2021-11-20T16:57:52.676306106Z app[web.1]: {"type":"startup","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":{"kind":"server_configuration","info":{"live_query_options":{"batch_size":100,"refetch_delay":1},"transaction_isolation":"ISOLATION LEVEL READ COMMITTED","enable_maintenance_mode":false,"enabled_log_types":["http-log","websocket-log","startup","webhook-log"],"server_host":"HostAny","websocket_connection_init_timeout":"WSConnectionInitTimeout {unWSConnectionInitTimeout = Seconds {seconds = 3s}}","enable_allowlist":false,"remote_schema_permissions":false,"log_level":"info","auth_hook_mode":null,"use_prepared_statements":true,"unauth_role":null,"stringify_numeric_types":false,"v1-boolean-null-collapse":false,"graceful_shutdown_timeout":60,"enabled_apis":["metadata","graphql","config","pgdump"],"enable_telemetry":true,"enable_console":true,"auth_hook":null,"infer_function_permissions":true,"experimental_features":[],"events_fetch_batch_size":100,"jwt_secret":null,"cors_config":{"allowed_origins":"*","disabled":false,"ws_read_cookie":null},"websocket_compression_options":"NoCompression","console_assets_dir":null,"admin_secret_set":true,"port":5000,"websocket_keep_alive":"KeepAliveDelay {unKeepAliveDelay = Seconds {seconds = 5s}}"}}}
2021-11-20T16:57:52.676389787Z app[web.1]: {"type":"startup","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":{"kind":"postgres_connection","info":{"retries":1,"database_url":"postgres://postgres:...@dokku-postgres-company-core:5432/company_core"}}}
2021-11-20T16:57:53.676623114Z app[web.1]: {"type":"unstructured","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":"Thread processEventQueue (re)started"}
2021-11-20T16:57:53.676654514Z app[web.1]: {"type":"unstructured","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":"Thread asyncActionsProcessor (re)started"}
2021-11-20T16:57:53.676662364Z app[web.1]: {"type":"unstructured","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":"Thread runCronEventsGenerator (re)started"}
2021-11-20T16:57:53.676668974Z app[web.1]: {"type":"unstructured","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":"Thread processScheduledTriggers (re)started"}
2021-11-20T16:57:53.676674614Z app[web.1]: {"type":"unstructured","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":"Thread runTelemetry (re)started"}
2021-11-20T16:57:53.676680334Z app[web.1]: {"type":"startup","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":{"kind":"catalog_migrate","info":"Already at the latest catalog version (47); nothing to do."}}
2021-11-20T16:57:53.676685904Z app[web.1]: {"type":"startup","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":{"kind":"schema-sync","info":"Schema sync enabled. Polling at Milliseconds {milliseconds = 1s}"}}
2021-11-20T16:57:53.676692594Z app[web.1]: {"type":"unstructured","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":"Thread SchemeUpdate.listener (re)started"}
2021-11-20T16:57:53.676698464Z app[web.1]: {"type":"startup","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":{"kind":"schema-sync","info":{"thread_id":"ThreadId 17","instance_id":"9975d94a-d049-4489-a324-16871656b9bd","message":"listener thread started"}}}
2021-11-20T16:57:53.676704784Z app[web.1]: {"type":"unstructured","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":"Thread ourIdleGC (re)started"}
2021-11-20T16:57:53.676722744Z app[web.1]: {"type":"unstructured","timestamp":"2021-11-20T16:57:52.674+0000","level":"warn","detail":"The following environment variables are deprecated and moved to metadata: HASURA_GRAPHQL_PG_CONNECTIONS"}
2021-11-20T16:57:53.676728454Z app[web.1]: {"type":"unstructured","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":"Thread SchemeUpdate.processor (re)started"}
2021-11-20T16:57:53.676734864Z app[web.1]: {"type":"startup","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":{"kind":"schema-sync","info":{"thread_id":"ThreadId 27","instance_id":"9975d94a-d049-4489-a324-16871656b9bd","message":"processor thread started"}}}
2021-11-20T16:57:53.676740634Z app[web.1]: {"type":"startup","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":{"kind":"event_triggers","info":"starting workers"}}
2021-11-20T16:57:53.676745464Z app[web.1]: {"type":"unstructured","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":"Thread asyncActionSubscriptionsProcessor (re)started"}
2021-11-20T16:57:53.676749934Z app[web.1]: {"type":"startup","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":{"kind":"scheduled_triggers","info":"preparing data"}}
2021-11-20T16:57:53.676754584Z app[web.1]: {"type":"schema-sync-thread","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":{"thread_type":"processor","info":{"message":"Schema Version changed with no notifications"}}}
2021-11-20T16:57:53.676759704Z app[web.1]: {"type":"unstructured","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":"Thread checkForUpdates (re)started"}
2021-11-20T16:57:53.676765574Z app[web.1]: {"type":"startup","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":{"kind":"telemetry","info":"Help us improve Hasura! The graphql-engine server collects anonymized usage stats which allows us to keep improving Hasura at warp speed. To read more or opt-out, visit https://hasura.io/docs/latest/graphql/core/guides/telemetry.html"}}
2021-11-20T16:57:53.676771684Z app[web.1]: {"type":"startup","timestamp":"2021-11-20T16:57:52.674+0000","level":"info","detail":{"kind":"server","info":{"time_taken":0.244120087,"message":"starting API server"}}}

Commands used in preparing machine and process:

dokku apps:create company-core
dokku domains:add company-core company-core.assembled.app
dokku postgres:create company-core
dokku postgres:link company-core company-core
dokku config:get company-core DATABASE_URL 
dokku config:set company-core HASURA_GRAPHQL_ADMIN_SECRET='none' 
dokku letsencrypt:enable company-core

On local machine:

eagle:assemble grace$ g clone https://github.com/hasura/graphql-engine-herokuCloning into 'graphql-engine-heroku'...
remote: Enumerating objects: 405, done.
remote: Counting objects: 100% (42/42), done.
remote: Compressing objects: 100% (28/28), done.
remote: Total 405 (delta 22), reused 27 (delta 14), pack-reused 363
Receiving objects: 100% (405/405), 561.12 KiB | 1.24 MiB/s, done.
Resolving deltas: 100% (216/216), done.
eagle:assemble grace$ cd graphql-engine-heroku/
eagle:graphql-engine-heroku grace$ g r add boom [email protected]:company-core
eagle:graphql-engine-heroku grace$ g b
* master
eagle:graphql-engine-heroku grace$ g k boom master:main
Enumerating objects: 355, done.
Counting objects: 100% (355/355), done.
Delta compression using up to 4 threads
Compressing objects: 100% (162/162), done.
Writing objects: 100% (355/355), 554.67 KiB | 79.24 MiB/s, done.
Total 355 (delta 191), reused 355 (delta 191), pack-reused 0
remote: Resolving deltas: 100% (191/191), done.
-----> Cleaning up...
-----> Building company-core from Dockerfile
remote: build context to Docker daemon  585.2kB
Step 1/9 : FROM hasura/graphql-engine:v2.0.10
v2.0.10: Pulling from hasura/graphql-engine
Digest: sha256:2d9091956f33374627b141143cb5e8e9acf69592f4738cbecf8e60660d141a03
Status: Downloaded newer image for hasura/graphql-engine:v2.0.10
 ---> be3b181b603b
Step 2/9 : ENV HASURA_GRAPHQL_ENABLE_CONSOLE=true
 ---> Running in 6037069a0d4c
Removing intermediate container 6037069a0d4c
 ---> 4bdd2e9b685f
Step 3/9 : ENV HASURA_GRAPHQL_DEV_MODE=true
 ---> Running in d3a67f749e68
Removing intermediate container d3a67f749e68
 ---> 88c11983dcb8
Step 4/9 : ENV HASURA_GRAPHQL_PG_CONNECTIONS=15
 ---> Running in f87ff9c06820
Removing intermediate container f87ff9c06820
 ---> e8326edcf704
Step 5/9 : CMD graphql-engine     --database-url $DATABASE_URL     serve     --server-port $PORT
 ---> Running in 351634039fa0
Removing intermediate container 351634039fa0
 ---> da5dd4a3d9dd
Step 6/9 : LABEL com.dokku.app-name=company-core
 ---> Running in ee34c6c02e75
Removing intermediate container ee34c6c02e75
 ---> e1ab567e7bcd
Step 7/9 : LABEL dokku=
 ---> Running in a609153ba218
Removing intermediate container a609153ba218
 ---> f3a6d701c8e2
Step 8/9 : LABEL org.label-schema.schema-version=1.0
 ---> Running in 40734f4b1a58
Removing intermediate container 40734f4b1a58
 ---> 41bb41af0104
Step 9/9 : LABEL org.label-schema.vendor=dokku
 ---> Running in 8e08d90fd0d8
Removing intermediate container 8e08d90fd0d8
 ---> 8d351ad1ef76
Successfully built 8d351ad1ef76
Successfully tagged dokku/company-core:latest
-----> Releasing company-core...
-----> Checking for predeploy task
       No predeploy task found, skipping
-----> Checking for release task
       No release task found, skipping
-----> Checking for first deploy postdeploy task
       No first deploy postdeploy task found, skipping
-----> No Procfile found in app image
=====> Processing deployment checks
       No CHECKS file found. Simple container checks will be performed.
       For more efficient zero downtime deployments, create a CHECKS file. See https://dokku.com/docs/deployment/zero-downtime-deploys/ for examples
-----> Deploying company-core via the docker-local scheduler...
-----> Deploying web (count=1)
       Attempting pre-flight checks (web.1)
       Waiting for 10 seconds (web.1)
       Default container check successful (web.1)
-----> Running post-deploy
-----> Configuring company-core.assembled.app...(using built-in template)
-----> Creating http nginx.conf
       Reloading nginx
-----> Renaming containers
       Renaming container company-core.web.1.upcoming-16640 (e6c43f6ee68d) to company-core.web.1
-----> Checking for postdeploy task
       No postdeploy task found, skipping
-----> Updated schedule file
=====> Application deployed:
       http://company-core.assembled.app

To boom.assembled.app:company-core
 * [new branch]      master -> main
eagle:graphql-engine-heroku grace$ 

See also https://company-core.assembled.app, displaying error.

Error updating Hasura GraphQL engine on Heroku

I've followed the guide from the docs step by step, and ran git push heroku master. But now I'm getting an Application Error when trying to run my app:

image

This is what my logs look like.

2019-07-07T20:40:31.189138+00:00 heroku[web.1]: State changed from starting to crashed
2019-07-07T20:40:31.173620+00:00 heroku[web.1]: Process exited with status 1
2019-07-07T20:40:31.021574+00:00 app[web.1]: {"timestamp":"2019-07-07T20:40:31.021+0000","level":"info","type":"startup","detail":{"kind":"serve_options","info":{"enable_allowlist":false,"auth_hook_mode":null,"use_prepared_statements":true,"unauth_role":null,"stringify_numeric_types":false,"enable_telemetry":true,"enable_console":true,"auth_hook":null,"cors_config":{"allowed_origins":"*","disabled":false,"ws_read_cookie":null},"console_assets_dir":null,"admin_secret_set":true,"port":13719}}}
2019-07-07T20:40:31.115492+00:00 app[web.1]: {"internal":{"statement":"select\n  json_build_object(\n    'tables', tables.items,\n    'relations', relations.items,\n    'permissions', permissions.items,\n    'query_templates', query_templates.items,\n    'event_triggers', event_triggers.items,\n    'remote_schemas', remote_schemas.items,\n    'functions', functions.items,\n    'foreign_keys', foreign_keys.items,\n    'allowlist_collections', allowlist.item\n  )\nfrom\n  (\n    select\n      coalesce(json_agg(\n        json_build_object(\n          'table',\n          json_build_object(\n            'name', ht.table_name,\n            'schema', ht.table_schema\n          ),\n          'system_defined', ht.is_system_defined,\n          'info', tables.info\n        )\n      ), '[]') as items\n    from\n      hdb_catalog.hdb_table as ht\n      left outer join (\n        select\n          table_schema,\n          table_name,\n          json_build_object(\n            'name',\n            json_build_object(\n              'schema', table_schema,\n              'name', table_name\n            ),\n            'columns', columns,\n            'primary_key_columns', primary_key_columns,\n            'constraints', constraints,\n            'view_info', view_info\n          ) as info\n        from\n          hdb_catalog.hdb_table_info_agg\n      ) as tables on (\n        tables.table_schema = ht.table_schema\n        and tables.table_name = ht.table_name\n      )\n  ) as tables,\n  (\n    select\n      coalesce(\n        json_agg(\n          json_build_object(\n            'table',\n            json_build_object(\n              'schema', table_schema,\n              'name', table_name\n            ),\n            'rel_name', rel_name,\n            'rel_type', rel_type,\n            'def', rel_def :: json,\n            'comment', comment\n          )\n        ),\n        '[]'\n      ) as items\n    from\n      hdb_catalog.hdb_relationship\n  ) as relations,\n  (\n    select\n      coalesce(\n        json_agg(\n          json_build_object(\n            'table',\n            json_build_object(\n              'schema', table_schema,\n              'name', table_name\n            ),\n            'role', role_name,\n            'perm_type', perm_type,\n            'def', perm_def :: json,\n            'comment', comment\n          )\n        ),\n        '[]'\n      ) as items\n    from\n      hdb_catalog.hdb_permission\n  ) as permissions,\n  (\n    select\n      coalesce(\n        json_agg(\n          json_build_object(\n            'name', template_name,\n            'def', template_defn :: json\n          )\n        ),\n        '[]'\n      ) as items\n    from\n      hdb_catalog.hdb_query_template\n  ) as query_templates,\n  (\n    select\n      coalesce(\n        json_agg(\n          json_build_object(\n            'table',\n            json_build_object(\n              'schema', schema_name,\n              'name', table_name\n            ),\n            'name', name,\n            'def', configuration :: json\n          )\n        ),\n        '[]'\n      ) as items\n    from\n      hdb_catalog.event_triggers\n  ) as event_triggers,\n  (\n    select\n      coalesce(\n        json_agg(\n          json_build_object(\n            'name',\n            name,\n            'definition', definition :: json,\n            'comment', comment\n          )\n        ),\n        '[]'\n      ) as items\n    from\n      hdb_catalog.remote_schemas\n  ) as remote_schemas,\n  (\n    select\n      coalesce(json_agg(q.info), '[]') as items\n    from\n        (\n        select\n          json_build_object(\n            'function',\n            json_build_object(\n              'schema', hf.function_schema,\n              'name', hf.function_name\n            ),\n            'info', function_info\n          ) as info\n        from\n          hdb_catalog.hdb_function hf\n        left outer join\n            hdb_catalog.hdb_function_info_agg hf_agg on\n            ( hf_agg.function_name = hf.function_name\n              and hf_agg.function_schema = hf.function_schema\n            )\n      ) as q\n   ) as functions,\n  (\n    select\n      coalesce(json_agg(foreign_key.info), '[]') as items\n    from\n      (\n        select\n          json_build_object(\n            'table',\n            json_build_object(\n              'schema', f.table_schema,\n              'name', f.table_name\n            ),\n            'ref_table',\n            json_build_object(\n              'schema', f.ref_table_table_schema,\n              'name', f.ref_table\n            ),\n            'constraint', f.constraint_name,\n            'column_mapping', f.column_mapping\n          ) as info\n        from\n         hdb_catalog.hdb_foreign_key_constraint f\n         left outer join hdb_catalog.hdb_table ht\n         on ( ht.table_schema = f.table_schema\n              and ht.table_name = f.table_name\n            )\n      ) as foreign_key\n  ) as foreign_keys,\n  (\n    select\n      coalesce(json_agg(hqc.collection_defn), '[]') as item\n    from hdb_catalog.hdb_allowlist ha\n    left outer join\n         hdb_catalog.hdb_query_collection hqc\n         on (hqc.collection_name = ha.collection_name)\n  ) as allowlist\n","prepared":true,"error":{"exec_status":"FatalError","hint":null,"message":"relation \"hdb_catalog.hdb_table_info_agg\" does not exist","status_code":"42P01","description":null},"arguments":[]},"path":"$","error":"postgres query error","code":"unexpected"}

I'm not sure what to do next? Any help would be appreciated.

Deployment failing on Heroku

Hi,
I've just tried to deploy hasura on heroku, following the doc. The deployment is successful, but when I open the app, I get an application error.

"Application error

An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
heroku logs --tail "

Is the heroku deployment still maintained ?
Thanks

'no mutations exist' when using a valid role

I am stumped here. I recently moved from Hasura cloud to Heroku, and had some basic role-based stuff setup that I ported over. For some reason I now can never see any mutations in the root, for any role except 'admin', anyone know what's going on?

Queries/Subscriptions work fine, and changing permissions for select on a given table updates the GraphQL API fine for my 'user' role, but modifying insert/update/delete do not reveal any mutations in the root. This worked perfectly fine on Hasura cloud, and I don't know what I am doing wrong.

image

Error updating from version beta.3 to latest

Hello, I tried updating my Hasura database on Heroku from beta.3 to latest and I followed the instructions here: https://docs.hasura.io/1.0/graphql/manual/deployment/heroku/updating.html exactly. It built and then crashed and now I get an error on heroku

(Application error
An error occurred in the application and your page could not be served. If you are the application owner, check your logs for details. You can do this from the Heroku CLI with the command
heroku logs --tail)

Examining the logs, it appears to be complaining about "hasura_uuid" violating a not-null constraint.

2019-11-20T19:37:27.588060+00:00 heroku[web.1]: State changed from crashed to starting
2019-11-20T19:37:27.413452+00:00 app[web.1]: {"internal":{"statement":"\n INSERT INTO hdb_catalog.hdb_version (version, upgraded_on) VALUES ($1, $2)\n ON CONFLICT ((version IS NOT NULL))\n DO UPDATE SET version = $1, upgraded_on = $2\n ","prepared":false,"error":{"exec_status":"FatalError","hint":null,"message":"null value in column "hasura_uuid" violates not-null constraint","status_code":"23502","description":"Failing row contains (null, 27, 2019-11-20 19:37:27.151554+00, {}, {})."},"arguments":["(Oid 25,Just ("27",Binary))","(Oid 1184,Just ("\NUL\STX:\203\DC4R\155\194",Binary))"]},"path":"$","error":"postgres query error","code":"unexpected"}

Please let me know if you are aware of any fixes!

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.