Compare commits

..

4 Commits

Author SHA1 Message Date
5e78f0bd25 Build: add functions that will cleanup native tags 2026-03-13 19:01:04 +03:00
f0577875d0 Merge branch hotfix/v9.3.1 into release/v9.4.0 2026-03-12 15:30:31 +00:00
852fc2a6ad fix Bug 80465 - Skip PostgreSQL probe for other DB types 2026-03-06 15:49:05 +03:00
69256014cc Fix: actualize damengdb stand
Bump database version to 8.1.3. Also disable build for documentserver image
2026-02-26 15:04:36 +03:00
4 changed files with 58 additions and 21 deletions

View File

@ -84,7 +84,7 @@ jobs:
build:
name: "Build ${{ matrix.image }}-${{ matrix.edition }}:${{ matrix.platform }}"
runs-on: ${{ matrix.runner }}
runs-on: ${{ (matrix.platform == 'arm64') && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
needs: prepare
strategy:
fail-fast: false
@ -92,11 +92,6 @@ jobs:
image: ["documentserver"]
edition: ${{ fromJSON(needs.prepare.outputs.editions) }}
platform: ${{ fromJSON(needs.prepare.outputs.platforms) }}
include:
- platform: amd64
runner: ubuntu-latest
- platform: arm64
runner: ubuntu-24.04-arm
steps:
- name: Checkout code
uses: actions/checkout@v4
@ -244,6 +239,8 @@ jobs:
EDITION: ${{ matrix.edition }}
BUILD_NUMBER: ${{ github.event.inputs.build }}
BRANCH_NAME: ${{ github.ref_name }}
DOCKER_PAT_USERNAME: ${{ secrets.DOCKER_PAT_USERNAME }}
DOCKER_PAT_ACCESS_TOKEN: ${{ secrets.DOCKER_PAT_ACCESS_TOKEN }}
run: |
case "${EDITION}" in
community)
@ -317,3 +314,37 @@ jobs:
fi
docker buildx imagetools create "${PUSH_TAGS[@]}" "${FROM_TAGS[@]}"
### ==>> Cleanup platform-specific tags ###
REPO="${COMPANY_NAME}/4testing-${PRODUCT_NAME}${PRODUCT_EDITION}"
echo "Getting Docker Hub token..."
TOKEN=$(curl -s -X POST "https://hub.docker.com/v2/users/login" \
-H "Content-Type: application/json" \
-d "{\"username\": \"${DOCKER_PAT_USERNAME}\", \"password\": \"${DOCKER_PAT_ACCESS_TOKEN}\"}" \
| jq -r .token)
if [ -z "${TOKEN}" ] || [ "${TOKEN}" = "null" ]; then
echo "ERROR: Failed to get Docker Hub token"
exit 1
fi
echo "Docker Hub token obtained successfully"
for IMG in "${FROM_TAGS[@]}"; do
PLATFORM_TAG="${IMG##*:}"
echo "Deleting tag: ${IMG}"
HTTP_STATUS=$(curl -s -o /tmp/delete_response.json -w "%{http_code}" -X DELETE \
-H "Authorization: JWT ${TOKEN}" \
"https://hub.docker.com/v2/repositories/${REPO}/tags/${PLATFORM_TAG}/")
echo "Response HTTP status: ${HTTP_STATUS}"
echo "Response body: $(cat /tmp/delete_response.json)"
if [ "${HTTP_STATUS}" = "204" ]; then
echo "Successfully deleted: ${IMG}"
else
echo "WARNING: Unexpected status ${HTTP_STATUS} when deleting ${IMG}"
fi
done

View File

@ -784,10 +784,12 @@ for i in ${LOCAL_SERVICES[@]}; do
service $i start
done
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
if [ "${DB_TYPE}" = "postgres" ]; 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
fi
if [ ${ONLYOFFICE_DATA_CONTAINER} != "true" ]; then

View File

@ -1,7 +1,7 @@
FROM onlyoffice/damengdb:8.1.2 as damengdb
FROM onlyoffice/damengdb:8.1.3 as damengdb
ARG DM8_USER="SYSDBA"
ARG DM8_PASS="SYSDBA001"
ARG DM8_PASS="SYSDBA_dm001"
ARG DB_HOST="localhost"
ARG DB_PORT="5236"
ARG DISQL_BIN="/opt/dmdbms/bin"
@ -15,7 +15,7 @@ function wait_dm_ready() {
cd /opt/dmdbms/bin
for i in `seq 1 10`; do
echo `./disql /nolog <<EOF
CONN SYSDBA/SYSDBA001@localhost
CONN SYSDBA/SYSDBA_dm001@localhost
exit
EOF` | grep "connection failure" > /dev/null 2>&1
if [ $? -eq 0 ]; then
@ -41,14 +41,20 @@ GRANT ALL PRIVILEGES ON sysdba.TASK_RESULT TO onlyoffice;
EOF
ADD https://raw.githubusercontent.com/ONLYOFFICE/server/master/schema/dameng/createdb.sql /schema/dameng/createdb.sql
ARG OO_DB_USER="onlyoffice"
ARG OO_DB_PASS="Onlyoffice_2026"
RUN bash /opt/startup.sh > /dev/null 2>&1 \
& mkdir -p /schema/damengdb \
&& apt update -y ; apt install wget -y \
&& wget https://raw.githubusercontent.com/ONLYOFFICE/server/master/schema/dameng/createdb.sql -P /schema/dameng/ \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get update \
&& rm -rf /var/lib/apt/lists/* \
&& bash ./wait_dm_ready.sh \
&& cd ${DISQL_BIN} \
&& ./disql $DM8_USER/$DM8_PASS@$DB_HOST:$DB_PORT -e \
"create user "onlyoffice" identified by "onlyoffice" password_policy 0;" \
"create user \"${OO_DB_USER}\" identified by \"${OO_DB_PASS}\";" \
&& ./disql $DM8_USER/$DM8_PASS@$DB_HOST:$DB_PORT -e \
"GRANT SELECT ON DBA_TAB_COLUMNS TO onlyoffice;" \
&& echo "EXIT" | tee -a /schema/dameng/createdb.sql \

View File

@ -1,10 +1,7 @@
version: '2'
services:
onlyoffice-documentserver:
build:
context: ../../.
dockerfile: Dockerfile
target: documentserver
image: onlyoffice/documentserver-ee:latest
container_name: onlyoffice-documentserver
depends_on:
- onlyoffice-dameng
@ -15,6 +12,7 @@ services:
- DB_PORT=5236
- DB_NAME=onlyoffice
- DB_USER=onlyoffice
- DB_PWD=Onlyoffice_2026
- AMQP_URI=amqp://guest:guest@onlyoffice-rabbitmq
# Costomize the JSON Web Token validation parameters if needed.
#- JWT_ENABLED=false
@ -49,7 +47,7 @@ services:
target: damengdb
args:
DM8_USER: SYSDBA
DM8_PASS: SYSDBA001
DM8_PASS: SYSDBA_dm001
DB_HOST: localhost
DB_PORT: 5236
environment: