Skip to content

Structure of a Beacon Service YAML

version: v1 
name: beacon-service 
type: service 
service:
    # ...
    # ...
    # ... 
  stack: beacon+rest 
    envs:
    PGRST_OPENAPI_SERVER_PROXY_URI: https://${{dataos-context}}/${{path}}

# Beacon Stack-specific Section
  beacon:
    source: 
      type: database 
      name: retail01 
      workspace: public 
      topology: 
      - name: database 
        type: input
        doc: retail database connection
      - name: graphql-api
        type: output
        doc: serves up the retail database as a GraphQL API
        dependencies:
        - database

Environment Variables

PGRST_OPENAPI_SERVER_PROXY_URI

While creating a Beacon Service with a beacon+rest stack, you need to specify the environment variable PGRST_OPENAPI_SERVER_PROXY_URI given below:

envs:
  PGRST_OPENAPI_SERVER_PROXY_URI: https://${{dataos-context}}/${{database-path}}
# Replace the ${{dataos-context}} and ${{database-path}} with your DataOS Full Context Name and Postgres Datbase path respectively

Beacon Stack-specific Section

source

Description: the Source section contains attributes for the data source

Data Type Requirement Default Value Possible Value
mapping mandatory none none

Example Usage:

source:
  type: database
  name: retail01 
  workspace: public

type

Description: type of source

Data Type Requirement Default Value Possible Value
string mandatory none database

Example Usage:

type: database

name

Description: data source name

Data Type Requirement Default Value Possible Value
string mandatory none any string confirming the regex

Example Usage:

name: ordersumdb

workspace

Description: DataOS workspace where the source exists.

Data Type Requirement Default Value Possible Value
string mandatory public any available workspace within DataOS

Example Usage:

name: ordersumdb

topology

Description: topology refers to the physical or logical arrangement of the different components of a PostgreSQL system, such as inputs, outputs, etc.

Data Type Requirement Default Value Possible Value
list of mappings mandatory none none

Example Usage:

topology:
- name: database 
  type: input 
  doc: retail database connection 
- name: graphql-api 
  type: output 
  doc: serves up the retail database as a REST API 
  dependencies: 
  - database

name

Description: name of a particular topology.

Data Type Requirement Default Value Possible Value
string mandatory none any string

Example Usage:

name: database

type

Description: types of topology.

Data Type Requirement Default Value Possible Value
string mandatory none input/output

Example Usage:

type: input

doc

Description: this field is to document the steps done in this step

Data Type Requirement Default Value Possible Value
string optional none any string

Example Usage:

doc: serves up the retail database as a REST API 

dependencies

Description: this field is used to define the dependencies between steps.

Data Type Requirement Default Value Possible Value
string mandatory none valid name within the topology

Example Usage:

dependencies: 
  - database