-
Notifications
You must be signed in to change notification settings - Fork 0
/
pg_api.yml
80 lines (79 loc) · 3.29 KB
/
pg_api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
captainVersion: 4
services:
$$cap_appname-db:
image: postgres:$$cap_postgres_version
volumes:
- $$cap_appname-db-data:/var/lib/postgresql/data
restart: always
environment:
POSTGRES_USER: $$cap_pg_user
POSTGRES_PASSWORD: $$cap_pg_pass
POSTGRES_DB: $$cap_pg_db
POSTGRES_INITDB_ARGS: $$cap_pg_initdb_args
caproverExtra:
notExposeAsWebApp: 'true'
$$cap_appname-hasura:
image: hasura/graphql-engine:$$cap_hasura_version
depends_on:
- $$cap_appname-db
restart: always
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://$$cap_pg_user:$$cap_pg_pass@srv-captain--$$cap_appname-db:5432/$$cap_pg_db
HASURA_GRAPHQL_ENABLE_CONSOLE: 'true'
HASURA_GRAPHQL_ADMIN_SECRET: $$cap_admin_secret
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
caproverExtra:
containerHttpPort: '8080'
$$cap_appname-postgrest:
image: postgrest/postgrest
depends_on:
- $$cap_appname-db
restart: always
environment:
PGRST_DB_URI: postgres://$$cap_pg_user:$$cap_pg_pass@srv-captain--$$cap_appname-db:5432/$$cap_pg_db
PGRST_DB_SCHEMA: 'public'
PGRST_DB_ANON_ROLE: $$cap_pg_user
caproverExtra:
containerHttpPort: '3000'
caproverOneClickApp:
variables:
- defaultValue: v1.3.3
description: Check out their GitHub page for their latest version https://github.com/hasura/graphql-engine
id: $$cap_hasura_version
label: Hasura Version
validRegex: /^([^\s^\/])+$/
- defaultValue: '13'
id: $$cap_postgres_version
label: Postgres Version
validRegex: /^([^\s^\/])+$/
- description: The admin secret gives you access to the console.
id: $$cap_admin_secret
label: Hasura admin secret(password)
validRegex: /^(?=.*\d).{10,}$/
- defaultValue: 'postgres'
id: $$cap_pg_user
label: Postgres Username
description: ''
validRegex: /.{1,}/
- id: $$cap_pg_pass
label: Postgres Password
description: ''
validRegex: /.{1,}/
- defaultValue: 'postgres'
id: $$cap_pg_db
label: Postgres Default Database
description: ''
validRegex: /.{1,}/
- id: $$cap_pg_initdb_args
label: "OPTIONAL: Arguments for 'postgres initdb'"
description: For example, --data-checksums
validRegex: /.{0,}/
instructions:
end: >
Hasura is deployed and available as $$cap_appname-hasura. PostgREST is deployed and available as $$cap_appname-postgrest.
IMPORTANT: It will take up to 2 minutes for Hasura to be ready. Before that, you might see 502 error page.
start: Instant Realtime GraphQL and REST on Postgres with web admin console. This setup runs Hasura GraphQL Engine along with PostgREST on a Postgres database.
displayName: 'Hasura and PostgREST'
isOfficial: false
description: Instant realtime GraphQL and REST APIs on any Postgres application, existing or new
documentation: Hasura GraphQL Engine And PostGREST