Create hasura.json (#36)
This is my first time working with a docker-compose file, but this seems to work fine. Original file taken from https://github.com/hasura/graphql-engine/tree/master/install-manifests/docker-compose-postgis this version has Postgis included
This commit is contained in:
parent
81ec480f93
commit
e8af7d8c95
|
|
@ -0,0 +1,57 @@
|
||||||
|
{
|
||||||
|
"captainVersion": "1",
|
||||||
|
"documentation": "Hasura GraphQL Engine",
|
||||||
|
"dockerCompose": {
|
||||||
|
"version": "3.6",
|
||||||
|
"services": {
|
||||||
|
"$$cap_appname-db": {
|
||||||
|
"image": "mdillon/postgis:$$cap_mdillon_postgis_version",
|
||||||
|
"notExposeAsWebApp": "true",
|
||||||
|
"volumes": [
|
||||||
|
"$$cap_appname-db-data:/var/lib/postgresql/data"
|
||||||
|
],
|
||||||
|
"restart": "always"
|
||||||
|
},
|
||||||
|
"$$cap_appname": {
|
||||||
|
"image": "hasura/graphql-engine:$$cap_hasura_version",
|
||||||
|
"containerHttpPort":"8080",
|
||||||
|
"depends_on": [
|
||||||
|
"$$cap_appname-db"
|
||||||
|
],
|
||||||
|
"restart": "always",
|
||||||
|
"environment": {
|
||||||
|
"HASURA_GRAPHQL_DATABASE_URL": "postgres://postgres:@srv-captain--$$cap_appname-db:5432/postgres",
|
||||||
|
"HASURA_GRAPHQL_ENABLE_CONSOLE": "true",
|
||||||
|
"HASURA_GRAPHQL_ADMIN_SECRET":"$$cap_admin_secret"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"instructions":{
|
||||||
|
"end":"Hasura is deployed and available as $$cap_appname. \n\n IMPORTANT: It will take up to 2 minutes for Hasura to be ready. Before that, you might see 502 error page.\n",
|
||||||
|
"start":"Instant Realtime GraphQL on Postgres with web admin cosole. This Docker Compose setup runs Hasura GraphQL Engine along with a Postgres database with the PostGIS extension."
|
||||||
|
},
|
||||||
|
"variables":[
|
||||||
|
{
|
||||||
|
"defaultValue":"v1.0.0-alpha40",
|
||||||
|
"description":"Checkout their github page for their latest version https://github.com/hasura/graphql-engine",
|
||||||
|
"id":"$$cap_hasura_version",
|
||||||
|
"label":"Hasura Version",
|
||||||
|
"validRegex":"/^([^\\s^\\/])+$/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"defaultValue":"11",
|
||||||
|
"description":"mdillon/postgis provides a Docker container running Postgres with PostGIS installed. Checkout their docker page for their available tags https://hub.docker.com/r/mdillon/postgis/tags",
|
||||||
|
"id":"$$cap_mdillon_postgis_version",
|
||||||
|
"label":"mdillon/postgis 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,}$/"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue