name: API
description: Tembo Stack with REST and graphQL interfaces.
image: "quay.io/tembo/standard-cnpg:15.3.0-1-1096aeb"
stack_version: 0.1.0
appServices:
- image: postgrest/postgrest:v12.0.0
name: http
resources:
requests:
cpu: 100m
memory: 256Mi
limits:
cpu: 400m
memory: 256Mi
routing:
- port: 3000
ingressPath: /rest/v1
middlewares:
- rest-headers
- strip-path-prefix
- port: 3000
ingressPath: /graphql/v1
middlewares:
- gql-headers
- map-gql
middlewares:
- !customRequestHeaders
name: rest-headers
config:
Authorization: ""
- !customRequestHeaders
name: gql-headers
config:
Authorization: ""
Content-Profile: graphql
Accept-Profile: graphql
- !stripPrefix
name: strip-path-prefix
config:
- /rest/v1
- !replacePathRegex
name: map-gql
config:
regex: '\/graphql\/v1\/?'
replacement: /rpc/resolve
env:
- name: PGRST_DB_URI
valueFromPlatform: ReadWriteConnection
- name: PGRST_DB_SCHEMA
value: "public, graphql"
- name: PGRST_DB_ANON_ROLE
value: postgres
trunk_installs:
- name: pg_graphql
version: 1.4.1
extensions:
- name: pg_graphql
locations:
- database: postgres
enabled: true
version: 1.4.1
compute_templates:
- cpu: 0.25
memory: 1Gi
instance_class: GeneralPurpose
- cpu: 0.5
memory: 2Gi
instance_class: GeneralPurpose
- cpu: 1
memory: 4Gi
instance_class: GeneralPurpose
- cpu: 2
memory: 8Gi
instance_class: GeneralPurpose
- cpu: 4
memory: 16Gi
instance_class: GeneralPurpose
- cpu: 8
memory: 32Gi
instance_class: GeneralPurpose
- cpu: 0.5
memory: 1Gi
instance_class: ComputeOptimized
- cpu: 1
memory: 2Gi
instance_class: ComputeOptimized
- cpu: 2
memory: 4Gi
instance_class: ComputeOptimized
- cpu: 4
memory: 8Gi
instance_class: ComputeOptimized
- cpu: 8
memory: 16Gi
instance_class: ComputeOptimized
- cpu: 0.5
memory: 4Gi
instance_class: MemoryOptimized
- cpu: 1
memory: 8Gi
instance_class: MemoryOptimized
- cpu: 2
memory: 16Gi
instance_class: MemoryOptimized
- cpu: 4
memory: 32Gi
instance_class: MemoryOptimized
postgres_config_engine: standard
postgres_config:
- name: autovacuum_vacuum_cost_limit
value: -1
- name: autovacuum_vacuum_scale_factor
value: 0.05
- name: autovacuum_vacuum_insert_scale_factor
value: 0.05
- name: autovacuum_analyze_scale_factor
value: 0.05
- name: checkpoint_timeout
value: 10min
- name: track_activity_query_size
value: 2048
- name: wal_compression
value: 'on'
- name: track_io_timing
value: 'on'
- name: log_min_duration_statement value: 1000
- name: pg_stat_statements.track
value: all
- name: shared_preload_libraries
value: pg_stat_statements