{"id":24835764,"url":"https://github.com/tobilg/postgrest-dcos","last_synced_at":"2025-10-14T10:30:30.151Z","repository":{"id":86825944,"uuid":"86309948","full_name":"tobilg/postgrest-dcos","owner":"tobilg","description":"A Docker image for running https://github.com/begriffs/postgrest on DC/OS","archived":true,"fork":false,"pushed_at":"2017-03-27T13:27:29.000Z","size":17,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T03:41:32.141Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tobilg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-27T08:26:02.000Z","updated_at":"2023-07-04T10:43:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"1176468b-51c6-4662-ad2f-68915ee99137","html_url":"https://github.com/tobilg/postgrest-dcos","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/tobilg/postgrest-dcos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fpostgrest-dcos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fpostgrest-dcos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fpostgrest-dcos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fpostgrest-dcos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobilg","download_url":"https://codeload.github.com/tobilg/postgrest-dcos/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fpostgrest-dcos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018780,"owners_count":26086452,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-31T04:51:42.092Z","updated_at":"2025-10-14T10:30:30.146Z","avatar_url":"https://github.com/tobilg.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postgrest-dcos\nA Docker image for running https://github.com/begriffs/postgrest on DC/OS\n\n## Configuration\nThe `postgrest` instance can be configured using environment variables:\n\n* `POSTGRES_URL`: The hostname or ip address of the Postgres instance, concatenated by a `:` and the port on which the instance is running. Default is `postgresql.marathon.l4lb.thisdcos.directory:5432`. (**mandatory**)\n* `POSTGRES_DATABASE`: The name of the database to use. (**mandatory**)\n* `POSTGRES_SCHEMA`: The name of the schema to use. (**mandatory**)\n* `POSTGRES_USER`: The name of the Postgres user. (**mandatory**)\n* `POSTGRES_PASSWORD`: The Postgres user's password. (**mandatory**)\n* `POSTGRES_TIMEOUT_SECONDS`: The timeout for which `dockerize` checks the availability of the Postgres service at the `POSTGRES_URL`. Default is `120 seconds.\n* `POSTGREST_JWT_SECRET`: The JWT secret used to connect to `postgrest`. By default, a random 32 character string will be generated if nothing is provided. \n* `POSTGREST_DB_MAX_ROWS`: The number of rows that a query can return at maximum. Default is `1000`.\n* `POSTGREST_DB_POOL_SIZE`: The number of connections which are used for connection pooling. Default is `5`.\n* `POSTGREST_ANON_ROLE`: The default anon database role. Default is `app_user`. \n\n## Running\nYou can run `postgrest` by using the following Marathon app definition:\n\n```javascript\n{\n  \"id\": \"postgrest\",\n  \"cpus\": 0.5,\n  \"mem\": 1024.0,\n  \"instances\": 1,\n  \"container\": {\n    \"type\": \"DOCKER\",\n    \"docker\": {\n      \"image\": \"tobilg/postgrest-dcos:latest\",\n      \"network\": \"HOST\",\n      \"forcePullImage\": true\n    }\n  },\n  \"env\": {\n    \"POSTGRES_USER\": \"marathon\",\n    \"POSTGRES_PASSWORD\": \"test123\",\n    \"POSTGRES_DATABASE\": \"marathon-build\",\n    \"POSTGRES_SCHEMA\": \"postgrest-test\",\n    \"POSTGREST_ANON_ROLE\": \"marathon\"\n  },\n  \"labels\": {\n    \"HAPROXY_GROUP\": \"external\",\n    \"HAPROXY_0_VHOST\": \"YOUR_EXTERNAL_LB_HOSTNAME\",\n    \"HAPROXY_0_PATH\": \"/postgrest\",\n    \"HAPROXY_0_HTTP_BACKEND_PROXYPASS_PATH\": \"/postgrest\"\n  },\n  \"portDefinitions\": [\n    {\n      \"port\": 0,\n      \"protocol\": \"tcp\",\n      \"name\": \"http\",\n      \"labels\": {\n        \"VIP_0\": \"postgrest:80\"\n      }\n    }\n  ],\n  \"requirePorts\": false,\n  \"healthChecks\": [\n    {\n      \"protocol\": \"HTTP\",\n      \"portIndex\": 0,\n      \"path\": \"/postgrest\",\n      \"gracePeriodSeconds\": 5,\n      \"intervalSeconds\": 20,\n      \"maxConsecutiveFailures\": 3\n    }\n  ]\n}\n```\n\nThe `postgrest` service will then be available at `postgrest.marathon.l4lb.thisdcos.directory:80` inside the DC/OS cluster. The above example will expose the service via `marathon-lb`, make sure to change the `HAPROXY_0_VHOST` to your external loadbalancer. \n\n## Authentication\n\nMake sure you configure your Postgres database as described in the [postgrest docs](https://postgrest.com/en/v0.4/auth.html). Also make sure to configure the correct `POSTGREST_ANON_ROLE` role. **Otherwise the public will have read/write access!** \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobilg%2Fpostgrest-dcos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobilg%2Fpostgrest-dcos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobilg%2Fpostgrest-dcos/lists"}