Compare commits

..

5 commits

Author SHA1 Message Date
Danil Titarenko 7fa2f598a1
Fix ucs build (#537)
* Fix ucs build

* Change rabbitmq version on lower

* Remove rabbimq version argument

* Rename variable
2022-12-20 14:54:23 +03:00
papacarlo 3fb3b2f3de Merge branch hotfix/v7.2.2 into master 2022-12-20 09:55:28 +00:00
Danil Titarenko c7090252ff Add base image and postgresql version build arguments (#524)
(cherry picked from commit e1d7cfd5e8)
2022-10-31 19:00:18 +03:00
Danil Titarenko 730dd71ac5 Add ucs build on older image version (#531)
(cherry picked from commit 92dd2833d1)
2022-10-31 19:00:03 +03:00
Pavel Lobashov 1957d38907
Actualize state of JWT variables (#535) 2022-10-31 17:38:53 +03:00
11 changed files with 22 additions and 80 deletions

View file

@ -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
BUILD_CHANNEL=nightly RELEASE_BRANCH=unstable
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
BUILD_CHANNEL=test RELEASE_BRANCH=testing
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}~stretch export PACKAGE_VERSION=${PRODUCT_VERSION}-${BUILD_NUMBER}
export PACKAGE_BASEURL=${{ secrets.REPO_BASEURL }}/${BUILD_CHANNEL} export PACKAGE_BASEURL=${{ secrets.REPO_BASEURL_OLD }}/${RELEASE_BRANCH}/ubuntu
export BUILD_CHANNEL export RELEASE_BRANCH
export PLATFORM export PLATFORM
export DOCKERFILE=Dockerfile export DOCKERFILE=Dockerfile
export PREFIX_NAME=4testing- export PREFIX_NAME=4testing-

View file

@ -11,13 +11,14 @@ 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 && \ apt-get -yq install wget apt-transport-https gnupg locales lsb-release && \
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 \
@ -46,7 +47,7 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
postgresql \ postgresql \
postgresql-client \ postgresql-client \
pwgen \ pwgen \
rabbitmq-server=3.10* \ rabbitmq-server=${RABBITMQ_VERSION}* \
redis-server \ redis-server \
software-properties-common \ software-properties-common \
sudo \ sudo \
@ -85,8 +86,7 @@ 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" && \

View file

@ -4,29 +4,28 @@ 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
S3_REGION ?= eu-west-1 RELEASE_BRANCH ?= unstable
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)~stretch PACKAGE_VERSION := $(PRODUCT_VERSION)-$(BUILD_NUMBER)
PACKAGE_BASEURL := https://s3.$(S3_REGION).amazonaws.com/$(S3_BUCKET)/server/linux/debian/$(BUILD_CHANNEL) PACKAGE_BASEURL := https://s3.eu-west-1.amazonaws.com/$(S3_BUCKET)/$(COMPANY_NAME_LOW)/$(RELEASE_BRANCH)/ubuntu
ifeq ($(BUILD_CHANNEL),$(filter $(BUILD_CHANNEL),nightly test)) ifeq ($(RELEASE_BRANCH),$(filter $(RELEASE_BRANCH),unstable testing))
DOCKER_TAG := $(PRODUCT_VERSION).$(BUILD_NUMBER) DOCKER_TAG := $(subst -,.,$(PACKAGE_VERSION))
else else
DOCKER_TAG := $(PRODUCT_VERSION).$(BUILD_NUMBER)-$(subst /,-,$(GIT_BRANCH)) DOCKER_TAG := $(subst -,.,$(PACKAGE_VERSION))-$(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)_$(DOCKER_TAG).tar.gz DOCKER_ARCH := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW)_$(PACKAGE_VERSION).tar.gz
DOCKER_ARCH_URI := server/linux/docker/$(BUILD_CHANNEL)/$(notdir $(DOCKER_ARCH)) DOCKER_ARCH_URI := $(COMPANY_NAME_LOW)/$(RELEASE_BRANCH)/docker/$(notdir $(DOCKER_ARCH))
.PHONY: all clean clean-docker image deploy docker publish .PHONY: all clean clean-docker image deploy docker publish
@ -62,7 +61,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 ($(BUILD_CHANNEL),nightly) ifeq ($(RELEASE_BRANCH),unstable)
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; \

View file

@ -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 `false`. - **JWT_ENABLED**: Specifies the enabling the JSON Web Token validation by the ONLYOFFICE Document Server. Defaults to `true`.
- **JWT_SECRET**: Defines the secret key to validate the JSON Web Token in the request to the ONLYOFFICE Document Server. Defaults to `secret`. - **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_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`.

View file

@ -1,13 +0,0 @@
[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

View file

@ -1,13 +0,0 @@
[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

View file

@ -1,14 +0,0 @@
[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

View file

@ -1,13 +0,0 @@
[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

View file

@ -1,2 +0,0 @@
[group:ds]
programs=docservice,converter,metrics,example

View file

@ -46,7 +46,7 @@ variable "PACKAGE_FILE" {
default = "" default = ""
} }
variable "BUILD_CHANNEL" { variable "RELEASE_BRANCH" {
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("nightly",BUILD_CHANNEL) ? "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:latest": "", equal("unstable",RELEASE_BRANCH) ? "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:latest": "",
] ]
platforms = ["${PLATFORM}"] platforms = ["${PLATFORM}"]
args = { args = {

View file

@ -497,8 +497,6 @@ 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(){