Compare commits
23 commits
master
...
feature/da
Author | SHA1 | Date | |
---|---|---|---|
9a526077ad | |||
cf1527e859 | |||
840e8e1ccf | |||
66b56e4be8 | |||
5d07a93187 | |||
4c7516119b | |||
7b5649bb24 | |||
2c8184bcda | |||
908d70bcee | |||
eb643e3adb | |||
19debc5181 | |||
b59175d13f | |||
574b3c92b4 | |||
47503e6c98 | |||
452dd4996d | |||
6c0c7085c9 | |||
784ecca724 | |||
7b7e9bc66a | |||
3d7ac29ee1 | |||
bd4908d7c8 | |||
8a4525cb80 | |||
73ec78a7da | |||
46cd6febae |
10
.github/workflows/4testing-build.yml
vendored
10
.github/workflows/4testing-build.yml
vendored
|
@ -115,18 +115,18 @@ jobs:
|
||||||
|
|
||||||
BRANCH_NAME=${GITHUB_REF#refs/heads/}
|
BRANCH_NAME=${GITHUB_REF#refs/heads/}
|
||||||
if [ $BRANCH_NAME = develop ]; then
|
if [ $BRANCH_NAME = develop ]; then
|
||||||
RELEASE_BRANCH=unstable
|
BUILD_CHANNEL=nightly
|
||||||
PRODUCT_VERSION=99.99.99
|
PRODUCT_VERSION=99.99.99
|
||||||
elif [[ $BRANCH_NAME =~ hotfix || $BRANCH_NAME =~ release ]]; then
|
elif [[ $BRANCH_NAME =~ hotfix || $BRANCH_NAME =~ release ]]; then
|
||||||
RELEASE_BRANCH=testing
|
BUILD_CHANNEL=test
|
||||||
PRODUCT_VERSION=${BRANCH_NAME#*/v}
|
PRODUCT_VERSION=${BRANCH_NAME#*/v}
|
||||||
fi
|
fi
|
||||||
BUILD_NUMBER=${{ github.event.inputs.build }}
|
BUILD_NUMBER=${{ github.event.inputs.build }}
|
||||||
|
|
||||||
export PRODUCT_EDITION
|
export PRODUCT_EDITION
|
||||||
export PACKAGE_VERSION=${PRODUCT_VERSION}-${BUILD_NUMBER}
|
export PACKAGE_VERSION=${PRODUCT_VERSION}-${BUILD_NUMBER}~stretch
|
||||||
export PACKAGE_BASEURL=${{ secrets.REPO_BASEURL_OLD }}/${RELEASE_BRANCH}/ubuntu
|
export PACKAGE_BASEURL=${{ secrets.REPO_BASEURL }}/${BUILD_CHANNEL}
|
||||||
export RELEASE_BRANCH
|
export BUILD_CHANNEL
|
||||||
export PLATFORM
|
export PLATFORM
|
||||||
export DOCKERFILE=Dockerfile
|
export DOCKERFILE=Dockerfile
|
||||||
export PREFIX_NAME=4testing-
|
export PREFIX_NAME=4testing-
|
||||||
|
|
|
@ -11,14 +11,13 @@ ARG ONLYOFFICE_VALUE=onlyoffice
|
||||||
|
|
||||||
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
||||||
apt-get -y update && \
|
apt-get -y update && \
|
||||||
apt-get -yq install wget apt-transport-https gnupg locales lsb-release && \
|
apt-get -yq install wget apt-transport-https gnupg locales && \
|
||||||
mkdir -p $HOME/.gnupg && \
|
mkdir -p $HOME/.gnupg && \
|
||||||
gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/onlyoffice.gpg --keyserver keyserver.ubuntu.com --recv-keys 0x8320ca65cb2de8e5 && \
|
gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/onlyoffice.gpg --keyserver keyserver.ubuntu.com --recv-keys 0x8320ca65cb2de8e5 && \
|
||||||
chmod 644 /etc/apt/trusted.gpg.d/onlyoffice.gpg && \
|
chmod 644 /etc/apt/trusted.gpg.d/onlyoffice.gpg && \
|
||||||
locale-gen en_US.UTF-8 && \
|
locale-gen en_US.UTF-8 && \
|
||||||
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \
|
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \
|
||||||
wget -O - https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.deb.sh | bash && \
|
wget -O - https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/script.deb.sh | bash && \
|
||||||
if [ $(lsb_release -cs) = focal ]; then RABBITMQ_VERSION=3.8.11-1; else RABBITMQ_VERSION=3.10 ; fi && \
|
|
||||||
apt-get -yq install \
|
apt-get -yq install \
|
||||||
adduser \
|
adduser \
|
||||||
apt-utils \
|
apt-utils \
|
||||||
|
@ -47,7 +46,7 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
||||||
postgresql \
|
postgresql \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
pwgen \
|
pwgen \
|
||||||
rabbitmq-server=${RABBITMQ_VERSION}* \
|
rabbitmq-server=3.10* \
|
||||||
redis-server \
|
redis-server \
|
||||||
software-properties-common \
|
software-properties-common \
|
||||||
sudo \
|
sudo \
|
||||||
|
@ -86,7 +85,8 @@ ARG PACKAGE_BASEURL="http://download.onlyoffice.com/install/documentserver/linux
|
||||||
|
|
||||||
ENV COMPANY_NAME=$COMPANY_NAME \
|
ENV COMPANY_NAME=$COMPANY_NAME \
|
||||||
PRODUCT_NAME=$PRODUCT_NAME \
|
PRODUCT_NAME=$PRODUCT_NAME \
|
||||||
PRODUCT_EDITION=$PRODUCT_EDITION
|
PRODUCT_EDITION=$PRODUCT_EDITION \
|
||||||
|
DS_DOCKER_INSTALLATION=true
|
||||||
|
|
||||||
RUN PACKAGE_FILE="${COMPANY_NAME}-${PRODUCT_NAME}${PRODUCT_EDITION}${PACKAGE_VERSION:+_$PACKAGE_VERSION}_${TARGETARCH:-$(dpkg --print-architecture)}.deb" && \
|
RUN PACKAGE_FILE="${COMPANY_NAME}-${PRODUCT_NAME}${PRODUCT_EDITION}${PACKAGE_VERSION:+_$PACKAGE_VERSION}_${TARGETARCH:-$(dpkg --print-architecture)}.deb" && \
|
||||||
wget -q -P /tmp "$PACKAGE_BASEURL/$PACKAGE_FILE" && \
|
wget -q -P /tmp "$PACKAGE_BASEURL/$PACKAGE_FILE" && \
|
||||||
|
|
19
Makefile
19
Makefile
|
@ -4,28 +4,29 @@ PRODUCT_NAME ?= DocumentServer
|
||||||
PRODUCT_EDITION ?=
|
PRODUCT_EDITION ?=
|
||||||
PRODUCT_VERSION ?= 0.0.0
|
PRODUCT_VERSION ?= 0.0.0
|
||||||
BUILD_NUMBER ?= 0
|
BUILD_NUMBER ?= 0
|
||||||
|
BUILD_CHANNEL ?= nightly
|
||||||
ONLYOFFICE_VALUE ?= onlyoffice
|
ONLYOFFICE_VALUE ?= onlyoffice
|
||||||
S3_BUCKET ?= repo-doc-onlyoffice-com
|
S3_BUCKET ?= repo-doc-onlyoffice-com
|
||||||
RELEASE_BRANCH ?= unstable
|
S3_REGION ?= eu-west-1
|
||||||
|
|
||||||
COMPANY_NAME_LOW = $(shell echo $(COMPANY_NAME) | tr A-Z a-z)
|
COMPANY_NAME_LOW = $(shell echo $(COMPANY_NAME) | tr A-Z a-z)
|
||||||
PRODUCT_NAME_LOW = $(shell echo $(PRODUCT_NAME) | tr A-Z a-z)
|
PRODUCT_NAME_LOW = $(shell echo $(PRODUCT_NAME) | tr A-Z a-z)
|
||||||
COMPANY_NAME_LOW_ESCAPED = $(subst -,,$(COMPANY_NAME_LOW))
|
COMPANY_NAME_LOW_ESCAPED = $(subst -,,$(COMPANY_NAME_LOW))
|
||||||
|
|
||||||
PACKAGE_NAME := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW)$(PRODUCT_EDITION)
|
PACKAGE_NAME := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW)$(PRODUCT_EDITION)
|
||||||
PACKAGE_VERSION := $(PRODUCT_VERSION)-$(BUILD_NUMBER)
|
PACKAGE_VERSION := $(PRODUCT_VERSION)-$(BUILD_NUMBER)~stretch
|
||||||
PACKAGE_BASEURL := https://s3.eu-west-1.amazonaws.com/$(S3_BUCKET)/$(COMPANY_NAME_LOW)/$(RELEASE_BRANCH)/ubuntu
|
PACKAGE_BASEURL := https://s3.$(S3_REGION).amazonaws.com/$(S3_BUCKET)/server/linux/debian/$(BUILD_CHANNEL)
|
||||||
|
|
||||||
ifeq ($(RELEASE_BRANCH),$(filter $(RELEASE_BRANCH),unstable testing))
|
ifeq ($(BUILD_CHANNEL),$(filter $(BUILD_CHANNEL),nightly test))
|
||||||
DOCKER_TAG := $(subst -,.,$(PACKAGE_VERSION))
|
DOCKER_TAG := $(PRODUCT_VERSION).$(BUILD_NUMBER)
|
||||||
else
|
else
|
||||||
DOCKER_TAG := $(subst -,.,$(PACKAGE_VERSION))-$(subst /,-,$(GIT_BRANCH))
|
DOCKER_TAG := $(PRODUCT_VERSION).$(BUILD_NUMBER)-$(subst /,-,$(GIT_BRANCH))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
DOCKER_IMAGE := $(subst -,,$(COMPANY_NAME_LOW))/4testing-$(PRODUCT_NAME_LOW)$(PRODUCT_EDITION)
|
DOCKER_IMAGE := $(subst -,,$(COMPANY_NAME_LOW))/4testing-$(PRODUCT_NAME_LOW)$(PRODUCT_EDITION)
|
||||||
DOCKER_DUMMY := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW)$(PRODUCT_EDITION)__$(DOCKER_TAG).dummy
|
DOCKER_DUMMY := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW)$(PRODUCT_EDITION)__$(DOCKER_TAG).dummy
|
||||||
DOCKER_ARCH := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW)_$(PACKAGE_VERSION).tar.gz
|
DOCKER_ARCH := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW)_$(DOCKER_TAG).tar.gz
|
||||||
DOCKER_ARCH_URI := $(COMPANY_NAME_LOW)/$(RELEASE_BRANCH)/docker/$(notdir $(DOCKER_ARCH))
|
DOCKER_ARCH_URI := server/linux/docker/$(BUILD_CHANNEL)/$(notdir $(DOCKER_ARCH))
|
||||||
|
|
||||||
.PHONY: all clean clean-docker image deploy docker publish
|
.PHONY: all clean clean-docker image deploy docker publish
|
||||||
|
|
||||||
|
@ -61,7 +62,7 @@ deploy: $(DOCKER_DUMMY)
|
||||||
for i in {1..3}; do \
|
for i in {1..3}; do \
|
||||||
docker push $(DOCKER_IMAGE):$(DOCKER_TAG) && break || sleep 1m; \
|
docker push $(DOCKER_IMAGE):$(DOCKER_TAG) && break || sleep 1m; \
|
||||||
done
|
done
|
||||||
ifeq ($(RELEASE_BRANCH),unstable)
|
ifeq ($(BUILD_CHANNEL),nightly)
|
||||||
docker tag $(DOCKER_IMAGE):$(DOCKER_TAG) $(DOCKER_IMAGE):latest
|
docker tag $(DOCKER_IMAGE):$(DOCKER_TAG) $(DOCKER_IMAGE):latest
|
||||||
for i in {1..3}; do \
|
for i in {1..3}; do \
|
||||||
docker push $(DOCKER_IMAGE):latest && break || sleep 1m; \
|
docker push $(DOCKER_IMAGE):latest && break || sleep 1m; \
|
||||||
|
|
|
@ -191,8 +191,8 @@ Below is the complete list of parameters that can be set using environment varia
|
||||||
- **NGINX_WORKER_PROCESSES**: Defines the number of nginx worker processes.
|
- **NGINX_WORKER_PROCESSES**: Defines the number of nginx worker processes.
|
||||||
- **NGINX_WORKER_CONNECTIONS**: Sets the maximum number of simultaneous connections that can be opened by a nginx worker process.
|
- **NGINX_WORKER_CONNECTIONS**: Sets the maximum number of simultaneous connections that can be opened by a nginx worker process.
|
||||||
- **SECURE_LINK_SECRET**: Defines secret for the nginx config directive [secure_link_md5](http://nginx.org/ru/docs/http/ngx_http_secure_link_module.html#secure_link_md5). Defaults to `random string`.
|
- **SECURE_LINK_SECRET**: Defines secret for the nginx config directive [secure_link_md5](http://nginx.org/ru/docs/http/ngx_http_secure_link_module.html#secure_link_md5). Defaults to `random string`.
|
||||||
- **JWT_ENABLED**: Specifies the enabling the JSON Web Token validation by the ONLYOFFICE Document Server. Defaults to `true`.
|
- **JWT_ENABLED**: Specifies the enabling the JSON Web Token validation by the ONLYOFFICE Document Server. Defaults to `false`.
|
||||||
- **JWT_SECRET**: Defines the secret key to validate the JSON Web Token in the request to the ONLYOFFICE Document Server. Defaults to random value.
|
- **JWT_SECRET**: Defines the secret key to validate the JSON Web Token in the request to the ONLYOFFICE Document Server. Defaults to `secret`.
|
||||||
- **JWT_HEADER**: Defines the http header that will be used to send the JSON Web Token. Defaults to `Authorization`.
|
- **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`.
|
- **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`.
|
- **WOPI_ENABLED**: Specifies the enabling the wopi handlers. Defaults to `false`.
|
||||||
|
|
13
config/supervisor/ds/ds-converter.conf
Normal file
13
config/supervisor/ds/ds-converter.conf
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[program:converter]
|
||||||
|
command=/var/www/COMPANY_NAME/documentserver/server/FileConverter/converter
|
||||||
|
directory=/var/www/COMPANY_NAME/documentserver/server/FileConverter
|
||||||
|
user=ds
|
||||||
|
environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/COMPANY_NAME/documentserver,NODE_DISABLE_COLORS=1,APPLICATION_NAME=COMPANY_NAME
|
||||||
|
stdout_logfile=/var/log/COMPANY_NAME/documentserver/converter/out.log
|
||||||
|
stdout_logfile_backups=0
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/var/log/COMPANY_NAME/documentserver/converter/err.log
|
||||||
|
stderr_logfile_backups=0
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
13
config/supervisor/ds/ds-docservice.conf
Normal file
13
config/supervisor/ds/ds-docservice.conf
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[program:docservice]
|
||||||
|
command=/var/www/COMPANY_NAME/documentserver/server/DocService/docservice
|
||||||
|
directory=/var/www/COMPANY_NAME/documentserver/server/DocService
|
||||||
|
user=ds
|
||||||
|
environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/COMPANY_NAME/documentserver,NODE_DISABLE_COLORS=1
|
||||||
|
stdout_logfile=/var/log/COMPANY_NAME/documentserver/docservice/out.log
|
||||||
|
stdout_logfile_backups=0
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/var/log/COMPANY_NAME/documentserver/docservice/err.log
|
||||||
|
stderr_logfile_backups=0
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
14
config/supervisor/ds/ds-example.conf
Normal file
14
config/supervisor/ds/ds-example.conf
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[program:example]
|
||||||
|
command=/var/www/COMPANY_NAME/documentserver-example/example
|
||||||
|
directory=/var/www/COMPANY_NAME/documentserver-example/
|
||||||
|
user=ds
|
||||||
|
environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/COMPANY_NAME/documentserver-example,NODE_DISABLE_COLORS=1
|
||||||
|
stdout_logfile=/var/log/COMPANY_NAME/documentserver-example/out.log
|
||||||
|
stdout_logfile_backups=0
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/var/log/COMPANY_NAME/documentserver-example/err.log
|
||||||
|
stderr_logfile_backups=0
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
autostart=false
|
||||||
|
autorestart=true
|
||||||
|
redirect_stderr=true
|
13
config/supervisor/ds/ds-metrics.conf
Normal file
13
config/supervisor/ds/ds-metrics.conf
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[program:metrics]
|
||||||
|
command=/var/www/COMPANY_NAME/documentserver/server/Metrics/metrics ./config/config.js
|
||||||
|
directory=/var/www/COMPANY_NAME/documentserver/server/Metrics
|
||||||
|
user=ds
|
||||||
|
environment=NODE_DISABLE_COLORS=1
|
||||||
|
stdout_logfile=/var/log/COMPANY_NAME/documentserver/metrics/out.log
|
||||||
|
stdout_logfile_backups=0
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/var/log/COMPANY_NAME/documentserver/metrics/err.log
|
||||||
|
stderr_logfile_backups=0
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
autostart=true
|
||||||
|
autorestart=true
|
2
config/supervisor/ds/ds.conf
Normal file
2
config/supervisor/ds/ds.conf
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
[group:ds]
|
||||||
|
programs=docservice,converter,metrics,example
|
|
@ -46,7 +46,7 @@ variable "PACKAGE_FILE" {
|
||||||
default = ""
|
default = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "RELEASE_BRANCH" {
|
variable "BUILD_CHANNEL" {
|
||||||
default = ""
|
default = ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ target "documentserver" {
|
||||||
dockerfile = "${DOCKERFILE}"
|
dockerfile = "${DOCKERFILE}"
|
||||||
tags = [
|
tags = [
|
||||||
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}",
|
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}",
|
||||||
equal("unstable",RELEASE_BRANCH) ? "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:latest": "",
|
equal("nightly",BUILD_CHANNEL) ? "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:latest": "",
|
||||||
]
|
]
|
||||||
platforms = ["${PLATFORM}"]
|
platforms = ["${PLATFORM}"]
|
||||||
args = {
|
args = {
|
||||||
|
|
|
@ -149,6 +149,9 @@ read_setting(){
|
||||||
"mariadb"|"mysql")
|
"mariadb"|"mysql")
|
||||||
DB_PORT=${DB_PORT:-"3306"}
|
DB_PORT=${DB_PORT:-"3306"}
|
||||||
;;
|
;;
|
||||||
|
"dameng")
|
||||||
|
DB_PORT=${DB_PORT:-"5236"}
|
||||||
|
;;
|
||||||
"")
|
"")
|
||||||
DB_PORT=${DB_PORT:-${POSTGRESQL_SERVER_PORT:-$(${JSON} services.CoAuthoring.sql.dbPort)}}
|
DB_PORT=${DB_PORT:-${POSTGRESQL_SERVER_PORT:-$(${JSON} services.CoAuthoring.sql.dbPort)}}
|
||||||
;;
|
;;
|
||||||
|
@ -371,6 +374,10 @@ create_db_tbl() {
|
||||||
"mariadb"|"mysql")
|
"mariadb"|"mysql")
|
||||||
create_mysql_tbl
|
create_mysql_tbl
|
||||||
;;
|
;;
|
||||||
|
"dameng")
|
||||||
|
create_dameng_tbl
|
||||||
|
;;
|
||||||
|
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -413,6 +420,17 @@ create_postgresql_tbl() {
|
||||||
$PSQL -f "$APP_DIR/server/schema/postgresql/createdb.sql"
|
$PSQL -f "$APP_DIR/server/schema/postgresql/createdb.sql"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
create_dameng_tbl() {
|
||||||
|
DM8_USER=SYSDBA
|
||||||
|
DM8_PASS=SYSDBA001
|
||||||
|
|
||||||
|
(cd /opt/dmdbms/bin/ && ./disql $DM8_USER/$DM8_PASS@$DB_HOST:$DB_PORT -e "create user "onlyoffice" identified by "onlyoffice" password_policy 0;")
|
||||||
|
|
||||||
|
# Create db on remote server
|
||||||
|
echo "EXIT" | tee -a $APP_DIR/server/schema/dameng/createdb.sql
|
||||||
|
(cd /opt/dmdbms/bin/ && ./disql $DM8_USER/$DM8_PASS@$DB_HOST:$DB_PORT \`$APP_DIR/server/schema/dameng/createdb.sql)
|
||||||
|
}
|
||||||
|
|
||||||
create_mysql_tbl() {
|
create_mysql_tbl() {
|
||||||
CONNECTION_PARAMS="-h$DB_HOST -P$DB_PORT -u$DB_USER -p$DB_PWD -w"
|
CONNECTION_PARAMS="-h$DB_HOST -P$DB_PORT -u$DB_USER -p$DB_PWD -w"
|
||||||
MYSQL="mysql -q $CONNECTION_PARAMS"
|
MYSQL="mysql -q $CONNECTION_PARAMS"
|
||||||
|
@ -497,6 +515,8 @@ update_supervisor_settings(){
|
||||||
cp ${SYSCONF_TEMPLATES_DIR}/supervisor/supervisor /etc/init.d/
|
cp ${SYSCONF_TEMPLATES_DIR}/supervisor/supervisor /etc/init.d/
|
||||||
# Copy modified supervisor config
|
# Copy modified supervisor config
|
||||||
cp ${SYSCONF_TEMPLATES_DIR}/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
|
cp ${SYSCONF_TEMPLATES_DIR}/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
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(){
|
update_log_settings(){
|
||||||
|
|
23
tests/damengdb/README.md
Normal file
23
tests/damengdb/README.md
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
## Stand Documentserver with damengdb
|
||||||
|
|
||||||
|
### How it works
|
||||||
|
|
||||||
|
#### ⚠ Only on the first run:
|
||||||
|
|
||||||
|
The first deployment of the stand requires the execution of ***two scripts*** to prepare the environment.
|
||||||
|
|
||||||
|
***First:*** It is necessary to obtain an image of the dameng db database. To do this, run the script:
|
||||||
|
|
||||||
|
bash damengdb-get-image.sh
|
||||||
|
|
||||||
|
***Second:*** After the image is obtained, it is also necessary to obtain a binary DISQL files that is used for remote access to the database service. To do this, run the script:
|
||||||
|
|
||||||
|
bash damengdb-get-disql.sh
|
||||||
|
|
||||||
|
### Deploy stand
|
||||||
|
|
||||||
|
After db image and disql binary is ready, you cant deploy stand with flexible develop-build number with simple command:
|
||||||
|
|
||||||
|
BUILD=<build-number-from-develop> docker compose up -d
|
||||||
|
|
||||||
|
Note: The build number must be set each time the stand is deployed with compose up.
|
9
tests/damengdb/damengdb-get-disql.sh
Executable file
9
tests/damengdb/damengdb-get-disql.sh
Executable file
|
@ -0,0 +1,9 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Get disql for remote access
|
||||||
|
docker run -d -p 5236:5236 --restart=always --name dm8_01 --privileged=true -e PAGE_SIZE=16 -e LD_LIBRARY_PATH=/opt/dmdbms/bin -e INSTANCE_NAME=dm8_01 dm8_single:v8.1.2.128_ent_x86_64_ctm_pack4
|
||||||
|
echo "Disql bin will be copied from dm8 container. Please wait couple of minutes"
|
||||||
|
sleep 60
|
||||||
|
docker cp dm8_01:/opt/dmdbms/bin .
|
||||||
|
echo "OK: Files was copy"
|
||||||
|
docker stop dm8_01 ; docker rm dm8_01
|
||||||
|
echo "OK: Disql bin files ready"
|
6
tests/damengdb/damengdb-get-image.sh
Executable file
6
tests/damengdb/damengdb-get-image.sh
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Download dameng image
|
||||||
|
wget -O dm8_docker.tar -c https://download.dameng.com/eco/dm8/dm8_20220822_rev166351_x86_rh6_64_ctm.tar
|
||||||
|
docker load -i dm8_docker.tar
|
||||||
|
echo "OK: Dameng image already downloaded"
|
||||||
|
rm -rf dm8_docker.tar
|
57
tests/damengdb/docker-compose.yml
Normal file
57
tests/damengdb/docker-compose.yml
Normal file
|
@ -0,0 +1,57 @@
|
||||||
|
version: '2'
|
||||||
|
services:
|
||||||
|
onlyoffice-documentserver:
|
||||||
|
image: onlyoffice/4testing-documentserver-ee:99.99.99.${BUILD}
|
||||||
|
container_name: onlyoffice-documentserver
|
||||||
|
depends_on:
|
||||||
|
- onlyoffice-dameng
|
||||||
|
- onlyoffice-rabbitmq
|
||||||
|
environment:
|
||||||
|
- DB_TYPE=dameng
|
||||||
|
- DB_HOST=onlyoffice-dameng
|
||||||
|
- DB_PORT=5236
|
||||||
|
- DB_NAME=onlyoffice
|
||||||
|
- DB_USER=onlyoffice
|
||||||
|
- AMQP_URI=amqp://guest:guest@onlyoffice-rabbitmq
|
||||||
|
# Uncomment strings below to enable the JSON Web Token validation.
|
||||||
|
#- JWT_ENABLED=true
|
||||||
|
#- JWT_SECRET=secret
|
||||||
|
#- JWT_HEADER=Authorization
|
||||||
|
#- JWT_IN_BODY=true
|
||||||
|
ports:
|
||||||
|
- '80:80'
|
||||||
|
- '443:443'
|
||||||
|
stdin_open: true
|
||||||
|
restart: always
|
||||||
|
stop_grace_period: 60s
|
||||||
|
volumes:
|
||||||
|
- ../../run-document-server.sh:/app/ds/run-document-server.sh
|
||||||
|
- ./bin:/opt/dmdbms/bin/
|
||||||
|
- /var/www/onlyoffice/Data
|
||||||
|
- /var/log/onlyoffice
|
||||||
|
- /var/lib/onlyoffice/documentserver/App_Data/cache/files
|
||||||
|
- /var/www/onlyoffice/documentserver-example/public/files
|
||||||
|
- /usr/share/fonts
|
||||||
|
|
||||||
|
onlyoffice-rabbitmq:
|
||||||
|
container_name: onlyoffice-rabbitmq
|
||||||
|
image: rabbitmq
|
||||||
|
restart: always
|
||||||
|
expose:
|
||||||
|
- '5672'
|
||||||
|
|
||||||
|
onlyoffice-dameng:
|
||||||
|
container_name: onlyoffice-dameng
|
||||||
|
image: dm8_single:v8.1.2.128_ent_x86_64_ctm_pack4
|
||||||
|
environment:
|
||||||
|
- PAGE_SIZE=16
|
||||||
|
- LD_LIBRARY_PATH=/opt/dmdbms/bin
|
||||||
|
- INSTANCE_NAME=dm8_01
|
||||||
|
restart: always
|
||||||
|
expose:
|
||||||
|
- '5236'
|
||||||
|
volumes:
|
||||||
|
- dameng_data:/opt/dmdbms/data
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
dameng_data:
|
Loading…
Reference in a new issue