Enable ds path customization
This commit is contained in:
parent
c2b6187926
commit
d7833f454b
29
Dockerfile
29
Dockerfile
@ -3,6 +3,8 @@ LABEL maintainer Ascensio System SIA <support@onlyoffice.com>
|
||||
|
||||
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
ARG ONLYOFFICE_VALUE=onlyoffice
|
||||
|
||||
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
||||
apt-get -y update && \
|
||||
apt-get -yq install wget apt-transport-https curl locales && \
|
||||
@ -42,9 +44,9 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
||||
supervisor \
|
||||
xvfb \
|
||||
zlib1g && \
|
||||
sudo -u postgres psql -c "CREATE DATABASE onlyoffice;" && \
|
||||
sudo -u postgres psql -c "CREATE USER onlyoffice WITH password 'onlyoffice';" && \
|
||||
sudo -u postgres psql -c "GRANT ALL privileges ON DATABASE onlyoffice TO onlyoffice;" && \
|
||||
sudo -u postgres psql -c "CREATE DATABASE $ONLYOFFICE_VALUE;" && \
|
||||
sudo -u postgres psql -c "CREATE USER $ONLYOFFICE_VALUE WITH password '$ONLYOFFICE_VALUE';" && \
|
||||
sudo -u postgres psql -c "GRANT ALL privileges ON DATABASE $ONLYOFFICE_VALUE TO $ONLYOFFICE_VALUE;" && \
|
||||
service postgresql stop && \
|
||||
service redis-server stop && \
|
||||
service rabbitmq-server stop && \
|
||||
@ -52,24 +54,27 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
|
||||
service nginx stop && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY config /app/onlyoffice/setup/config/
|
||||
COPY run-document-server.sh /app/onlyoffice/run-document-server.sh
|
||||
COPY config /app/ds/setup/config/
|
||||
COPY run-document-server.sh /app/ds/run-document-server.sh
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
ARG REPO_URL="deb http://download.onlyoffice.com/repo/debian squeeze main"
|
||||
ARG PRODUCT_NAME=onlyoffice-documentserver
|
||||
ARG COMPANY_NAME=onlyoffice
|
||||
ARG PRODUCT_NAME=documentserver
|
||||
|
||||
RUN echo "$REPO_URL" | tee /etc/apt/sources.list.d/onlyoffice.list && \
|
||||
ENV COMPANY_NAME=$COMPANY_NAME
|
||||
|
||||
RUN echo "$REPO_URL" | tee /etc/apt/sources.list.d/ds.list && \
|
||||
apt-get -y update && \
|
||||
service postgresql start && \
|
||||
apt-get -yq install $PRODUCT_NAME && \
|
||||
apt-get -yq install $COMPANY_NAME-$PRODUCT_NAME && \
|
||||
service postgresql stop && \
|
||||
service supervisor stop && \
|
||||
chmod 755 /app/onlyoffice/*.sh && \
|
||||
rm -rf /var/log/onlyoffice && \
|
||||
chmod 755 /app/ds/*.sh && \
|
||||
rm -rf /var/log/$COMPANY_NAME && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
VOLUME /var/log/onlyoffice /var/lib/onlyoffice /var/www/onlyoffice/Data /var/lib/postgresql /usr/share/fonts/truetype/custom
|
||||
VOLUME /var/log/$COMPANY_NAME /var/lib/$COMPANY_NAME /var/www/$COMPANY_NAME/Data /var/lib/postgresql /usr/share/fonts/truetype/custom
|
||||
|
||||
ENTRYPOINT /app/onlyoffice/run-document-server.sh
|
||||
ENTRYPOINT /app/ds/run-document-server.sh
|
||||
|
10
Makefile
10
Makefile
@ -1,8 +1,9 @@
|
||||
COMPANY_NAME ?= onlyoffice
|
||||
GIT_BRANCH ?= origin/develop
|
||||
GIT_BRANCH ?= develop
|
||||
PRODUCT_NAME ?= documentserver-ie
|
||||
PRODUCT_VERSION ?= 0.0.0
|
||||
BUILD_NUMBER ?= 0
|
||||
ONLYOFFICE_VALUE ?= onlyoffice
|
||||
|
||||
PACKAGE_VERSION := $(PRODUCT_VERSION)-$(BUILD_NUMBER)
|
||||
|
||||
@ -30,7 +31,12 @@ DOCKER_TARGETS := $(foreach TAG,$(DOCKER_TAGS),$(DOCKER_REPO)$(COLON)$(TAG))
|
||||
|
||||
$(DOCKER_TARGETS): $(DEB_REPO_DATA)
|
||||
|
||||
docker build --build-arg REPO_URL=$(REPO_URL) --build-arg PRODUCT_NAME=$(COMPANY_NAME)-$(PRODUCT_NAME) -t $(subst $(COLON),:,$@) . &&\
|
||||
docker build \
|
||||
--build-arg REPO_URL=$(REPO_URL) \
|
||||
--build-arg COMPANY_NAME=$(COMPANY_NAME) \
|
||||
--build-arg PRODUCT_NAME=$(PRODUCT_NAME) \
|
||||
--build-arg ONLYOFFICE_VALUE=$(ONLYOFFICE_VALUE) \
|
||||
-t $(subst $(COLON),:,$@) . &&\
|
||||
mkdir -p $$(dirname $@) &&\
|
||||
echo "Done" > $@
|
||||
|
||||
|
@ -3,13 +3,13 @@
|
||||
# Define '**' behavior explicitly
|
||||
shopt -s globstar
|
||||
|
||||
APP_DIR="/var/www/onlyoffice/documentserver"
|
||||
DATA_DIR="/var/www/onlyoffice/Data"
|
||||
LOG_DIR="/var/log/onlyoffice"
|
||||
APP_DIR="/var/www/${COMPANY_NAME}/documentserver"
|
||||
DATA_DIR="/var/www/${COMPANY_NAME}/Data"
|
||||
LOG_DIR="/var/log/${COMPANY_NAME}"
|
||||
DS_LOG_DIR="${LOG_DIR}/documentserver"
|
||||
LIB_DIR="/var/lib/onlyoffice"
|
||||
LIB_DIR="/var/lib/${COMPANY_NAME}"
|
||||
DS_LIB_DIR="${LIB_DIR}/documentserver"
|
||||
CONF_DIR="/etc/onlyoffice/documentserver"
|
||||
CONF_DIR="/etc/${COMPANY_NAME}/documentserver"
|
||||
|
||||
ONLYOFFICE_DATA_CONTAINER=${ONLYOFFICE_DATA_CONTAINER:-false}
|
||||
ONLYOFFICE_DATA_CONTAINER_HOST=${ONLYOFFICE_DATA_CONTAINER_HOST:-localhost}
|
||||
@ -23,7 +23,7 @@ SSL_DHPARAM_PATH=${SSL_DHPARAM_PATH:-${SSL_CERTIFICATES_DIR}/dhparam.pem}
|
||||
SSL_VERIFY_CLIENT=${SSL_VERIFY_CLIENT:-off}
|
||||
ONLYOFFICE_HTTPS_HSTS_ENABLED=${ONLYOFFICE_HTTPS_HSTS_ENABLED:-true}
|
||||
ONLYOFFICE_HTTPS_HSTS_MAXAGE=${ONLYOFFICE_HTTPS_HSTS_MAXAGE:-31536000}
|
||||
SYSCONF_TEMPLATES_DIR="/app/onlyoffice/setup/config"
|
||||
SYSCONF_TEMPLATES_DIR="/app/ds/setup/config"
|
||||
|
||||
NGINX_CONFD_PATH="/etc/nginx/conf.d";
|
||||
NGINX_ONLYOFFICE_PATH="${CONF_DIR}/nginx"
|
||||
@ -412,4 +412,4 @@ service nginx start
|
||||
documentserver-generate-allfonts.sh ${ONLYOFFICE_DATA_CONTAINER}
|
||||
documentserver-static-gzip.sh ${ONLYOFFICE_DATA_CONTAINER}
|
||||
|
||||
tail -f /var/log/onlyoffice/**/*.log
|
||||
tail -f /var/log/${COMPANY_NAME}/**/*.log
|
||||
|
Loading…
x
Reference in New Issue
Block a user