Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions repo/packages/P/postgis/0/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
{
"type": "object",
"required": ["service", "postresql"],
"properties": {
"service": {
"type": "object",
"required": ["name", "cpu", "mem"],
"description": "Configuration properties for the postgis service for DC/OS.",
"properties": {
"name": {
"description": "The name of the service to display in the DC/OS dashboard.",
"type": "string",
"default": "postgis",
"x-form": {
"hidden": true
},
"x-generated": {
"type": "appID",
"scope": "postgis"
}
},
"cpus": {
"description": "CPU shares to allocate to this Postgis instance.",
"type": "number",
"default": 0.1,
"minimum": 0.1
},
"mem": {
"description": "Memory to allocate to this Postgis instance.",
"type": "number",
"default": 1024.0,
"minimum": 1024.0
}
}
},
"postresql": {
"type": "object",
"required": ["version", "username", "password"],
"description": "Postgres database configuration properties",
"properties": {
"version": {
"description": "Postgres major version",
"type": "string",
"enum": ["10.0-2.4"],
"default": "10.0-2.4"
},
"username": {
"description": "Postgres user name.",
"type": "string",
"default": "admin",
"x-form": {
"value": "{{user.idep}}"
}
},
"password": {
"description": "Postgres password.",
"type": "string",
"default": "changeme",
"x-form": {
"value": "{{user.password}}"
}
},
"dbname": {
"description": "Name for the default database that is created when the image is first started.",
"type": "string",
"default": "defaultdb"
},
"initdbargs": {
"description": "Arguments to send to postgres initdb. The value is a space separated string of arguments as postgres initdb would expect them.",
"type": "string"
},
"extensions": {
"description": "Extensions name to send to postgres initdb. The value is a comma separated string of arguments as postgis initdb would expect them.",
"type": "string",
"default": "postgis,hstore,postgis_topology,postgis_raster,pgrouting"
},
"uri": {
"description": "Sql files could be on an archive root",
"title": "Initialisation script Url",
"type": "string"
}
}
},
"networking": {
"description": "Networking-related configuration properties for pgAdmin on DC/OS.",
"type": "object",
"properties": {
"network-name": {
"description": "Name of the container network to use",
"type": "string",
"default": "dcos",
"x-form": {
"hidden": true
},
"x-generated": {
"type": "containerNetworkName",
"scope": "postgis"
}
},
"internal-host": {
"description": "The virtual host address to configure for integration with Marathon-lb.",
"type": "string",
"x-form": {
"hidden": true
},
"x-generated": {
"type": "internalDNS",
"scope": "postgis"
}
}
}
}
}
}
68 changes: 68 additions & 0 deletions repo/packages/P/postgis/0/marathon.json.mustache
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"id": "{{service.name}}",
"cpus": {{service.cpus}},
"mem": {{service.mem}},
"cmd": "{{#postgis.uri}}rm -rf /docker-entrypoint-initdb.d && ln -s $MESOS_SANDBOX /docker-entrypoint-initdb.d && {{/postgis.uri}}docker-entrypoint.sh postgres",
"instances": 1,
"env": {
"POSTGRES_USER": "{{postgis.username}}",
"POSTGRES_PASS": "{{postgis.password}}",
"POSTGRES_DBNAME": "{{postgis.dbname}}",
"POSTGRES_INITDB_ARGS": "{{postgis.initdbargs}}"
"POSTGRES_MULTIPLE_EXTENSIONS": "{{postgis.extensions}}"
},
"container": {
"type": "DOCKER",
"docker": {
"image": "{{resource.assets.container.docker.image}}:{{postgis.version}}",
"forcePullImage": true,
"portMappings":
[
{
"containerPort": 5432,
"hostPort": 0,
"protocol": "tcp",
"name": "postgresql"
}
]
}
},
"networks": [
{
"name": "{{networking.network-name}}",
"mode": "container"
}
],
"upgradeStrategy":
{
"maximumOverCapacity": 0,
"minimumHealthCapacity": 0
},
"healthChecks": [
{{#postgis.uri}}
{
"protocol": "MESOS_TCP",
"portIndex": 0,
"gracePeriodSeconds": 1800,
"intervalSeconds": 60,
"timeoutSeconds": 20,
"maxConsecutiveFailures": 3
}
{{/postgis.uri}}
],
"fetch": [
{{#postgis.uri}}
{
"uri": "{{postgis.uri}}",
"extract": true,
"executable": false,
"cache": false
}
{{/postgis.uri}}
],
"labels": {
"HAPROXY_0_ENABLED":"true",
"MARATHON_SINGLE_INSTANCE_APP": "true",
"ONYXIA_PRIVATE_ENDPOINT":"postgresql://{{networking.internal-host}}:5432"
}
}
22 changes: 22 additions & 0 deletions repo/packages/P/postgis/0/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"packagingVersion": "3.0",
"name": "postgis",
"version": "1.0",
"minDcosReleaseVersion": "1.8",
"scm": "https://github.com/postgis/docker-postgis",
"maintainer": "PostGIS Community",
"website": "https://registry.hub.docker.com/r/postgis/postgis/",
"framework": false,
"description": "PostGIS is a spatial database extender for PostgreSQL object-relational database. It adds support for geographic objects allowing location queries to be run in SQL. ",
"tags": [
"SQL",
"datascience",
"database",
"postgres"
],
"preInstallNotes": "Warning : data are not stored on this service. Use GIT to save your code.",
"postInstallNotes": "The account is your username and the password is your password for all services. You can get it inside Onyxia in your profil settings",
"postUninstallNotes": "PostGIS has been uninstalled.",
"selected": false,
"lastUpdated": 1585220308
}
14 changes: 14 additions & 0 deletions repo/packages/P/postgis/0/resource.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"images": {
"icon-small": "https://en.wikipedia.org/wiki/File:PostGIS_logo.png#/media/File:PostGIS_logo.png",
"icon-medium": "https://en.wikipedia.org/wiki/File:PostGIS_logo.png#/media/File:PostGIS_logo.png",
"icon-large": "https://en.wikipedia.org/wiki/File:PostGIS_logo.png#/media/File:PostGIS_logo.png"
},
"assets": {
"container": {
"docker": {
"image": "kartoza/postgis"
}
}
}
}