Skip to content

Commit

Permalink
Fix Bug #63238 - Fix re-copying of configuration files in supervisor (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
IskandarKurbonov authored Jul 13, 2023
1 parent 9400eed commit c413936
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
service nginx stop && \
rm -rf /var/lib/apt/lists/*

COPY config /app/ds/setup/config/
COPY config/supervisor/supervisor /etc/init.d/
COPY config/supervisor/ds/*.conf /etc/supervisor/conf.d/
COPY run-document-server.sh /app/ds/run-document-server.sh

EXPOSE 80 443
Expand All @@ -89,6 +90,8 @@ RUN PACKAGE_FILE="${COMPANY_NAME}-${PRODUCT_NAME}${PRODUCT_EDITION}${PACKAGE_VER
service postgresql start && \
apt-get -yq install /tmp/$PACKAGE_FILE && \
service postgresql stop && \
chmod 755 /etc/init.d/supervisor && \
sed "s/COMPANY_NAME/${COMPANY_NAME}/g" -i /etc/supervisor/conf.d/*.conf && \
service supervisor stop && \
chmod 755 /app/ds/*.sh && \
rm -f /tmp/$PACKAGE_FILE && \
Expand Down
10 changes: 1 addition & 9 deletions run-document-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -499,13 +499,6 @@ update_nginx_settings(){
documentserver-update-securelink.sh -s ${SECURE_LINK_SECRET:-$(pwgen -s 20)} -r false
}

update_supervisor_settings(){
# Copy modified supervisor start script
cp ${SYSCONF_TEMPLATES_DIR}/supervisor/supervisor /etc/init.d/
sed "s/COMPANY_NAME/${COMPANY_NAME}/g" -i ${SYSCONF_TEMPLATES_DIR}/supervisor/ds/*.conf
cp ${SYSCONF_TEMPLATES_DIR}/supervisor/ds/*.conf /etc/supervisor/conf.d/
}

update_log_settings(){
${JSON_LOG} -I -e "this.categories.default.level = '${DS_LOG_LEVEL}'"
}
Expand Down Expand Up @@ -631,8 +624,7 @@ if [ ${ONLYOFFICE_DATA_CONTAINER} != "true" ]; then
fi

update_nginx_settings

update_supervisor_settings

service supervisor start

# start cron to enable log rotating
Expand Down

0 comments on commit c413936

Please sign in to comment.