Compare commits

...

5 Commits

3 changed files with 59 additions and 6 deletions

View File

@ -11,16 +11,56 @@ on:
release_number:
description: 'Sequence number of the release (ex. x.x.x.<number>)'
type: string
required: true
default: '1'
required: false
env:
COMPANY_NAME: "onlyoffice"
PRODUCT_NAME: "documentserver"
jobs:
build-info:
name: build-info
runs-on: ubuntu-latest
outputs:
release-number: ${{ steps.get-release.outputs.release-number }}
steps:
- name: Get release number
id: get-release
env:
RELEASE_NUMBER: "${{ github.event.inputs.release_number }}"
REGISTRY_URL: "https://hub.docker.com/v2/repositories"
TAG: "${{ github.event.inputs.tag }}"
run: |
if [ "${RELEASE_NUMBER}" != "" ]; then
echo "==================================================="
echo "ATTENTION: The release number was declared manualy."
echo "==================================================="
echo "release-number=${RELEASE_NUMBER}" >> "$GITHUB_OUTPUT"
else
echo "==================================================================================="
echo "The release number was not manually announced. Set release number by automaticaly.."
echo "==================================================================================="
# Get release number automaticaly. Release gets +1 from previous release
LAST_RELEASE=($(curl -s -H -X ${REGISTRY_URL}/${COMPANY_NAME}/${PRODUCT_NAME}/tags/?page_size=100 | \
jq -r '.results|.[]|.name' | grep -m 1 -Eo "${TAG%.*}.[0-9]{1,}" || true))
if [ -z "${LAST_RELEASE}" ]; then
echo "========================================="
echo "This is first release with this minor tag"
echo "========================================="
NEW_RELEASE="1"
else
LAST_RELEASE_NUMBER=${LAST_RELEASE#*.*.*.}
NEW_RELEASE=$((LAST_RELEASE_NUMBER+1))
fi
echo "release-number=${NEW_RELEASE}" >> "$GITHUB_OUTPUT"
fi
build:
name: "Release image: DocumentServer${{ matrix.edition }}"
needs: [build-info]
runs-on: ubuntu-latest
strategy:
fail-fast: false
@ -47,7 +87,7 @@ jobs:
run: |
set -eux
VERSION=${{ github.event.inputs.tag }}
RELEASE_NUMBER=${{ github.event.inputs.release_number }}
RELEASE_NUMBER=${{ needs.build-info.outputs.release-number }}
PRODUCT_EDITION=${{ matrix.edition }}
TESTING_IMAGE=${COMPANY_NAME}/4testing-${PRODUCT_NAME}${PRODUCT_EDITION}
export PRODUCT_EDITION
@ -63,7 +103,9 @@ jobs:
build-nonexample:
name: "Release image: DocumentServer${{ matrix.edition }}-nonExample"
runs-on: ubuntu-latest
needs: [build]
needs:
- build
- build-info
if: ${{ false }}
strategy:
fail-fast: false
@ -90,7 +132,7 @@ jobs:
run: |
set -eux
VERSION=${{ github.event.inputs.tag }}
RELEASE_NUMBER=${{ github.event.inputs.release_number }}
RELEASE_NUMBER=${{ needs.build-info.outputs.release-number }}
export PULL_TAG=${VERSION%.*}.${RELEASE_NUMBER}
export PRODUCT_EDITION=${{ matrix.edition }}
export TAG=${VERSION%.*}.${RELEASE_NUMBER}
@ -99,6 +141,7 @@ jobs:
build-ucs-ubuntu20:
name: "Release image: DocumentServer${{ matrix.edition }}-ucs"
needs: [build-info]
runs-on: ubuntu-latest
strategy:
fail-fast: false
@ -124,7 +167,7 @@ jobs:
run: |
set -eux
VERSION=${{ github.event.inputs.tag }}
RELEASE_NUMBER=${{ github.event.inputs.release_number }}
RELEASE_NUMBER=${{ needs.build-info.outputs.release-number }}
export PRODUCT_EDITION=${{ matrix.edition }}
export PACKAGE_BASEURL=${{ secrets.REPO_BASEURL }}
export DOCKERFILE=Dockerfile

View File

@ -196,6 +196,8 @@ Below is the complete list of parameters that can be set using environment varia
- **JWT_HEADER**: Defines the http header that will be used to send the JSON Web Token. Defaults to `Authorization`.
- **JWT_IN_BODY**: Specifies the enabling the token validation in the request body to the ONLYOFFICE Document Server. Defaults to `false`.
- **WOPI_ENABLED**: Specifies the enabling the wopi handlers. Defaults to `false`.
- **ALLOW_META_IP_ADDRESS**: Defines if it is allowed to connect meta IP address or not. Defaults to `false`.
- **ALLOW_PRIVATE_IP_ADDRESS**: Defines if it is allowed to connect private IP address or not. Defaults to `false`.
- **USE_UNAUTHORIZED_STORAGE**: Set to `true`if using selfsigned certificates for your storage server e.g. Nextcloud. Defaults to `false`
- **GENERATE_FONTS**: When 'true' regenerates fonts list and the fonts thumbnails etc. at each start. Defaults to `true`
- **METRICS_ENABLED**: Specifies the enabling StatsD for ONLYOFFICE Document Server. Defaults to `false`.

View File

@ -92,6 +92,8 @@ JWT_HEADER=${JWT_HEADER:-Authorization}
JWT_IN_BODY=${JWT_IN_BODY:-false}
WOPI_ENABLED=${WOPI_ENABLED:-false}
ALLOW_META_IP_ADDRESS=${ALLOW_META_IP_ADDRESS:-false}
ALLOW_PRIVATE_IP_ADDRESS=${ALLOW_PRIVATE_IP_ADDRESS:-false}
GENERATE_FONTS=${GENERATE_FONTS:-true}
@ -344,6 +346,12 @@ update_ds_settings(){
${JSON} -I -e "if(this.wopi===undefined)this.wopi={}"
${JSON} -I -e "this.wopi.enable = true"
fi
if [ "${ALLOW_META_IP_ADDRESS}" = "true" ] || [ "${ALLOW_PRIVATE_IP_ADDRESS}" = "true" ]; then
${JSON} -I -e "if(this.services.CoAuthoring['request-filtering-agent']===undefined)this.services.CoAuthoring['request-filtering-agent']={}"
[ "${ALLOW_META_IP_ADDRESS}" = "true" ] && ${JSON} -I -e "this.services.CoAuthoring['request-filtering-agent'].allowMetaIPAddress = true"
[ "${ALLOW_PRIVATE_IP_ADDRESS}" = "true" ] && ${JSON} -I -e "this.services.CoAuthoring['request-filtering-agent'].allowPrivateIPAddress = true"
fi
}
create_postgresql_cluster(){