Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
67 lines (60 sloc) 1.98 KB
<html>
<head>
<title>PostGIS | Ebean ORM</title>
<meta name="layout" content="_layout2/base-docs.html"/>
<meta name="bread1" content="Database platforms" href="/docs/database"/>
<meta name="bread2" content="Postgres" href="/docs/database/postgres"/>
<meta name="bread3" content="PostGIS" href="/docs/database/postgres/postgis"/>
<#assign n0_docs="active">
<#assign n1_platforms="active">
<#assign n2_postgres="active">
<#assign postgis="active">
</head>
<body>
<h2 id="postgis">PostGIS</h2>
<p>
Below is a test setup using the <code>mdillon/postgis</code> docker container that
has PostGIS extension installed.
</p>
<p>
This will automatically download and run the container making live a little easier.
Note the use of the Postgis specfic driver and url.
</p>
```yml
ebean:
geometrySRID: 4674 # If we don't want the default geometrySRID of 4326
test:
shutdown: none # stop | remove | none
platform: postgis
ddlMode: dropCreate # none | dropCreate | migrations | create
dbName: my_gisapp
```
<p>
The above <code>postgis</code> platform is equivalent to the setup below which uses:
</p>
<table class="compact w100">
<tr><th>username:</th><td>{databaseName}</td></tr>
<tr><th>password:</th><td>test</td></tr>
<tr><th>port:</th><td>7432</td></tr>
<tr><th>url:</th><td>jdbc:postgresql_lwgis://localhost:{port}/{databaseName}</td></tr>
<tr><th>driver:</th><td>org.postgis.DriverWrapperLW</td></tr>
<tr><th>image:</th><td>mdillon/postgis:{version}</td></tr>
</table>
```yml
ebean:
geometrySRID: 4674
test:
shutdown: none # stop | remove | none
platform: postgres
ddlMode: dropCreate # none | dropCreate | migrations | create
dbName: my_gisapp
postgres:
containerName: postgis
image: mdillon/postgis
extensions: postgis
url: jdbc:postgresql_lwgis://127.0.0.1:7432/my_gisapp
driver: org.postgis.DriverWrapperLW
```
<@next_edit "MySql" "/docs/database/mysql" "/docs/database/postgres/postgis.html"/>
</body>
</html>
You can’t perform that action at this time.