Compare commits

..

7 Commits

Author SHA1 Message Date
ff37878672 Add Claude review workflow 2026-03-27 15:22:48 +02:00
8c1e968f76 Prevent service autostart during package installation 2026-03-27 14:52:57 +03:00
6b00510896 fix: pin rabbitmq-server to 3.12.1-1ubuntu1.2 2026-03-27 11:10:58 +03:00
bb23a2e13f fix Bug 80692 - Remove leftover Oracle zip archives 2026-03-20 10:25:31 +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
6 changed files with 114 additions and 22 deletions

View File

@ -0,0 +1,23 @@
name: Claude Code Review
on:
pull_request:
types: [opened, synchronize]
branches: [master, develop, 'hotfix/**', 'release/**']
jobs:
claude-review:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: ONLYOFFICE/DocSpace-buildtools/.gitea/actions/claude-review@develop
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
gitea_token: ${{ secrets.GITEA_TOKEN }}

66
CLAUDE.md Normal file
View File

@ -0,0 +1,66 @@
## Project Overview
ONLYOFFICE Docker-DocumentServer — single-container Docker image for ONLYOFFICE Docs with all services (docservice, converter, nginx, PostgreSQL, Redis, RabbitMQ) managed by Supervisor.
## Tech Stack
Docker, Docker BuildX, Bash, Nginx, Supervisor, PostgreSQL/MySQL/MariaDB/MSSQL/Oracle, Redis, RabbitMQ/ActiveMQ
## Project Structure
```
Dockerfile — Main image (Ubuntu 24.04 base)
production.dockerfile — Stable/release image builder
docker-compose.yml — Local dev (documentserver + postgres + rabbitmq)
docker-bake.hcl — BuildX multi-platform config
Makefile — Build system (image, deploy, clean targets)
run-document-server.sh — Main entrypoint script (842 lines)
config/supervisor/ds/ — Supervisor service configs (ds, ds-adminpanel, ds-converter, ds-docservice, ds-example, ds-metrics)
config/supervisor/supervisor — Shell script for supervisord startup
tests/ — Integration tests (DB/AMQP/SSL matrix)
fonts/ — Custom fonts directory
oracle/ — Oracle SQLPlus wrapper
```
## Build & Run
```bash
# Build with Makefile
make image PRODUCT_VERSION=9.2.0 BUILD_NUMBER=1
# Build with Docker
docker build -t onlyoffice/documentserver .
# Run
docker run -i -t -d -p 80:80 onlyoffice/documentserver
# Docker Compose (with postgres + rabbitmq)
docker-compose up -d
# Run tests
cd tests && ./test.sh
```
## Key Patterns
- Single-container architecture: all services in one image via Supervisor
- Three editions: Community, Enterprise (-ee), Developer (-de)
- `run-document-server.sh` handles all configuration, DB init, service startup
- Multi-arch support: amd64, arm64
- Multiple database backends via DB_TYPE environment variable
- SSL/TLS with Let's Encrypt integration (Certbot)
- Non-root execution possible
## Review Focus
**Security**: JWT validation, SSL/TLS config, credential handling in entrypoint
**Shell**: `run-document-server.sh` is critical — quoting, error handling, DB initialization logic
**Docker**: Image size, layer count, base image updates
**Supervisor**: Service configs, process dependencies, restart policies
**Config**: Default ports, exposed services, database connection strings
## Git Workflow
- **Main branch**: `master`
- **Integration branch**: `develop`
- **Branch naming**: `feature/*`, `bugfix/*`, `hotfix/*`, `release/*`

View File

@ -24,7 +24,7 @@ ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=nonint
ARG ONLYOFFICE_VALUE=onlyoffice
COPY fonts/ /usr/share/fonts/truetype/
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
RUN echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d && \
apt-get -y update && \
apt-get -yq install wget apt-transport-https gnupg locales lsb-release && \
wget -q -O /etc/apt/sources.list.d/mssql-release.list "https://packages.microsoft.com/config/ubuntu/$BASE_VERSION/prod.list" && \
@ -64,7 +64,7 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
postgresql \
postgresql-client \
pwgen \
rabbitmq-server \
rabbitmq-server=3.12.1-1ubuntu1.2 \
redis-server \
sudo \
supervisor \
@ -81,20 +81,17 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
sed -i "s/bind .*/bind 127.0.0.1/g" /etc/redis/redis.conf && \
sed 's|\(application\/zip.*\)|\1\n application\/wasm wasm;|' -i /etc/nginx/mime.types && \
pg_conftool $PG_VERSION main set listen_addresses 'localhost' && \
service postgresql restart && \
service postgresql start && \
sudo -u postgres psql -c "CREATE USER $ONLYOFFICE_VALUE WITH password '$ONLYOFFICE_VALUE';" && \
sudo -u postgres psql -c "CREATE DATABASE $ONLYOFFICE_VALUE OWNER $ONLYOFFICE_VALUE;" && \
wget -O basic.zip ${OC_DOWNLOAD_URL}/instantclient-basic-linux.$(dpkg --print-architecture | sed 's/amd64/x64/')-${OC_FILE_SUFFIX}.zip && \
wget -O sqlplus.zip ${OC_DOWNLOAD_URL}/instantclient-sqlplus-linux.$(dpkg --print-architecture | sed 's/amd64/x64/')-${OC_FILE_SUFFIX}.zip && \
unzip -o basic.zip -d /usr/share && \
unzip -o sqlplus.zip -d /usr/share && \
rm -f basic.zip sqlplus.zip && \
mv /usr/share/instantclient_${OC_VER_DIR} /usr/share/instantclient && \
find /usr/lib /lib -name "libaio.so.1$PACKAGE_SUFFIX" -exec bash -c 'ln -sf "$0" "$(dirname "$0")/libaio.so.1"' {} \; && \
service postgresql stop && \
service redis-server stop && \
service rabbitmq-server stop && \
service supervisor stop && \
service nginx stop && \
rm -rf /var/lib/apt/lists/*
COPY config/supervisor/supervisor /etc/init.d/

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: