File tree 3 files changed +16
-1
lines changed
3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,17 @@ docker run --name postgresql -itd \
200
200
sameersbn/postgresql:9.4-11
201
201
```
202
202
203
+ Additionally, creation of PostGIS topology extension can be enabled by specifying ` DB_POSTGIS_TOPOLOGY=true ` :
204
+
205
+
206
+ ``` bash
207
+ docker run --name postgresql -itd \
208
+ --env ' DB_NAME=dbname' --env ' DB_POSTGIS=true' --env DB_POSTGIS_TOPOLOGY=true \
209
+ sameersbn/postgresql:9.4-11
210
+ ```
211
+
212
+ Note that topology extension creation can be enabled only when PostGIS extension is enabled.
213
+
203
214
* By default the PostGIS extension is disabled*
204
215
205
216
## Granting user access to a database
Original file line number Diff line number Diff line change @@ -20,3 +20,4 @@ DB_TEMPLATE=${DB_TEMPLATE:-template1}
20
20
21
21
DB_UNACCENT=${DB_UNACCENT:- false}
22
22
DB_POSTGIS=${DB_POSTGIS:- false}
23
+ DB_POSTGIS_TOPOLOGY=${DB_POSTGIS_TOPOLOGY:- false}
Original file line number Diff line number Diff line change @@ -326,7 +326,10 @@ create_database() {
326
326
if [[ ${DB_POSTGIS} == true ]]; then
327
327
echo " ‣ Loading PostGIS extension..."
328
328
psql -U ${PG_USER} -d ${database} -c " CREATE EXTENSION IF NOT EXISTS postgis;" > /dev/null 2>&1
329
- psql -U ${PG_USER} -d ${database} -c " CREATE EXTENSION IF NOT EXISTS postgis_topology;" > /dev/null 2>&1
329
+ if [[ ${DB_POSTGIS_TOPOLOGY} == true ]]; then
330
+ echo " ‣ Loading PostGIS Topology extension..."
331
+ psql -U ${PG_USER} -d ${database} -c " CREATE EXTENSION IF NOT EXISTS postgis_topology;" > /dev/null 2>&1
332
+ fi
330
333
fi
331
334
332
335
if [[ -n ${DB_USER} ]]; then
You can’t perform that action at this time.
0 commit comments