X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/2da3ce6abfab55aa14f8fae4ae97abd5cf8a94ba..033c3b28b3b2708634f3015449d0c2ed222e26d6:/docker/postgres/openstreetmap-postgres-init.sh diff --git a/docker/postgres/openstreetmap-postgres-init.sh b/docker/postgres/openstreetmap-postgres-init.sh index d8c619d45..3973311c1 100755 --- a/docker/postgres/openstreetmap-postgres-init.sh +++ b/docker/postgres/openstreetmap-postgres-init.sh @@ -3,9 +3,12 @@ set -ex # Create 'openstreetmap' user psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" <<-EOSQL - CREATE USER openstreetmap PASSWORD 'openstreetmap'; + CREATE USER openstreetmap SUPERUSER PASSWORD 'openstreetmap'; GRANT ALL PRIVILEGES ON DATABASE openstreetmap TO openstreetmap; EOSQL # Create btree_gist extensions psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -c "CREATE EXTENSION btree_gist" openstreetmap + +# Define custom functions +psql -v ON_ERROR_STOP=1 -U "$POSTGRES_USER" -f "/usr/local/sbin/osm-db-functions.sql" openstreetmap