Skip to content

Commit

Permalink
Updates to packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
a-alle committed Jun 24, 2024
1 parent e7a0581 commit 5c05889
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .changeset/strong-days-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"hasura-ndc-neo4j": patch
---

Updates to connector packaging
21 changes: 10 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@

### To start the server:

1. Make sure there is a `configuration.json` file at the root level. The file should look like this:

```json
{
"neo4j_url": "neo4j://localhost:7687/neo4j",
"neo4j_user": "",
"neo4j_pass": ""
}
```
All commands will require some environment variables to connect to your Neo4j instance, for example:
NEO4J_URL=neo4j://localhost:7687/neo4j
NEO4J_USER=<user>
NEO4J_PASS=<password>

Remember to provide them when running the following commands.

#### Prerequisite: Set-up configuration file

The config property is optional and if not configured, the server will introspect the Neo4j DB in order to create the GraphQL operations.
To control the design of the GraphQL operations, the `config` property can be specified. An example can be found in the `__tests__/data/configuration.json` file.
Use the included CLI tool by running `npm run update:config`.
This will introspect your database and create the corresponding configuration file in the root directory, named `configuration.json`. The connector will use this file in running mode.

2. Run `npm install`

Expand Down
8 changes: 6 additions & 2 deletions connector-definition/connector-metadata.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
packagingDefinition:
type: PrebuiltDockerImage
dockerImage: ghcr.io/neo4j/ndc-connector-image:v0.0.1
dockerImage: ghcr.io/neo4j/hasura-ndc-neo4j:v0.0.6
supportedEnvironmentVariables:
- name: NEO4J_URL
description: The url for the Neo4j Database
Expand All @@ -9,7 +9,11 @@ supportedEnvironmentVariables:
- name: NEO4J_PASS
description: The password for the Neo4j Database
commands:
update: docker run --rm -e NEO4J_URL="$NEO4J_URL" -e NEO4J_USER="$NEO4J_USER" -e NEO4J_PASS="$NEO4J_PASS" -v "$HASURA_CONFIGURATION_DIRECTORY":/etc/connector ghcr.io/neo4j/ndc-connector-image:v0.0.1 update
update:
type: Dockerized
dockerImage: ghcr.io/neo4j/hasura-ndc-neo4j:v0.0.6
commandArgs:
- update
dockerComposeWatch:
- path: ./
target: /etc/connector
Expand Down

0 comments on commit 5c05889

Please sign in to comment.