forked from switnet/quick-jibri-installer
make sure to set all necessary permissions for public table
This commit is contained in:
parent
79fc0de403
commit
ab5a180fd6
|
@ -86,13 +86,19 @@ sudo -u postgres psql <<DB
|
||||||
CREATE DATABASE ${ETHERPAD_DB_NAME};
|
CREATE DATABASE ${ETHERPAD_DB_NAME};
|
||||||
CREATE USER ${ETHERPAD_DB_USER} WITH ENCRYPTED PASSWORD '${ETHERPAD_DB_PASS}';
|
CREATE USER ${ETHERPAD_DB_USER} WITH ENCRYPTED PASSWORD '${ETHERPAD_DB_PASS}';
|
||||||
GRANT ALL PRIVILEGES ON DATABASE ${ETHERPAD_DB_NAME} TO ${ETHERPAD_DB_USER};
|
GRANT ALL PRIVILEGES ON DATABASE ${ETHERPAD_DB_NAME} TO ${ETHERPAD_DB_USER};
|
||||||
|
\c ${ETHERPAD_DB_NAME}
|
||||||
|
ALTER SCHEMA public OWNER TO ${ETHERPAD_DB_USER};
|
||||||
|
GRANT USAGE ON SCHEMA public TO ${ETHERPAD_DB_USER};
|
||||||
|
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO ${ETHERPAD_DB_USER};
|
||||||
|
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO ${ETHERPAD_DB_USER};
|
||||||
|
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO ${ETHERPAD_DB_USER};
|
||||||
DB
|
DB
|
||||||
|
|
||||||
# Check fot docker if not running then execute
|
# Check fot docker if not running then execute
|
||||||
if [ ! "$(docker ps -q -f name=etherpad)" ]; then
|
if [ ! "$(docker ps -q -f name=etherpad)" ]; then
|
||||||
if [ "$(docker ps -aq -f status=exited -f name=etherpad)" ]; then
|
if [ "$(docker ps -aq -f status=exited -f name=etherpad)" ]; then
|
||||||
# cleanup
|
# cleanup
|
||||||
docker rm etherpad
|
docker rm -f etherpad
|
||||||
fi
|
fi
|
||||||
# run your container
|
# run your container
|
||||||
docker run -d --restart always \
|
docker run -d --restart always \
|
||||||
|
|
Loading…
Reference in New Issue