mirror of
https://github.com/apache/superset.git
synced 2026-05-07 17:04:58 +00:00
chore: isolate examples database by default (#25003)
(cherry picked from commit 269c99293f)
This commit is contained in:
committed by
Michael S. Molina
parent
ea27cf13d3
commit
c2c5f232c8
15
docker/docker-entrypoint-initdb.d/examples-init.sh
Executable file
15
docker/docker-entrypoint-initdb.d/examples-init.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
# ------------------------------------------------------------------------
|
||||
# Creates the examples database and repective user. This database location
|
||||
# and access credentials are defined on the environment variables
|
||||
# ------------------------------------------------------------------------
|
||||
set -e
|
||||
|
||||
psql -v ON_ERROR_STOP=1 --username "${POSTGRES_USER}" <<-EOSQL
|
||||
CREATE USER ${EXAMPLES_USER} WITH PASSWORD '${EXAMPLES_PASSWORD}';
|
||||
CREATE DATABASE ${EXAMPLES_DB};
|
||||
GRANT ALL PRIVILEGES ON DATABASE ${EXAMPLES_DB} TO ${EXAMPLES_USER};
|
||||
EOSQL
|
||||
|
||||
psql -v ON_ERROR_STOP=1 --username "${POSTGRES_USER}" -d "${EXAMPLES_DB}" <<-EOSQL
|
||||
GRANT ALL ON SCHEMA public TO ${EXAMPLES_USER};
|
||||
EOSQL
|
||||
Reference in New Issue
Block a user