Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Docker Onlyoffice
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Docker Onlyoffice
Commits
587e4db8
Commit
587e4db8
authored
Sep 08, 2022
by
tangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
50d89b14
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1797 additions
and
0 deletions
+1797
-0
Dockerfile
Dockerfile
+48
-0
README.md
README.md
+41
-0
server/Common/sources/commondefines.js
server/Common/sources/commondefines.js
+1132
-0
server/Common/sources/constants.js
server/Common/sources/constants.js
+289
-0
server/Common/sources/license.js
server/Common/sources/license.js
+64
-0
server/Makefile
server/Makefile
+188
-0
web-apps/apps/documenteditor/mobile/src/lib/patch.jsx
web-apps/apps/documenteditor/mobile/src/lib/patch.jsx
+23
-0
web-apps/apps/presentationeditor/mobile/src/lib/patch.jsx
web-apps/apps/presentationeditor/mobile/src/lib/patch.jsx
+6
-0
web-apps/apps/spreadsheeteditor/mobile/src/lib/patch.jsx
web-apps/apps/spreadsheeteditor/mobile/src/lib/patch.jsx
+6
-0
No files found.
Dockerfile
0 → 100644
View file @
587e4db8
ARG
product_version=7.1.1
ARG
build_number=23
ARG
oo_root='/var/www/onlyoffice/documentserver'
## Setup
FROM
onlyoffice/documentserver:${product_version}.${build_number} as setup-stage
ARG
product_version
ARG
build_number
ARG
oo_root
ENV
PRODUCT_VERSION=${product_version}
ENV
BUILD_NUMBER=${build_number}
ARG
build_deps="git make g++ nodejs npm"
RUN
apt-get update
&&
apt-get
install
-y
${
build_deps
}
RUN
npm
install
-g
pkg grunt grunt-cli
WORKDIR
/build
## Clone
FROM
setup-stage as clone-stage
ARG
tag=v${PRODUCT_VERSION}.${BUILD_NUMBER}
RUN
git clone
--quiet
--branch
$tag
--depth
1 https://github.com/ONLYOFFICE/build_tools.git /build/build_tools
RUN
git clone
--quiet
--branch
$tag
--depth
1 https://github.com/ONLYOFFICE/server.git /build/server
COPY
server /build/
## Build
FROM
clone-stage as build-stage
# build server with license checks patched
WORKDIR
/build/server
RUN
make
RUN
pkg /build/build_tools/out/linux_64/onlyoffice/documentserver/server/FileConverter
--targets
=
node10-linux
-o
/build/converter
RUN
pkg /build/build_tools/out/linux_64/onlyoffice/documentserver/server/DocService
--targets
=
node10-linux
--options
max_old_space_size
=
4096
-o
/build/docservice
## Final image
FROM
onlyoffice/documentserver:${product_version}.${build_number}
ARG
oo_root
# server
COPY
--from=build-stage /build/converter ${oo_root}/server/FileConverter/converter
COPY
--from=build-stage /build/docservice ${oo_root}/server/DocService/docservice
README.md
View file @
587e4db8
# doc-editor
view/edit/save word,excel,ppt files online
## backgrounds
this project is based on onlyoffice V7.1.1.23
base images is:
onlyoffice/documentserver:7.1.1.23
version dependency:
| onlyoffice component | version | repo |
| -------------------- | -------- | ----------------------------------------------------- |
| server | 7.1.1.23 | https://github.com/ONLYOFFICE/server/tree/v7.1.1.76 |
| web-app | 7.1.1.23 | https://github.com/ONLYOFFICE/web-apps/tree/v7.1.1.76 |
| build_tools | 7.1.1.23 | https://github.com/ONLYOFFICE/sdkjs/tree/v7.1.1.76 |
what's more, it removes the concurrency limit, enable mobile editing and adds chinese fonts
this project is heavily inspired by the works of
[
GitHub - aleho/onlyoffice-ce-docker-license: Onlyoffice with mobile editing enabled
](
https://github.com/aleho/onlyoffice-ce-docker-license
)
and
[
Docker Hub
](
https://hub.docker.com/r/gmsjy/onlyoffice
)
btw:
```
docker pull gmsjy/onlyoffice
```
this image is really awesome but it used an early version of onlyoffice which is 6.2.0. The perpose of this project is to change the version to 7.1.1.
## Usage
```
docker build -t [imageName] .
```
\ No newline at end of file
server/Common/sources/commondefines.js
0 → 100644
View file @
587e4db8
This diff is collapsed.
Click to expand it.
server/Common/sources/constants.js
0 → 100644
View file @
587e4db8
This diff is collapsed.
Click to expand it.
server/Common/sources/license.js
0 → 100644
View file @
587e4db8
/*
* (c) Copyright Ascensio System SIA 2010-2019
*
* This program is a free software product. You can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License (AGPL)
* version 3 as published by the Free Software Foundation. In accordance with
* Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
* that Ascensio System SIA expressly excludes the warranty of non-infringement
* of any third-party rights.
*
* This program is distributed WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
* details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
*
* You can contact Ascensio System SIA at 20A-12 Ernesta Birznieka-Upisha
* street, Riga, Latvia, EU, LV-1050.
*
* The interactive user interfaces in modified source and object code versions
* of the Program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU AGPL version 3.
*
* Pursuant to Section 7(b) of the License you must retain the original Product
* logo when distributing the program. Pursuant to Section 7(e) we decline to
* grant you any rights under trademark law for use of our trademarks.
*
* All the Product's GUI elements, including illustrations and icon sets, as
* well as technical writing content are licensed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International. See the License
* terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
*
*/
'
use strict
'
;
const
constants
=
require
(
'
./constants
'
);
const
buildDate
=
'
9/8/2022
'
;
const
oBuildDate
=
new
Date
(
buildDate
);
exports
.
readLicense
=
function
*
()
{
const
c_LR
=
constants
.
LICENSE_RESULT
;
var
now
=
new
Date
();
var
startDate
=
new
Date
(
Date
.
UTC
(
now
.
getUTCFullYear
(),
now
.
getUTCMonth
(),
1
));
//first day of current month
return
[{
count
:
1
,
type
:
c_LR
.
Success
,
light
:
false
,
packageType
:
constants
.
PACKAGE_TYPE_I
,
mode
:
constants
.
LICENSE_MODE
.
None
,
branding
:
false
,
connections
:
constants
.
LICENSE_CONNECTIONS
,
customization
:
true
,
usersCount
:
0
,
usersExpire
:
constants
.
LICENSE_EXPIRE_USERS_ONE_DAY
,
hasLicense
:
true
,
plugins
:
true
,
buildDate
:
oBuildDate
,
startDate
:
startDate
,
endDate
:
"
2999-01-01T23:59:59.000Z
"
,
customerId
:
""
},
null
];
};
exports
.
packageType
=
constants
.
PACKAGE_TYPE_OS
;
server/Makefile
0 → 100644
View file @
587e4db8
GRUNT
=
grunt
GRUNT_FLAGS
=
--no-color
-v
GRUNT_FILES
=
Gruntfile.js.out
PRODUCT_VERSION
?=
0.0.0
BUILD_NUMBER
?=
0
PUBLISHER_NAME
?=
Ascensio System SIA
PUBLISHER_URL
?=
https://www.onlyoffice.com/
GRUNT_ENV
+=
PRODUCT_VERSION
=
$(PRODUCT_VERSION)
GRUNT_ENV
+=
BUILD_NUMBER
=
$(BUILD_NUMBER)
GRUNT_ENV
+=
PUBLISHER_NAME
=
"
$(PUBLISHER_NAME)
"
GRUNT_ENV
+=
PUBLISHER_URL
=
"
$(PUBLISHER_URL)
"
BRANDING_DIR
?=
./branding
DOCUMENT_ROOT
?=
/var/www/onlyoffice/documentserver
ifeq
($(OS),Windows_NT)
PLATFORM
:=
win
EXEC_EXT
:=
.exe
SHARED_EXT
:=
.dll
ifeq
($(PROCESSOR_ARCHITECTURE),AMD64)
ARCHITECTURE
:=
64
endif
ifeq
($(PROCESSOR_ARCHITECTURE),x86)
ARCHITECTURE
:=
32
endif
else
UNAME_S
:=
$(
shell
uname
-s
)
ifeq
($(UNAME_S),Linux)
PLATFORM
:=
linux
SHARED_EXT
:=
.so
*
LIB_PREFIX
:=
lib
endif
UNAME_M
:=
$(
shell
uname
-m
)
ifeq
($(UNAME_M),x86_64)
ARCHITECTURE
:=
64
endif
ifneq
($(filter %86,$(UNAME_M)),)
ARCHITECTURE
:=
32
endif
endif
TARGET
:=
$(PLATFORM)
_
$(ARCHITECTURE)
OUTPUT
=
../build_tools/out/
$(TARGET)
/onlyoffice/documentserver/server
SPELLCHECKER_DICTIONARIES
:=
$(OUTPUT)
/../dictionaries
SPELLCHECKER_DICTIONARY_FILES
+=
../dictionaries/
*
_
*
SCHEMA_DIR
=
schema
SCHEMA_FILES
=
$(SCHEMA_DIR)
/
**
SCHEMA
=
$(OUTPUT)
/
$(SCHEMA_DIR)
/
TOOLS_DIR
=
tools
TOOLS_FILES
+=
../core/build/bin/
$(TARGET)
/allfontsgen
$(EXEC_EXT)
TOOLS_FILES
+=
../core/build/bin/
$(TARGET)
/allthemesgen
$(EXEC_EXT)
TOOLS
=
$(OUTPUT)
/
$(TOOLS_DIR)
LICENSE_FILES
=
LICENSE.txt 3rd-Party.txt license/
LICENSE
=
$(
addsuffix
$(OUTPUT)
/, LICENSE_FILES
)
LICENSE_JS
:=
$(OUTPUT)
/Common/sources/license.js
COMMON_DEFINES_JS
:=
$(OUTPUT)
/Common/sources/commondefines.js
WELCOME_DIR
=
welcome
WELCOME_FILES
=
$(BRANDING_DIR)
/
$(WELCOME_DIR)
/
**
WELCOME
=
$(OUTPUT)
/
$(WELCOME_DIR)
/
INFO_DIR
=
info
INFO_FILES
=
$(BRANDING_DIR)
/
$(INFO_DIR)
/
**
INFO
=
$(OUTPUT)
/
$(INFO_DIR)
/
CORE_FONTS_DIR
=
core-fonts
CORE_FONTS_FILES
=
../
$(CORE_FONTS_DIR)
/
**
CORE_FONTS
=
$(OUTPUT)
/../
$(CORE_FONTS_DIR)
/
DOCUMENT_TEMPLATES_DIR
=
document-templates
DOCUMENT_TEMPLATES_FILES
=
../
$(DOCUMENT_TEMPLATES_DIR)
/
**
DOCUMENT_TEMPLATES
=
$(OUTPUT)
/../
$(DOCUMENT_TEMPLATES_DIR)
/
DEBUG
=
$(BRANDING_DIR)
/debug.js
.PHONY
:
all clean install uninstall build-date
.NOTPARALLEL
:
all
:
$(SCHEMA) $(LICENSE) $(WELCOME) $(INFO) build-date
build-date
:
$(GRUNT_FILES)
sed
"s|
\(
const buildVersion =
\)
.*|
\1
'
${PRODUCT_VERSION}
';|"
-i
$(COMMON_DEFINES_JS)
sed
"s|
\(
const buildNumber =
\)
.*|
\1
${BUILD_NUMBER}
;|"
-i
$(COMMON_DEFINES_JS)
sed
"s|
\(
const buildDate =
\)
.*|
\1
'
$$
(date +%F)';|"
-i
$(LICENSE_JS)
test
-e
$(DEBUG)
&&
\
cp
$(DEBUG)
$(OUTPUT)
/Common/sources
||
true
$(SPELLCHECKER_DICTIONARIES)
:
$(GRUNT_FILES)
mkdir
-p
$(SPELLCHECKER_DICTIONARIES)
&&
\
cp
-r
-t
$(SPELLCHECKER_DICTIONARIES)
$(SPELLCHECKER_DICTIONARY_FILES)
$(SCHEMA)
:
mkdir
-p
$(SCHEMA)
&&
\
cp
-r
-t
$(SCHEMA)
$(SCHEMA_FILES)
$(TOOLS)
:
mkdir
-p
$(TOOLS)
&&
\
cp
-r
-t
$(TOOLS)
$(TOOLS_FILES)
$(LICENSE)
:
mkdir
-p
$(OUTPUT)
&&
\
cp
-r
-t
$(OUTPUT)
$(LICENSE_FILES)
$(GRUNT_FILES)
:
cd
$
(
@D
)
&&
\
npm
install
&&
\
$(GRUNT_ENV)
$(GRUNT)
$(GRUNT_FLAGS)
mkdir
-p
$(OUTPUT)
cp
-r
-t
$(OUTPUT)
./build/server/
*
echo
"Done"
>
$@
$(WELCOME)
:
mkdir
-p
$(WELCOME)
&&
\
cp
-r
-t
$(WELCOME)
$(WELCOME_FILES)
$(INFO)
:
mkdir
-p
$(INFO)
&&
\
cp
-r
-t
$(INFO)
$(INFO_FILES)
$(CORE_FONTS)
:
mkdir
-p
$(CORE_FONTS)
&&
\
cp
-r
-t
$(CORE_FONTS)
$(CORE_FONTS_FILES)
$(DOCUMENT_TEMPLATES)
:
mkdir
-p
$(DOCUMENT_TEMPLATES)
&&
\
cp
-r
-t
$(DOCUMENT_TEMPLATES)
$(DOCUMENT_TEMPLATES_FILES)
clean
:
rm
-rf
$(GRUNT_FILES)
install
:
mkdir
-pv
${DESTDIR}
/var/www/onlyoffice
if
!
id
-u
onlyoffice
>
/dev/null 2>&1
;
then
useradd
-m
-d
/var/www/onlyoffice
-r
-U
onlyoffice
;
fi
mkdir
-p
${DESTDIR}${DOCUMENT_ROOT}/fonts
mkdir
-p
${DESTDIR}/var/log/onlyoffice/documentserver
mkdir
-p
${DESTDIR}/var/lib/onlyoffice/documentserver/App_Data
cp
-fr
-t
${DESTDIR}${DOCUMENT_ROOT}
build/*
../web-apps/deploy/*
mkdir
-p
${DESTDIR}/etc/onlyoffice/documentserver
mv
${DESTDIR}${DOCUMENT_ROOT}/server/Common/config/*
${DESTDIR}/etc/onlyoffice/documentserver
chown onlyoffice
:
onlyoffice -R ${DESTDIR}/var/www/onlyoffice
chown
onlyoffice:onlyoffice
-R
${DESTDIR}
/var/log/onlyoffice
chown
onlyoffice:onlyoffice
-R
${DESTDIR}
/var/lib/onlyoffice
# Make symlinks for shared libs
find
\
${DESTDIR}${DOCUMENT_ROOT}/server/FileConverter/bin
\
-maxdepth
1
\
-name
*$(SHARED_EXT)
\
-exec
sh
-c
'ln -sf {} ${DESTDIR}/lib/$$(basename {})'
\;
sudo
-u
onlyoffice
"${DESTDIR}${DOCUMENT_ROOT}/server/tools/allfontsgen"
\
--input
=
"
${DESTDIR}${DOCUMENT_ROOT}
/core-fonts"
\
--allfonts-web
=
"
${DESTDIR}${DOCUMENT_ROOT}
/sdkjs/common/AllFonts.js"
\
--allfonts
=
"
${DESTDIR}${DOCUMENT_ROOT}
/server/FileConverter/bin/AllFonts.js"
\
--images
=
"
${DESTDIR}${DOCUMENT_ROOT}
/sdkjs/common/Images"
\
--selection
=
"
${DESTDIR}${DOCUMENT_ROOT}
/server/FileConverter/bin/font_selection.bin"
\
--output-web
=
"
${DESTDIR}${DOCUMENT_ROOT}
/fonts"
\
--use-system
=
"true"
sudo
-u
onlyoffice
"${DESTDIR}${DOCUMENT_ROOT}/server/tools/allthemesgen"
\
--converter-dir
=
"
${DESTDIR}${DOCUMENT_ROOT}
/server/FileConverter/bin"
\
--src
=
"
${DESTDIR}${DOCUMENT_ROOT}
/sdkjs/slide/themes"
\
--output
=
"
${DESTDIR}${DOCUMENT_ROOT}
/sdkjs/common/Images"
uninstall
:
userdel onlyoffice
# Unlink installed shared libs
find
/lib
-type
l
|
while
IFS
=
read
-r
lnk
;
do if
(
readlink
"
$$
lnk"
|
grep
-q
'^
${DOCUMENT_ROOT}
/server/FileConverter/bin/'
)
;
then
rm
"
$$
lnk"
;
fi
;
done
rm
-rf
/var/www/onlyoffice/documentserver
rm
-rf
/var/log/onlyoffice/documentserver
rm
-rf
/var/lib/onlyoffice/documentserver
rm
-rf
/etc/onlyoffice/documentserver
web-apps/apps/documenteditor/mobile/src/lib/patch.jsx
0 → 100644
View file @
587e4db8
const
EditorUIController
=
()
=>
{
return
null
};
EditorUIController
.
isSupportEditFeature
=
()
=>
{
return
true
};
EditorUIController
.
getToolbarOptions
=
()
=>
{
return
null
};
EditorUIController
.
initFonts
=
()
=>
null
;
EditorUIController
.
initEditorStyles
=
()
=>
null
;
EditorUIController
.
initFocusObjects
=
()
=>
null
;
EditorUIController
.
initTableTemplates
=
()
=>
null
;
EditorUIController
.
ContextMenu
=
{
mapMenuItems
:
()
=>
[],
handleMenuItemClick
:
()
=>
true
,
};
export
default
EditorUIController
;
web-apps/apps/presentationeditor/mobile/src/lib/patch.jsx
0 → 100644
View file @
587e4db8
const
EditorUIController
=
()
=>
null
;
EditorUIController
.
isSupportEditFeature
=
()
=>
true
;
export
default
EditorUIController
;
web-apps/apps/spreadsheeteditor/mobile/src/lib/patch.jsx
0 → 100644
View file @
587e4db8
const
EditorUIController
=
()
=>
null
;
EditorUIController
.
isSupportEditFeature
=
()
=>
true
;
export
default
EditorUIController
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment