mirror of
https://github.com/ONLYOFFICE/Docker-DocumentServer.git
synced 2026-02-10 20:45:40 +08:00
fix Bug 77433 - Fix duplicate tables in public when using DB_SCHEMA
This commit is contained in:
committed by
Alexey Golubev
parent
92936a7971
commit
818573b9ba
@ -121,6 +121,8 @@ RUN PACKAGE_FILE="${COMPANY_NAME}-${PRODUCT_NAME}${PRODUCT_EDITION}${PACKAGE_VER
|
||||
apt-get -y update && \
|
||||
service postgresql start && \
|
||||
apt-get -yq install /tmp/$PACKAGE_FILE && \
|
||||
PGPASSWORD=$ONLYOFFICE_VALUE dropdb -h localhost -p 5432 -U $ONLYOFFICE_VALUE $ONLYOFFICE_VALUE && \
|
||||
sudo -u postgres psql -c "DROP ROLE onlyoffice;" && \
|
||||
service postgresql stop && \
|
||||
chmod 755 /etc/init.d/supervisor && \
|
||||
sed "s/COMPANY_NAME/${COMPANY_NAME}/g" -i /etc/supervisor/conf.d/*.conf && \
|
||||
|
||||
@ -772,7 +772,8 @@ for i in ${LOCAL_SERVICES[@]}; do
|
||||
service $i start
|
||||
done
|
||||
|
||||
if [ ${PG_NEW_CLUSTER} = "true" ]; then
|
||||
PG_DB_EXISTS=$(PGPASSWORD="$DB_PWD" psql -h ${DB_HOST} -p${DB_PORT} -U "${DB_USER}" -tAc "SELECT 1 FROM pg_database WHERE datname='${DB_NAME}';" 2>/dev/null)
|
||||
if [ ${PG_NEW_CLUSTER} = "true" ] || [ "${PG_DB_EXISTS}" != "1" ]; then
|
||||
create_postgresql_db
|
||||
create_postgresql_tbl
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user