-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Install postgis into another schema, note the public one #372
Comments
I'm not entirely sure I understand your issue,
Additionally, you might need to modify it to correctly use the 'CREATE EXTENSION' command as described here:
And this is the the contents of $ docker run -it --rm postgis/postgis:10-3.0 cat /docker-entrypoint-initdb.d/10_postgis.sh
#!/bin/sh
set -e
# Perform all actions as $POSTGRES_USER
export PGUSER="$POSTGRES_USER"
# Create the 'template_postgis' template db
"${psql[@]}" <<- 'EOSQL'
CREATE DATABASE template_postgis IS_TEMPLATE true;
EOSQL
# Load PostGIS into both template_database and $POSTGRES_DB
for DB in template_postgis "$POSTGRES_DB"; do
echo "Loading PostGIS extensions into $DB"
"${psql[@]}" --dbname="$DB" <<-'EOSQL'
CREATE EXTENSION IF NOT EXISTS postgis;
CREATE EXTENSION IF NOT EXISTS postgis_topology;
CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;
CREATE EXTENSION IF NOT EXISTS postgis_tiger_geocoder;
EOSQL
done |
Thanks for your replay :) |
In this image, the environment variables |
Hi,
In my production environment, postgis is installed into a schema called
postgis
. Now I'm using postgis/postgis:10-3.0 but by default this image install postgis into the public schema.Is there a way to make this schema controlled by a environment variable ?
The text was updated successfully, but these errors were encountered: