{"id":20486315,"url":"https://github.com/undp-data/martin-docker","last_synced_at":"2026-05-27T20:31:46.224Z","repository":{"id":44867457,"uuid":"439374698","full_name":"UNDP-Data/martin-docker","owner":"UNDP-Data","description":"This is a Docker image of martin for geohub","archived":false,"fork":false,"pushed_at":"2022-10-27T12:53:55.000Z","size":21,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-05T16:41:01.081Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UNDP-Data.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}},"created_at":"2021-12-17T15:19:24.000Z","updated_at":"2024-02-27T10:58:52.000Z","dependencies_parsed_at":"2023-01-20T05:12:51.546Z","dependency_job_id":null,"html_url":"https://github.com/UNDP-Data/martin-docker","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/UNDP-Data/martin-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNDP-Data%2Fmartin-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNDP-Data%2Fmartin-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNDP-Data%2Fmartin-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNDP-Data%2Fmartin-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UNDP-Data","download_url":"https://codeload.github.com/UNDP-Data/martin-docker/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UNDP-Data%2Fmartin-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33583394,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-27T02:00:06.184Z","response_time":53,"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":"2024-11-15T16:36:00.954Z","updated_at":"2026-05-27T20:31:46.205Z","avatar_url":"https://github.com/UNDP-Data.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# martin-docker\n\nThis is a Docker image of martin for UNDP GeoHub. It features a reactive entrypoint, that is\nthe server can be updated in close to real time for a remote web accessible config file.\nAn empty basic [config](./config.yaml) file is provided.\n\n## Configuration\n\nmartin server can be run in two main modes. \n### 1. without configuration file\n\nIn this mode martin will use environmental variable $DATABASE_URL to connect to a PostGIS\ndatabase. Inirially this mode could use a variable called $WATCH which made the server reload its internal configuration\nin case the value of this was \u003cmark\u003e**true**.\u003c/mark\u003e This parameter seems to be now obsolete\n\nThe disadvantage of this mode is that martin will once scan the database and all table/fucntions sources will be published\n\n### 2. with configuration file\n\nIn this mode the server uses a configuration file that specifies what tables/functions are to be published\nBy default this is a static setup, which means the server has to be restarted if the config\nfile was updated.\n\nThis limitation was addressed and is handled using a reactive sh [entrypoint script](./reactive_entrypoint.sh)\nIn this setup, the entrypoint script operates in an infinite loop\nand its behavior is controlled by two environmental variables\n\n- `$REMOTE_CFG` - specifies the location of remote config file to be watched\n- `$SLEEP_SEC` -  specifies the interval in seconds when the script is going to pull the remote, has a defalt value\nof 900 seconds or 15 minutes\n\n\nconfiguration file, compare it with its local version and replace  the local with the remote in case\nthe size of the two config file has changed\n\nAlthough not very elegant, this setup ensures a smooth operation and minimum work required to\nupdate the user. The config file can be generated automatically using [martin-config](https://github.com/UNDP-Data/martin-config/tree/main/src/martin_config)\n\n\n\n\n\n## Run using locally build image\n\n```bash\n docker-compose  -f docker-compose-local.yml build\n docker-compose  -f docker-compose-local.yml up\n```\n\n\n## Run using remote image\n\n```bash\n docker-compose up\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fundp-data%2Fmartin-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fundp-data%2Fmartin-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fundp-data%2Fmartin-docker/lists"}