diff --git a/Dockerfile b/Dockerfile index 8bba423..24cb240 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,9 +60,8 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \ sed 's|\(application\/zip.*\)|\1\n application\/wasm wasm;|' -i /etc/nginx/mime.types && \ pg_conftool $PG_VERSION main set listen_addresses 'localhost' && \ service postgresql restart && \ - sudo -u postgres psql -c "CREATE DATABASE $ONLYOFFICE_VALUE;" && \ sudo -u postgres psql -c "CREATE USER $ONLYOFFICE_VALUE WITH password '$ONLYOFFICE_VALUE';" && \ - sudo -u postgres psql -c "GRANT ALL privileges ON DATABASE $ONLYOFFICE_VALUE TO $ONLYOFFICE_VALUE;" && \ + sudo -u postgres psql -c "CREATE DATABASE $ONLYOFFICE_VALUE OWNER $ONLYOFFICE_VALUE;" && \ service postgresql stop && \ service redis-server stop && \ service rabbitmq-server stop && \ diff --git a/run-document-server.sh b/run-document-server.sh index 91a96b5..1eb86e0 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -358,9 +358,8 @@ create_postgresql_cluster(){ } create_postgresql_db(){ - sudo -u postgres psql -c "CREATE DATABASE $DB_NAME;" sudo -u postgres psql -c "CREATE USER $DB_USER WITH password '"$DB_PWD"';" - sudo -u postgres psql -c "GRANT ALL privileges ON DATABASE $DB_NAME TO $DB_USER;" + sudo -u postgres psql -c "CREATE DATABASE $DB_NAME OWNER $DB_USER;" } create_db_tbl() {