Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Fix/move hasura into core" #81

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 54 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,57 @@ services:
context: .
dockerfile: ./Dockerfile
ports:
- 3000:3000
- 3000:3000
depends_on:
graphql-engine:
condition: service_healthy

graphql-engine:
image: hasura/graphql-engine:v2.40.3.cli-migrations-v3
volumes:
- ./hasura-metadata:/hasura-metadata
ports:
- 8090:8080
restart: always
environment:
## postgres database to store Hasura metadata
HASURA_GRAPHQL_DATABASE_URL: postgres://citrine:citrine@host.docker.internal:5432/citrine
## enable the console served by server
HASURA_GRAPHQL_ENABLE_CONSOLE: 'true' # set to "false" to disable console
## enable debugging mode. It is recommended to disable this in production
HASURA_GRAPHQL_DEV_MODE: 'true'
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_ENABLE_TELEMETRY: 'false'
## uncomment next line to run console offline (i.e load console assets from server instead of CDN)
# HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: /srv/console-assets
## uncomment next line to set an admin secret
# HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
HASURA_GRAPHQL_METADATA_DEFAULTS: '{"backend_configs":{"dataconnector":{"athena":{"uri":"http://data-connector-agent:8081/api/v1/athena"},"mariadb":{"uri":"http://data-connector-agent:8081/api/v1/mariadb"},"mysql8":{"uri":"http://data-connector-agent:8081/api/v1/mysql"},"oracle":{"uri":"http://data-connector-agent:8081/api/v1/oracle"},"snowflake":{"uri":"http://data-connector-agent:8081/api/v1/snowflake"}}}}'
depends_on:
data-connector-agent:
condition: service_healthy
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8080/healthz']
interval: 5s
timeout: 10s
retries: 5
start_period: 5s

data-connector-agent:
image: hasura/graphql-data-connector:v2.40.3
restart: always
ports:
- 8091:8081
environment:
QUARKUS_LOG_LEVEL: ERROR # FATAL, ERROR, WARN, INFO, DEBUG, TRACE
## https://quarkus.io/guides/opentelemetry#configuration-reference
QUARKUS_OPENTELEMETRY_ENABLED: 'false'
## QUARKUS_OPENTELEMETRY_TRACER_EXPORTER_OTLP_ENDPOINT: http://jaeger:4317
healthcheck:
test: ['CMD', 'curl', '-f', 'http://localhost:8081/api/v1/athena/health']
interval: 5s
timeout: 10s
retries: 5
start_period: 5s
volumes:
db_data:
Empty file added hasura-metadata/actions.graphql
Empty file.
6 changes: 6 additions & 0 deletions hasura-metadata/actions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
actions: []
custom_types:
enums: []
input_objects: []
objects: []
scalars: []
1 change: 1 addition & 0 deletions hasura-metadata/allow_list.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions hasura-metadata/api_limits.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions hasura-metadata/backend_configs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions hasura-metadata/cron_triggers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
table:
name: AdditionalInfos
schema: public
array_relationships:
- name: IdTokenAdditionalInfos
using:
foreign_key_constraint_on:
column: additionalInfoId
table:
name: IdTokenAdditionalInfos
schema: public
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
table:
name: AsyncJobStatuses
schema: public
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
table:
name: Authorizations
schema: public
object_relationships:
- name: IdToken
using:
foreign_key_constraint_on: idTokenId
- name: IdTokenInfo
using:
foreign_key_constraint_on: idTokenInfoId
- name: OcpiToken
using:
foreign_key_constraint_on:
column: authorization_id
table:
name: OcpiTokens
schema: public
11 changes: 11 additions & 0 deletions hasura-metadata/databases/citrine/tables/public_Boots.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
table:
name: Boots
schema: public
array_relationships:
- name: VariableAttributes
using:
foreign_key_constraint_on:
column: bootConfigId
table:
name: VariableAttributes
schema: public
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
table:
name: BusinessDetails
schema: public
object_relationships:
- name: ClientCredentialsRole
using:
foreign_key_constraint_on: clientCredentialsRoleId
- name: ServerCredentialsRole
using:
foreign_key_constraint_on: serverCredentialsRoleId
array_relationships:
- name: Images
using:
foreign_key_constraint_on:
column: businessDetailsId
table:
name: Images
schema: public
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
table:
name: CallMessages
schema: public
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
table:
name: Certificates
schema: public
10 changes: 10 additions & 0 deletions hasura-metadata/databases/citrine/tables/public_ChargingNeeds.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
table:
name: ChargingNeeds
schema: public
object_relationships:
- name: Evse
using:
foreign_key_constraint_on: evseDatabaseId
- name: Transaction
using:
foreign_key_constraint_on: transactionDatabaseId
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
table:
name: ChargingProfiles
schema: public
object_relationships:
- name: Transaction
using:
foreign_key_constraint_on: transactionDatabaseId
array_relationships:
- name: ChargingSchedules
using:
foreign_key_constraint_on:
column: chargingProfileDatabaseId
table:
name: ChargingSchedules
schema: public
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
table:
name: ChargingSchedules
schema: public
object_relationships:
- name: ChargingProfile
using:
foreign_key_constraint_on: chargingProfileDatabaseId
array_relationships:
- name: SalesTariffs
using:
foreign_key_constraint_on:
column: chargingScheduleDatabaseId
table:
name: SalesTariffs
schema: public
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
table:
name: ChargingStationSecurityInfos
schema: public
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
table:
name: ChargingStationSequences
schema: public
object_relationships:
- name: ChargingStation
using:
foreign_key_constraint_on: stationId
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
table:
name: ChargingStations
schema: public
object_relationships:
- name: Location
using:
foreign_key_constraint_on: locationId
array_relationships:
- name: ChargingStationSequences
using:
foreign_key_constraint_on:
column: stationId
table:
name: ChargingStationSequences
schema: public
- name: LatestStatusNotifications
using:
foreign_key_constraint_on:
column: stationId
table:
name: LatestStatusNotifications
schema: public
- name: StatusNotifications
using:
foreign_key_constraint_on:
column: stationId
table:
name: StatusNotifications
schema: public
- name: Transactions
using:
foreign_key_constraint_on:
column: stationId
table:
name: Transactions
schema: public
- name: VariableAttributes
using:
foreign_key_constraint_on:
column: stationId
table:
name: VariableAttributes
schema: public
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
table:
name: ClientCredentialsRoles
schema: public
object_relationships:
- name: ClientInformation
using:
foreign_key_constraint_on: clientInformationId
- name: CpoTenant
using:
foreign_key_constraint_on: cpoTenantId
array_relationships:
- name: BusinessDetails
using:
foreign_key_constraint_on:
column: clientCredentialsRoleId
table:
name: BusinessDetails
schema: public
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
table:
name: ClientInformations
schema: public
object_relationships:
- name: CpoTenant
using:
foreign_key_constraint_on: cpoTenantId
array_relationships:
- name: ClientCredentialsRoles
using:
foreign_key_constraint_on:
column: clientInformationId
table:
name: ClientCredentialsRoles
schema: public
- name: ClientVersions
using:
foreign_key_constraint_on:
column: clientInformationId
table:
name: ClientVersions
schema: public
- name: ServerVersions
using:
foreign_key_constraint_on:
column: clientInformationId
table:
name: ServerVersions
schema: public
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
table:
name: ClientVersions
schema: public
object_relationships:
- name: ClientInformation
using:
foreign_key_constraint_on: clientInformationId
array_relationships:
- name: Endpoints
using:
foreign_key_constraint_on:
column: clientVersionId
table:
name: Endpoints
schema: public
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
table:
name: ComponentVariables
schema: public
object_relationships:
- name: Component
using:
foreign_key_constraint_on: componentId
- name: Variable
using:
foreign_key_constraint_on: variableId
43 changes: 43 additions & 0 deletions hasura-metadata/databases/citrine/tables/public_Components.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
table:
name: Components
schema: public
object_relationships:
- name: Evse
using:
foreign_key_constraint_on: evseDatabaseId
array_relationships:
- name: ComponentVariables
using:
foreign_key_constraint_on:
column: componentId
table:
name: ComponentVariables
schema: public
- name: EventData
using:
foreign_key_constraint_on:
column: componentId
table:
name: EventData
schema: public
- name: MessageInfos
using:
foreign_key_constraint_on:
column: displayComponentId
table:
name: MessageInfos
schema: public
- name: VariableAttributes
using:
foreign_key_constraint_on:
column: componentId
table:
name: VariableAttributes
schema: public
- name: VariableMonitorings
using:
foreign_key_constraint_on:
column: componentId
table:
name: VariableMonitorings
schema: public
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
table:
name: CompositeSchedules
schema: public
25 changes: 25 additions & 0 deletions hasura-metadata/databases/citrine/tables/public_CpoTenants.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
table:
name: CpoTenants
schema: public
array_relationships:
- name: ClientCredentialsRoles
using:
foreign_key_constraint_on:
column: cpoTenantId
table:
name: ClientCredentialsRoles
schema: public
- name: ClientInformations
using:
foreign_key_constraint_on:
column: cpoTenantId
table:
name: ClientInformations
schema: public
- name: ServerCredentialsRoles
using:
foreign_key_constraint_on:
column: cpoTenantId
table:
name: ServerCredentialsRoles
schema: public
Loading