Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/maven/fixes/8.0' into maven/rele…
Browse files Browse the repository at this point in the history
…ase/8.0
  • Loading branch information
metaventis-build committed Sep 29, 2023
2 parents 76ce5b9 + 839849e commit e4add5f
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions deploy/docker/compose/src/main/compose/2_connector-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ services:
ONLYOFFICE_DOCUMENT_SERVER: "${SERVICES_EDU_CONNECTOR_ONLYOFFICE_DOCUMENT_SERVER:-}"
ONLYOFFICE_PLUGIN_URL: "${SERVICES_EDU_CONNECTOR_ONLYOFFICE_PLUGIN_URL:-}"
ONLYOFFICE_JWT_SECRET: "${SERVICES_EDU_CONNECTOR_ONLYOFFICE_JWT_SECRET:-}"
UPLOAD_FILE_SIZE: "${SERVICES_EDU_CONNECTOR_UPLOAD_FILE_SIZE:-512M}"
POST_MAX_SIZE: "${SERVICES_EDU_CONNECTOR_POST_MAX_SIZE:-513M}"
MEMORY_LIMIT: "${SERVICES_EDU_CONNECTOR_MEMORY_LIMIT:-1024M}"
MOODLE_BASE_DIR: "${SERVICES_EDU_CONNECTOR_MOODLE_BASE_DIR:-}"
MOODLE_TOKEN: "${SERVICES_EDU_CONNECTOR_MOODLE_TOKEN:-}"
volumes:
Expand Down
6 changes: 6 additions & 0 deletions deploy/docker/helm/src/main/chart/templates/statefulset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ spec:
value: {{ .Values.moodleBaseDir | default "" }}
- name: MOODLE_TOKEN
value: {{ .Values.moodleToken | default "" }}
- name: UPLOAD_FILE_SIZE
value: {{ .Values.uploadFileSize | default "512M" }}
- name: POST_MAX_SIZE
value: {{ .Values.postMaxSize | default "513M" }}
- name: MEMORY_LIMIT
value: {{ .Values.memoryLimit | "1024M" }}
livenessProbe:
httpGet:
path: /metadata
Expand Down
3 changes: 2 additions & 1 deletion service/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ RUN set -eux \
&& adduser www-data appuser

RUN set -eux \
&& chown -R appuser:appuser /etc/apache2 $ROOT $DATA
&& chown -R appuser:appuser /etc/apache2 $ROOT $DATA \
&& chown -R appuser:appuser $PHP_INI_DIR

USER appuser

Expand Down
10 changes: 10 additions & 0 deletions service/src/main/docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ connector_database_name=${DATABASE_NAME//\/&/\\&}

# OPTIONALS

upload_max_filesize="${UPLOAD_FILE_SIZE:-512M}"
post_max_size="${POST_MAX_SIZE:-513M}"
memory_limit="${MEMORY_LIMIT:-1024M}"

only_office_document_server="${ONLYOFFICE_DOCUMENT_SERVER:-}"
only_office_plugin_url="${ONLYOFFICE_PLUGIN_URL:-}"
only_office_jwt_secret="${ONLYOFFICE_JWT_SECRET:-}"
Expand All @@ -32,6 +36,8 @@ moodle_base_dir="${MOODLE_BASE_DIR:-}"
# shellcheck disable=SC2153
moodle_token="${MOODLE_TOKEN:-}"

php_ini=$PHP_INI_DIR/php.ini

sed -i "s|define('WWWURL', '.*')|define('WWWURL', '${connector_url}')|g" "${conf}"
sed -i "s|define('DOCROOT', '.*')|define('DOCROOT', '${ROOT}')|g" "${conf}"
sed -i "s|define('DATA', '.*')|define('DATA', '${DATA}')|g" "${conf}"
Expand All @@ -43,6 +49,10 @@ sed -i "s|define('DBUSER', '.*')|define('DBUSER', '${connector_database_user}')|
sed -i "s|define('DBPASSWORD', '.*')|define('DBPASSWORD', '${connector_database_password}')|g" "${conf}"
sed -i "s|define('DBNAME', '.*')|define('DBNAME', '${connector_database_name}')|g" "${conf}"

sed -i -r "s|upload_max_filesize.*|upload_max_filesize = ${upload_max_filesize}|" "${php_ini}"
sed -i -r "s|post_max_size.*|post_max_size = ${post_max_size}|" "${php_ini}"
sed -i -r "s|memory_limit.*|memory_limit = ${memory_limit}|" "${php_ini}"

sed -i "s|define('ONLYOFFICE_DOCUMENT_SERVER', '.*')|define('ONLYOFFICE_DOCUMENT_SERVER', '${only_office_document_server}')|g" "${conf}"
sed -i "s|define('ONLYOFFICE_PLUGIN_URL', '.*')|define('ONLYOFFICE_PLUGIN_URL', '${only_office_plugin_url}')|g" "${conf}"
sed -i "s|define('ONLYOFFICE_JWT_SECRET', '.*')|define('ONLYOFFICE_JWT_SECRET', '${only_office_jwt_secret}')|g" "${conf}"
Expand Down

0 comments on commit e4add5f

Please sign in to comment.