diff --git a/Dockerfile b/Dockerfile index e5d89d8..d251e74 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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 && \ diff --git a/run-document-server.sh b/run-document-server.sh index 9a4d174..5883e27 100644 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -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}'" } @@ -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