Compare commits

...

546 Commits

Author SHA1 Message Date
22f8a1004f Merge branch hotfix/v8.3.1 into master 2025-02-27 13:24:28 +00:00
c867cf5eb7 Fix issue with building documentserver-ucs 2025-02-10 07:38:11 +00:00
0de571477f Merge branch release/v8.3.0 into master 2025-02-05 17:25:46 +00:00
a8b1256d87 fix Bug 72356 - Fix security issue with shell variables 2025-01-13 15:34:29 +05:00
a349692e60 Add folder description (#16) 2025-01-10 13:35:29 +00:00
4ed8027cbe Fix bug 72341 - Injections with operating system commands (#15)
Co-authored-by: danilapog <danil.titarenko@onlyoffice.com>
Co-committed-by: danilapog <danil.titarenko@onlyoffice.com>
2025-01-09 14:34:43 +00:00
e9f55325d9 Fixbug #72289 2024-12-28 08:44:33 +00:00
9b55149e51 Fix issue with building Dockerfile for arm64 arch 2024-12-20 09:47:22 +05:00
2e4c0e7ebc Update base image to 24.04 (#13)
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/Docker-DocumentServer/pulls/13
Reviewed-by: Alexey Golubev <Alexey.Golubev@onlyoffice.com>
Co-authored-by: Nasrullo Nurullaev <nasrullo.nurullaev@onlyoffice.com>
Co-committed-by: Nasrullo Nurullaev <nasrullo.nurullaev@onlyoffice.com>
2024-12-16 07:38:40 +00:00
19c2c0bf7d Merge branch hotfix/v8.2.2 into release/v8.3.0 2024-12-09 12:10:33 +00:00
c53b6dc6be Merge branch hotfix/v8.2.2 into master 2024-11-28 12:25:15 +00:00
330f5a4969 fix Bug 71832 - Fix the handling for .pem certificates 2024-11-25 14:37:52 +03:00
3d89aae7ee Merge branch hotfix/v8.2.1 into develop 2024-11-22 10:55:47 +00:00
0b670630f5 Merge branch release/v8.2.0 into develop 2024-10-21 11:56:45 +00:00
0052a31583 Merge branch release/v8.2.0 into master 2024-10-17 11:16:26 +00:00
510128a3cc Fix to resolve the unknown "cache_tag" variable error 2024-10-16 16:01:14 +07:00
84443a0095 fix Bug 70772 - Add the APPLICATION_NAME variable to ds-docservice 2024-10-11 15:46:53 +07:00
a1b238d180 Fix the option to enable plugins to true by default 2024-10-07 16:29:01 +07:00
85a678008a Merge pull request 'Replace library symlinks with LD_LIBRARY_PATH env' (#7) from feature/library-path into release/v8.2.0
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/Docker-DocumentServer/pulls/7
2024-09-23 14:42:52 +00:00
e815a55687 Replace library symlinks with LD_LIBRARY_PATH env 2024-09-23 20:22:05 +07:00
1581d5b3fb fix Bug 69800 - Fix warning in casing mismatch 2024-09-18 07:34:43 +00:00
cf34136b58 Fix bug 70234 - getTableColumnsError
Error on damengdb connect
2024-09-16 22:39:48 +03:00
5a1597b6ed Merge branch 'hotfix/v8.1.3' into release/v8.2.0 2024-09-13 18:58:49 +07:00
ed000589d4 Merge branch hotfix/v8.1.3 into develop 2024-09-13 11:41:33 +00:00
aeba194cf1 Merge branch hotfix/v8.1.3 into master 2024-09-13 11:41:32 +00:00
ca1a38e440 Disable plugin installation when building the docker image (#3)
Co-authored-by: Evgeniy Antonyuk <antonyuk.evgenyiy@onlyoffice.com>
Co-committed-by: Evgeniy Antonyuk <antonyuk.evgenyiy@onlyoffice.com>
2024-09-05 11:47:11 +00:00
bf55775663 Add an optional option to enable plugins (#1)
Co-authored-by: Evgeniy Antonyuk <antonyuk.evgenyiy@onlyoffice.com>
Co-committed-by: Evgeniy Antonyuk <antonyuk.evgenyiy@onlyoffice.com>
2024-09-05 14:31:36 +03:00
bef214b20e Merge hotfix/v8.1.1 into master 2024-09-05 11:28:21 +00:00
b8f4133434 Add an optional option to enable plugins (#1)
Co-authored-by: Evgeniy Antonyuk <antonyuk.evgenyiy@onlyoffice.com>
Co-committed-by: Evgeniy Antonyuk <antonyuk.evgenyiy@onlyoffice.com>
2024-09-05 07:57:32 +00:00
7de5df8df9 fix Bug 69609 - Fix issue with automatic updates (#766) 2024-08-20 12:40:12 +03:00
76e9400bde fix Bug 69596 - Fix warning during Docker Compose execution (#765) 2024-08-20 12:21:19 +03:00
fbc1868597 fix Bug 66631 - Correct RabbitMQ connections limit (#759) 2024-08-14 11:18:03 +03:00
893de2e916 fix Bug 66601 - Add fixes to WOPI modulus configuration (#756) 2024-08-13 13:04:06 +03:00
080f06c9b6 Fix bug 67970 - SIGTERM processing (#753) 2024-08-06 16:33:06 +03:00
d310412e8f fix Bug 66601 - Add fixes to WOPI modulus configuration (#756) 2024-08-01 18:40:47 +03:00
454122d598 Merge branch hotfix/v8.1.1 into release/v8.2.0 2024-07-26 08:13:33 +00:00
67578bb016 Merge branch hotfix/v8.1.1 into develop 2024-07-26 08:13:31 +00:00
7d78233879 Merge branch release/v8.1.0 into develop 2024-06-26 10:50:52 +00:00
0d5588d03a Merge branch release/v8.1.0 into master 2024-06-19 08:29:43 +00:00
b2c9221d48 Fix branding paths (#745) 2024-06-11 11:16:38 +03:00
3b60bc3c6e Fix changing permissions for log directories (#744) 2024-06-10 17:28:48 +03:00
275719d078 Add fixes to WOPI configuration (#742) 2024-06-03 17:35:29 +03:00
cf29c757a2 fix Bug 68320 - Fix output during WOPI configuration (#741) 2024-06-03 17:33:07 +03:00
85ddd66d9f fix Bug 66601 - Add additional parameters for WOPI configuration (#738) 2024-05-29 16:05:22 +03:00
bbfc86a1e0 Add ORACLE support (#734) 2024-05-27 13:57:11 +03:00
b4e29f9695 Add configuration of WOPI parameters (#735) 2024-05-21 14:13:54 +03:00
b665c004da Use mssql-tools version from BASE_IMAGE (#731)
* Use mssql-tools version from BASE_IMAGE

* Small changes

* Small changes

* Small changes

* Small changes

* Small changes
2024-05-03 11:23:12 +03:00
a571bd0d1a Add MSSQL support (#728) 2024-04-23 13:04:49 +03:00
12eb20a61b fix Bug 65410 - Disable ds:metrics service when METRICS_ENABLED=false (#726) 2024-04-10 10:49:31 +03:00
3fe861b1a4 Add damengdb stand (#712)
* Add dameng stand

* Rename compose file

* Move damengdb files in tests folder

* Remove copy bin disql command

* Refactoring damengdb stand

* Update readme instructions

* Refactor: update readme

* Refactor: add note

* Update run command for disql copy

* Remove scripts and add volumes in compose file

Stand was updated. Main changes that scripts for prepare environment was removed.Now damengdb image can be pulled from hub.docker, also disql will be mounted from damengdb container in documentserver container.

* Update damengdb image version

* Actualized damengdb compose file

Use damengdb image from onlyoffice repo. Also do not use develop documentserver build anymore

* Don't mount entrypoint script anymore

After release it will be inside the image with the necessary edits

* Add the ability to build an image before compose is started

* Dameng: Execute schema on build stage

Now if you want use damengdb, you nedd build own image, schema for Documentserver will be create on build stage. Add dockerfile for the build dameng image. Also disql bin file don't share between containers

* Actualize readme for damengdb stand

* Editing typos

* Remove useless lines

* Small cosmetic change

* Remove useless volume from compose file

* Use default password for check connection

* Remove `image` filed from compose
2024-03-25 17:13:26 +03:00
eb1706e3b7 fix Bug 62253 - NODE_EXTRA_CA_CERTS substitution error (#721) 2024-03-19 15:37:55 +03:00
184a07a2b3 Merge branch hotfix/v8.0.1 into release/v8.1.0 2024-03-15 11:20:06 +00:00
34a80e08da Merge branch hotfix/v8.0.1 into develop 2024-03-15 11:20:03 +00:00
5e9c269d86 fix Bug 62253 - self-signed SSL issue (#714) 2024-03-13 16:00:05 +03:00
c4cd0a1417 Merge branch release/v8.0.0 into develop 2024-02-05 08:48:59 +00:00
40efc5bea9 Merge branch release/v8.0.0 into master 2024-01-30 11:32:11 +00:00
0a42ee66b0 Fix bug #60688 (#703) 2024-01-18 10:20:37 +03:00
6416c2c32a Action small fixes (#697) 2023-12-21 13:22:02 +03:00
4ab054c502 Add DOCKER_ORG make variable (#696) 2023-12-20 19:54:56 +03:00
016440fd4b Disable issue creation from zap scanner (#695) 2023-12-20 11:22:37 +03:00
cb06c6f6e1 Correct startup conditions for zap scanner (#694) 2023-12-20 11:21:34 +03:00
276c5da9f5 Add the ability to manually launch the zap scanner (#691)
* Add zap scanning for DocumentServer

* Set branch name as ref for manual trigger

* Use master as default zap action branch

* Move zap action to master branch

* Fix token variable name

* Small cosmetic fix

* Modify zap action trigger condition

Run zap scanner only when documentserver edition hit community and branch hit in `release/` or `hotfix/`
2023-12-19 11:45:12 +03:00
84a8191de9 Add DocumentServer zap scanner (#685)
* Add DocumentServer zap scanner

* Fix zap target url from `http` to `https`
2023-12-19 11:24:58 +03:00
6fc2b27fcf fix Bug 65188 - Upgrade to a current version of postgresql (#690) 2023-11-29 12:33:41 +03:00
09ac8b5463 Fix build workflow runs names (#679) 2023-11-20 12:05:00 +03:00
cd8177e0ae Merge branch hotfix/v7.5.1 into release/v7.6.0 2023-11-15 12:57:43 +00:00
f67284582f Merge branch hotfix/v7.5.1 into develop 2023-11-15 12:57:39 +00:00
012b35d2f8 Cancel prepare4shutdown script during cluster installation (#673)
* Cancel prepare4shutdown script during cluster installation

* Fix line length
2023-10-27 15:08:30 +03:00
5ef86cd090 Merge branch release/v7.5.0 into develop 2023-10-25 10:32:34 +00:00
6e424a5541 Merge branch release/v7.5.0 into master 2023-10-17 12:14:14 +00:00
709bfdd734 fix Bug 63804 - Remove gconf from dependencies since it's deprecated (#663) 2023-09-21 17:09:21 +03:00
f42aed52ab Merge pull request #662 from RealVishy/patch-1
Fix mistype
2023-09-12 10:38:14 +03:00
c37270f61f Update README.md
fix the spelling of docker engine
2023-09-12 15:02:02 +10:00
24d737d5b4 Add instructions for ipv6 connection. Related to bug #63537 (#654)
* Update README.md - add the 'ONLYOFFICE Document Server ipv6 setup' section

* Fix README.md formatting

---------

Co-authored-by: svetlana maleeva <svetlana.maleeva@onlyoffice.com>
2023-08-11 10:40:34 +03:00
4bc4f62720 Merge branch hotfix/v7.4.1 into develop 2023-08-01 08:19:29 +00:00
0b60ccb92b Merge branch hotfix/v7.4.1 into master 2023-07-31 07:28:30 +00:00
c413936f1c Fix Bug #63238 - Fix re-copying of configuration files in supervisor (#645) 2023-07-13 19:51:03 +05:00
9400eedc06 Add auto rebuild previous releases
* Add the ability to rebuild images

Rebuilding images will be done manually (for now). The choice of the number of rebuilt releases is available (1 by default), the choice of repositories for pushing rebuilt images is available (4testing by default).

Principle of operation:
Through the api of the docker hub, we get the last launched tag that falls under the pattern x.x.x.1, after that the tag with the assembly of which the minor tag x.x will be sent will be calculated. Next, at one of the build steps, the number of the previous release will be received, for example x. x.x.4 which will mean that the current one will be x.x.x.5

* Add login to dockerhub

* Refactoring code

Set some variables for all rebuild-info job. Also set default values for repository and quantity variables

* Refactor: remove push trigger

* Refactoring code

* Refactor: Unlinking a version

* Submitting the latest tag for the latest release only
2023-06-29 14:50:17 +05:00
80b4014588 Merge branch release/v7.4.0 into develop 2023-06-28 07:25:32 +00:00
4ae34b4d02 Merge branch release/v7.4.0 into master 2023-06-13 11:25:57 +00:00
48add9dc89 Add the ability to enable request filtering agent (#628) 2023-05-26 18:59:54 +05:00
7d32cac40a Add new stable images versioning principles (#633)
* Refactoring stable images release versioning

The new principle of stable docker images versioning: release numbering is now not by build number, but by serial number.

* Refactoring: fix non-example image pull tag
2023-05-25 18:36:33 +05:00
989647852e Fix deprecated set-output (#632) 2023-05-24 13:51:14 +05:00
816b4823d2 Merge pull request #627 from ONLYOFFICE/release/v7.4.0
Merge release/v7.4.0 into develop
2023-05-17 14:44:26 +05:00
a97a8f0aaf Merge pull request #624 from ONLYOFFICE/hotfix/v7.3.3
Merge branch hotfix/v7.3.3 into release/v7.4.0
2023-05-15 12:01:29 +05:00
e2080865b9 Merge branch 'release/v7.4.0' into hotfix/v7.3.3 2023-05-15 12:00:20 +05:00
ad7086886c Merge branch hotfix/v7.3.3 into develop 2023-05-15 06:52:33 +00:00
8e08fed4ee Merge branch hotfix/v7.3.3 into master 2023-05-15 06:52:28 +00:00
4c5e5f20ee Revert "Trace build commands (#609)"
This reverts commit 708684ccc1.
2023-05-02 13:25:36 +05:00
708684ccc1 Trace build commands (#609)
* Trace build commands

* Small fix
2023-04-25 20:01:14 +05:00
c61323257b Use the default supervisord configuration (#608)
* Use a unix socket by default

* Use the default supervisord configuration

* Return the init.d supervisor file
2023-04-20 20:27:35 +05:00
06fe4034f0 Merge master into hotfix/v7.3.3 2023-04-18 22:39:22 +05:00
b011e73f64 Fix nginx secure link url (#604) 2023-04-18 22:34:02 +05:00
44eb6c45f2 Fix deb package link (#602) 2023-04-14 22:32:04 +05:00
4499ca1d34 Fix deb package link (#599) 2023-04-10 17:10:23 +05:00
09b9a73637 fix Bug 61960 - Add authentication for supervisord (#598) 2023-04-10 13:16:23 +05:00
f455bdf433 fix Bug 59826 - Fix database creation without onlyoffice owner (#597)
* fix Bug 59826 - Fix database creation without onlyoffice owner

* Fix an unnecessary space
2023-04-06 15:18:10 +05:00
f03bc7ec18 Add docker-compose with prometheus and grafana (#495)
* Add docker-compose with prometheus and grafana

* Add dashbord installation

* Fix path to config file
2023-03-21 15:06:05 +05:00
648ff7322f Fix the owner of the logrotate config (#591) 2023-03-17 14:25:33 +05:00
00b188d9ff Merge branch hotfix/v7.3.3 into master 2023-03-15 10:53:31 +00:00
6f716134dd Fix misprint
Instead  https://github.com/ONLYOFFICE/Docker-DocumentServer/pull/579
2023-02-22 17:41:59 +05:00
0fb195b958 Merge branch hotfix/v7.3.2 into develop 2023-02-14 07:59:59 +00:00
4636320e3b Merge branch hotfix/v7.3.2 into master 2023-02-14 07:59:56 +00:00
4c05627d1f Merge pull request #585 from ONLYOFFICE/bugfix/psql-owner
fix Bug 59826 - Fix database creation without onlyoffice owner
2023-02-07 18:53:11 +05:00
985bc4020a Fix database creation without onlyoffice owner 2023-02-07 16:08:40 +03:00
46215d4372 Merge pull request #584 from ONLYOFFICE/hotfix/v7.3.2
Merger hotfix/v7.3.2 into hotfix/v7.3.3
2023-02-07 13:02:08 +05:00
934d17b994 Fix bug #61002 (#583)
Removed unused code that was causing a build error
2023-02-07 13:00:29 +05:00
83825d26e9 Generated JWT secret is too small for HMAC SHA256 (#582)
The key that is automatically generated weaken the security strength.
As noted in RFC7518 section 3.2 [0]:
```
A key of the same size as the hash output (for instance, 256 bits for
"HS256") or larger MUST be used with this algorithm.  (This
requirement is based on Section 5.3.4 (Security Effect of the HMAC
Key) of NIST SP 800-117 [NIST.800-107], which states that the
effective security strength is the minimum of the security strength
of the key and two times the size of the internal hash value.)
```

Some JWT libraries are rejecting by default keys that are too small in
a attempt to prevent misusages so generating a key that does not respect
the minimal length can be problematic for OO integrations.

[0] https://www.rfc-editor.org/rfc/rfc7518.html#section-3.2
2023-02-07 11:02:40 +05:00
a3d7ed7ceb Install rabbitmq-server from default ubuntu repo, fixed bug closes #575 (#578)
(cherry picked from commit cac79dea01)
2023-02-03 20:23:17 +05:00
cac79dea01 Install rabbitmq-server from default ubuntu repo, fixed bug closes #575 (#578) 2023-02-02 20:41:49 +05:00
22ab86d2d6 Merge branch release/v7.3.0 into develop 2023-02-02 13:38:11 +00:00
f98d6a4ae3 Fix ucs build (#574)
Links on packages was update
2023-01-31 19:05:26 +05:00
c017ed1680 Fix stable build (#573)
Remove image present checker, because its not work corractly
2023-01-31 17:18:39 +05:00
562b248198 Merge branch release/v7.3.0 into master 2023-01-31 08:03:28 +00:00
611db1f4a9 Fix docker build by downgrading rabbit from 3.10 to 3.9 (#569) 2023-01-18 17:58:48 +03:00
8bb2ab6321 Merge pull request #565 from ONLYOFFICE/master
Merge master into release/v7.3.0
2023-01-16 12:12:09 +03:00
26f3d34ac3 Cosmetic changes README.md (#563) 2022-12-30 12:50:18 +03:00
759bed5c14 Add obligatory use of JWT parameters (#562) 2022-12-30 12:40:54 +03:00
eb643e3adb Merge pull request #561 from ONLYOFFICE/hotfix/v7.2.2
Merge branch hotfix/v7.2.2 into develop
2022-12-27 18:34:45 +03:00
19debc5181 Merge branch 'develop' into hotfix/v7.2.2 2022-12-27 18:31:52 +03:00
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
01f8337dcb Merge pull request #560 from ONLYOFFICE/feature/release-merge
Merge branch hotfix/v7.2.2 into release/v7.3.0
2022-12-20 14:16:52 +03:00
edb6e9b044 Merge branch 'hotfix/v7.2.2' into feature/release-merge 2022-12-20 13:24:55 +03:00
3fb3b2f3de Merge branch hotfix/v7.2.2 into master 2022-12-20 09:55:28 +00:00
b074535366 Fix makefile (#554) 2022-12-15 17:45:33 +03:00
b59175d13f Merge pull request #552 from ONLYOFFICE/release/v7.3.0
Merge branch release/v7.3.0 into develop
2022-12-12 15:32:25 +03:00
e5f8e69d89 Fix package url (#551) 2022-12-01 15:53:43 +03:00
574b3c92b4 Update build scripts (#550) 2022-12-01 14:46:31 +03:00
47503e6c98 Merge branch hotfix/v7.2.1 into develop 2022-11-11 11:12:56 +00:00
c7090252ff Add base image and postgresql version build arguments (#524)
(cherry picked from commit e1d7cfd5e8)
2022-10-31 19:00:18 +03:00
730dd71ac5 Add ucs build on older image version (#531)
(cherry picked from commit 92dd2833d1)
2022-10-31 19:00:03 +03:00
452dd4996d Correct the name of the docker installation variable (#536) 2022-10-31 17:52:20 +03:00
1957d38907 Actualize state of JWT variables (#535) 2022-10-31 17:38:53 +03:00
6c0c7085c9 Feature/Add supervisor services (#517)
* Add supervisor services

* Add installation of the DOCKER_INSTALLATION variable
2022-10-31 17:19:10 +03:00
cdc73fe379 Fix Bug 59481 - Fix errors when starting the container (#530)
* Update the rabbitmq version

* Fix incorrect replacement of worker_connections

* Limiting the maximum number of simultaneous connections due to possible memory shortage
2022-10-31 16:34:42 +03:00
e1d7cfd5e8 Add base image and postgresql version build arguments (#524) 2022-10-31 15:24:17 +03:00
92dd2833d1 Add ucs build on older image version (#531) 2022-10-31 11:53:24 +03:00
d98eb758b5 Fix Bug 59483 - Fix port parsing from amqp_uri (#529)
* Fix port parsing from amqp_uri

* Correct regex for port parsing
2022-10-28 16:33:41 +03:00
a3973583f8 Merge branch hotfix/v7.2.1 into master 2022-10-27 08:23:10 +00:00
fcbbe2979f Add note (#526) 2022-10-27 11:08:52 +03:00
311db051fb Disable non-example build (#525)
Co-authored-by: papacarlo <builder@onlyoffice.com>
2022-10-26 14:27:37 +03:00
46683cbc4e Merge branch hotfix/v7.2.1 into master 2022-10-20 13:12:18 +00:00
784ecca724 Merge pull request #513 from ONLYOFFICE/hotfix/v7.2.1
Merge hotfix/v7.2.1 into develop
2022-10-13 15:58:13 +03:00
1c72796657 Fix testing build tags (#512) 2022-10-13 15:50:39 +03:00
7b7e9bc66a Merge branch release/v7.2.0 into develop 2022-10-12 12:34:01 +00:00
e32047ffcc Fix bug #59310 / Fix users build (#508)
* Remove version for correct users build

* Assembly support without targetarch variable

* Remove targetarch variable

* Correcting a typo in a variable

* Small fix

Co-authored-by: Semyon Bezrukov <semen.bezrukov@onlyoffice.com>
2022-10-11 12:52:48 +03:00
ad066be1c8 Merge branch release/v7.2.0 into master 2022-09-22 12:23:12 +00:00
29bb07d2cb Fix makefile docker image (#499) 2022-09-20 14:20:10 +03:00
67fbd9d9c8 Fix makefile (#498) 2022-09-18 16:20:15 +03:00
bac88530c1 Refactoring testing build (#496)
* Fix dockerfile args

* Refactoring testing build action

* Secret repo baseurl

* Fix package version
2022-09-16 12:28:44 +03:00
b9bfa7b90c fix Bug 58778 - Correct the display of container ID for 22.04 (#494) 2022-09-13 11:08:04 +03:00
61a5a021cf Refactoring stable build (#490)
* Refactoring stable build

* Build: setting up push 4enterprise images

* Cosmetic change

* Remove needless tag

* Rename dockerfile

* Small fix

* Rename dockerfile for nonexample

Co-authored-by: danilapog <danil.titarenko@onlyoffice.com>
2022-09-12 16:04:56 +03:00
713a06e999 Add expected build arch (#489)
* Add fail status if build unexpected platforms

* Build: set exit code for action

* Build: Change expected platforms message
2022-09-08 15:56:49 +03:00
e44acbebf7 Fix KylinOS start error (#471)
* Fix KylinOS start error

* Small changes

* Small changes
2022-08-31 12:13:30 +03:00
3626f8cc6c Build: Set job fail status if some build failed (#488) 2022-08-30 14:33:23 +03:00
207bd5dac7 Add build Documentserver without example (#473)
* Add dockerfile for non-example build

* Create new symlink for supervisor config

* Add ARG for dynamic images specification

* Update action version

* Add build nonexample after stable build success

* Add targets for nonexample build

* Cosmetic changes

* Update FROM instruction

* Add default tag

* Remove needless welcome nginx location

* Change nonexample image tags

* Set correct nonexample image tag

* Change tag for nonexample image

* Change dockerfile name

* Rename dockerfile for release images

* Move stable build to dockerfile

* Refactoring bake file
2022-08-29 11:40:25 +03:00
3d7ac29ee1 Merge pull request #487 from ONLYOFFICE/release/v7.2.0
Merge release/v7.2.0 into develop
2022-08-24 12:49:04 +03:00
2379128240 fix build (#486) 2022-08-24 12:47:47 +03:00
bd4908d7c8 Merge pull request #485 from ONLYOFFICE/release/v7.2.0
Merge release/v7.2.0 into develop
2022-08-24 11:39:22 +03:00
083ab2c6a6 Add latest tag for develop build (#484) 2022-08-24 11:14:59 +03:00
34180710cf Fix command to get container id (#483) 2022-08-22 20:56:45 +03:00
8887cb7a26 Enable JWT by default and add a JWT status message (#482)
* Enable JWT by default and add a JWT status message

* Correct JWT message

* Add a condition for displaying a JWT message

* Minor correction

* Minor correction
2022-08-22 20:27:10 +03:00
8a4525cb80 Merge pull request #478 from ONLYOFFICE/release/v7.2.0
Merge release/v7.2.0 into develop
2022-08-17 09:45:05 +03:00
05c5042985 Add the missing variable (#467) 2022-07-22 09:44:59 +03:00
2213fc70f5 Add another tags processing (#464)
* Add support for processing other tags

* Print build-info before build start

* Cosmetic changes

* Add architecture and URL processing

* Refactoring action code

* Refactoring code

* Refactoring code

* Cosmetic changes

* Remove some check package version

* Refactoring code

* Redefining url variable for dockerfile

* Cosmetic changes

* Changes platform conditions check

* Set to use default TARGETARCH in build
2022-07-21 18:44:06 +03:00
06a05223b5 Fix bug #58032 / Fix moves certificates alarm messages (#461)
* Add some checks before replace certificates

* Change if check key

* Refactoring code

* Refactoring code

* Add checking exist files

* Refactor: refactoring code

* Remove check files conditions
2022-07-19 15:51:46 +03:00
143e77fdfc Fix Big #57286 / Add redis password config settings (#466)
* Add redis password settings

* Add variable description

* Change variable descriptions

* Change variable descriptions

* Change variable descriptions
2022-07-18 17:11:06 +03:00
8acbfdbeb7 Merge branch hotfix/v7.1.1 into release/v7.2.0 2022-07-18 10:02:02 +00:00
73ec78a7da Merge pull request #463 from ONLYOFFICE/release/v7.2.0
Mergre release/v7.2.0 into develop
2022-07-13 10:53:49 +03:00
46cd6febae Merge pull request #462 from ONLYOFFICE/hotfix/v7.1.1
Merge hotfix/v7.1.1 into develop
2022-07-13 10:52:43 +03:00
c16635ea71 Fix supervisor socket messages (#459) 2022-07-12 12:37:48 +03:00
29e4ec3027 Refactoring workflow (#448) 2022-07-11 13:27:43 +03:00
c7a1fd04a4 fix Bug 50138 / Fix SSL key access error (#455)
* Fix SSL key access error

* Change name of directory
2022-07-05 14:56:42 +03:00
c4ddb99710 Update base image version (#447) 2022-07-05 14:41:20 +03:00
9494e08e8f Fix for redis correct work (#449)
* Fix for redis correct work

* Refactoring code

* Refactoring code

* Refactoring code

* Refactor: refactoring code
2022-06-15 10:30:18 +03:00
86cbb01bbf Add short tags for released images (#446)
* Add short tags for images

* Edit workflow tags
2022-06-10 15:43:50 +03:00
a6562f4017 Add multiarch build with action (#445)
* Update run-document-server.sh (#439)

* Revert "Update run-document-server.sh (#439)"

This reverts commit 5c17c711b1.

* Add bake config

* Add targets for multiarch build

* Add multiarch workflows

* Cosmetic changes

* Refactoring

* Cosmetic changes

* Cosmetic changes

* Change URL for test repo

* Refactor: refactoring code

* Refactoring sed

* Remove -ie build

* Add special tag for package

* Cosmetic changes

Co-authored-by: papacarlo <builder@onlyoffice.com>
Co-authored-by: Roger Shieh <sh.rog@protonmail.ch>
Co-authored-by: Alexey Golubev <alexey.golubev@onlyoffice.com>
2022-06-09 13:27:39 +03:00
01606746c1 Fix Bug 53170 / Add the ability to set secure_link_secret (#444)
* Add securelink generation

* Add ability to configure securelink_secret

* Add a description of SECURE_LINK_SECRET

* Update README.md
2022-06-07 16:16:05 +03:00
558353ee99 Merge branch hotfix/v7.1.1 into master 2022-06-01 16:22:20 +00:00
19b66de202 Revert "Update run-document-server.sh (#439)"
This reverts commit 5c17c711b1.
2022-05-26 17:03:57 +03:00
5c17c711b1 Update run-document-server.sh (#439) 2022-05-24 18:02:42 +03:00
61d388372b Merge branch release/v7.1.0 into develop 2022-05-16 12:57:21 +00:00
95e27e2655 Merge branch release/v7.1.0 into master 2022-05-12 13:21:23 +00:00
452dfeb56d Fix bug #56785 (#434)
* Fix bug #56785

* Changes for root
2022-04-29 14:57:14 +03:00
80acbe974d Fix bug #53046 : sed error starting container on Arch (#433) 2022-04-29 14:55:25 +03:00
4fb0a1e712 Improve SSL certificate detection (#431) 2022-04-25 17:25:19 +03:00
39d2e303f1 Fix disabling JWT 2022-04-12 19:00:46 +03:00
decb1ed860 Merge branch hotfix/v7.0.2 into release/v7.1.0 2022-04-05 12:27:33 +00:00
a830c53218 Merge branch hotfix/v7.0.2 into develop 2022-04-05 12:27:30 +00:00
bb160d345e Merge branch hotfix/v7.0.1 into release/v7.1.0 2022-03-23 10:29:52 +00:00
3cf36a79cc Merge branch hotfix/v7.0.1 into develop 2022-03-23 09:49:22 +00:00
e17831904d Merge branch hotfix/v7.0.1 into master 2022-02-22 08:17:41 +00:00
21f5019e1c Initialliaze services.CoAuthoring.redis before attempting to set a child to a value (#404)
Co-authored-by: papacarlo <builder@onlyoffice.com>
2022-02-09 10:37:52 +03:00
b2e720e66c Fix broken links to Docker-CommunityServer (#402)
Continue of #400

Those links became incorrect in
e7c8e59a37

I'm not sure that we REALLY need those links in this project, maybe just
give links to README page and that's it
But leaving it as it is
2022-01-31 11:18:50 +03:00
4c959d62b7 Merge branch release/v7.0.0 into release/v7.1.0 2022-01-17 14:34:38 +00:00
c5fb8f1fe0 Merge branch release/v7.0.0 into develop 2022-01-17 14:34:35 +00:00
973409cc8f Merge branch release/v7.0.0 into master 2022-01-17 14:34:33 +00:00
33faf622c8 Merge branch hotfix/v6.4.2 into release/v7.0.0 2021-10-28 07:33:57 +00:00
44a96b1fde Merge branch hotfix/v6.4.2 into develop 2021-10-28 07:33:55 +00:00
26ef312557 Merge branch hotfix/v6.4.1 into release/v6.5.0 2021-09-30 12:21:08 +00:00
2eb99ffb20 Merge branch hotfix/v6.4.1 into develop 2021-09-30 12:21:03 +00:00
ca39675055 Merge branch hotfix/v6.4.1 into master 2021-09-28 08:08:26 +00:00
a31a579d24 Add WOPI_ENABLED variable (#379)
* Add WOPI_ENABLED variable

* Add var description
2021-09-14 17:53:37 +03:00
32a8a24a0f Update README.md (#377) 2021-09-14 17:42:55 +03:00
0613f8a0ca Merge branch release/v6.4.0 into develop 2021-08-26 13:55:56 +00:00
a23477301e Merge branch release/v6.4.0 into master 2021-08-26 11:40:24 +00:00
d654094671 Merge branch hotfix/v6.3.1 into release/v6.4.0 2021-07-15 13:14:47 +00:00
93a0526a7c Merge branch hotfix/v6.3.1 into develop 2021-07-15 13:14:43 +00:00
5bf1ff715f Remove server version of spell checker (#365) 2021-06-22 09:59:50 +03:00
c6e7d68016 Fix docker targets (#361)
* Fix docker targets

* Fix docker latest tag
2021-06-01 17:29:31 +03:00
13a01e7c56 Merge branch release/v6.3.0 into develop 2021-05-20 12:08:20 +00:00
3b830417a2 Merge branch release/v6.3.0 into master 2021-05-20 12:08:15 +00:00
245659807a Merge branch hotfix/v6.2.2 into release/v6.3.0 2021-05-07 13:27:20 +00:00
2f26419ac7 Merge branch hotfix/v6.2.2 into develop 2021-05-07 13:25:56 +00:00
67df644858 Precise info about table existance (#355) 2021-04-29 12:14:31 +03:00
ca6b3a67a3 Merge branch hotfix/v6.2.2 into master 2021-04-19 12:18:58 +00:00
f2c708cff2 Reset database tables on update (#351)
* Reset database tables on update

* Add changes

* Add changes

* Add changes

* Add changes

* Add changes

* Add changes
2021-04-14 17:10:38 +03:00
2f26cea790 Fix #347 (#349) 2021-04-01 10:07:07 +03:00
30c5612cfb Merge branch hotfix/v6.2.1 into release/v6.3.0 2021-03-31 11:27:32 +00:00
cbb749d77c Merge branch hotfix/v6.2.1 into develop 2021-03-31 11:27:26 +00:00
1cfe84b8b8 Fix automatic port detection for database (#341) 2021-03-19 16:20:52 +03:00
30ca844513 Merge branch release/v6.2.0 into release/v6.3.0 2021-03-19 07:54:45 +00:00
c611b2b080 Merge branch release/v6.2.0 into develop 2021-03-18 15:22:47 +00:00
9dc5f5d993 Merge branch release/v6.2.0 into master 2021-03-01 08:47:27 +00:00
393006d306 Add pull ubuntu image (#334) 2021-02-24 18:34:03 +03:00
ea0fcf3951 Merge branch hotfix/v6.1.1 into develop 2021-01-28 08:28:05 +00:00
cbff89bdea Merge pull request #323 from ONLYOFFICE/hotfix/v6.1.1
Merge hotfix/v6.1.1 into release/v6.2.0
2020-12-25 11:31:19 +03:00
9676e7aac1 Merge branch release/v6.1.0 into develop 2020-12-24 07:52:11 +00:00
e7d2cc2cd5 Edit s3 paths (#319)
* Edit s3 paths

* DocumentServer installed by url

* Fix install recommends
2020-12-16 11:39:05 +03:00
93740b7c37 Merge branch release/v6.1.0 into master 2020-12-08 07:07:57 +00:00
d26fd0d234 Merge branch hotfix/v6.0.2 into release/v6.1.0 2020-12-07 14:38:53 +00:00
fd7e1a926a Merge branch hotfix/v6.0.2 into develop 2020-12-07 14:38:43 +00:00
4cc63380f2 Merge branch release/v6.1.0 into master 2020-12-01 07:51:32 +00:00
eddbbbf3eb Fix unsupported rabbitmq ver. Use 20.04 as base. (#307)
* Fix unsupported rabbitmq ver. Use 20.04 as base.

* Extend timeout for test (#311)

* test01

* Timeout

* Small changes

* Change timeout to 90

Co-authored-by: Roman Demidov <roman.demidov@onlyoffice.com>
2020-11-20 10:53:36 +03:00
326a005ac7 Fix empty lets encrypt params error (#310) 2020-11-18 10:46:19 +03:00
cd02cd6deb Merge pull request #309 from zhaofengli/netcat-ipv6
Use netcat-openbsd for IPv6 support
2020-11-09 14:05:04 +03:00
94c64d3f6d Use netcat-openbsd for IPv6 support 2020-11-08 23:38:31 -08:00
f85ac8c510 Merge branch hotfix/v6.0.1 into release/v6.1.0 2020-10-28 14:31:41 +00:00
0ed3f8fbbf Merge branch hotfix/v6.0.1 into develop 2020-10-28 14:31:31 +00:00
9e63609c14 Fix custom db name bug (#304)
Co-authored-by: papacarlo <builder@onlyoffice.com>
2020-10-27 13:50:48 +03:00
bdef500858 Allow let's encrypte sertificates (#300)
* Allow let's encrypte sertificates

Co-authored-by: papacarlo <builder@onlyoffice.com>
Co-authored-by: Roman <demidov.roman@onlyoffice.com>
2020-10-22 13:47:51 +03:00
211ae50980 Fix #281: Add option to disable CPU-heavy tasks on startup (#293)
* Fix #281: Add option to disable CPU-heavy tasks on startup

* Update README.md

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>

* Update README.md

Co-authored-by: Roman <demidov.roman@onlyoffice.com>
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2020-10-20 16:14:55 +03:00
a231d7992a Update README.md (#301)
- add info on OO Docs & OO Workspace
2020-10-16 16:48:43 +03:00
26854106a3 Add consent to the fonts license (#297)
* Add concent to the fonts license

* Small changes

* Small changes

Co-authored-by: papacarlo <builder@onlyoffice.com>
Co-authored-by: Roman <demidov.roman@onlyoffice.com>
2020-10-08 15:58:07 +03:00
85158c3624 Merge branch release/v6.0.0 into develop 2020-09-30 15:15:35 +00:00
f24908eb7a Merge branch release/v6.0.0 into master 2020-09-30 15:15:26 +00:00
1956f98c1d Fixes exit procedure. (#286) 2020-09-10 17:02:20 +03:00
ecb77ddb56 Add more travis tests (#289)
* Add version variable for travis tests

* Fix typo

* Fix activemq variable

* Add travis tests

* Remove mysql latest

* Fixes & refactoring

* Add more travis tests

* Remove mysql 8 test

* Remove mysql 8 test [2]

* Add mysql 8 comment

* Fix mysql 8 auth plugin

Co-authored-by: Alexey Golubev <alexey.golubev@onlyoffice.com>
2020-09-10 16:57:21 +03:00
d3e5246e9a Merge branch hotfix/v5.6.4 into release/v6.0.0 2020-09-08 08:31:06 +00:00
380ac3e227 Merge branch hotfix/v5.6.4 into develop 2020-09-08 08:30:56 +00:00
16107fd3ba Update README.md (#283) 2020-08-17 16:08:52 +03:00
ee126870b2 Merge branch hotfix/v5.6.2 into release/v6.0.0 2020-08-07 08:17:06 +00:00
abe349dad9 Merge branch hotfix/v5.6.2 into develop 2020-08-07 08:16:55 +00:00
ac0c135ded Merge branch hotfix/v5.6.1 into release/v6.0.0 2020-08-05 09:39:37 +00:00
c5d15c3be7 Merge branch hotfix/v5.6.1 into develop 2020-08-05 09:39:26 +00:00
79e627e080 Merge branch hotfix/v5.6.1 into master 2020-08-05 09:39:15 +00:00
dd5cde1919 Fix unary operator expected (Bug 45985) 2020-07-31 18:09:51 +03:00
c47a310683 Fix unary operator expected (Bug 45985) (#270) 2020-07-30 11:54:46 +03:00
0d974b9f2a Merge branch hotfix/v5.6.0 into release/v6.0.0 2020-07-28 13:48:40 +00:00
be27b2b4d6 Merge branch hotfix/v5.6.0 into develop 2020-07-28 13:48:30 +00:00
98f96d1795 Merge branch hotfix/v5.6.0 into master 2020-07-28 13:48:20 +00:00
7bfe250035 Add Graphite (#265) 2020-07-23 15:42:17 +03:00
e47d6d8c1a Add several attempts for docker push (#258)
* Add several attempts for docker push

* Fix retries, add delay
2020-06-17 11:24:52 +03:00
7193b651ec Add test for Integration Edition (#256)
* Add test for Integration Edition

* Add test for Community Edition

* Fix tests for redis

* Fix edition test

* Rename test
2020-06-04 17:24:07 +03:00
62424ea120 Disable redis server for Community Edition (#255)
* Disable redis server

* Add REDIS_ENABLED variable

* Fix Dockerfile

* Fix REDIS_ENABLED condition
2020-06-04 15:15:34 +03:00
c2bcd00322 v5.5.3 2020-05-22 11:25:18 +03:00
91815ac24a v5.5.3 2020-05-22 11:21:42 +03:00
f6b5017b4a Rename cert & key files (#245)
* New cert files default names

* Add certs travis test

* Add certificate generation

* Fix certs test

* Fix cert gen

* Fix directory mapping

* Fix https healthcheck

* Add test for old cert path

* Fix script & test

* Fix port number

* Code refactoring

* Fix old cert test

* Code refactoring

* Fix certs test names

* Remove unnecessary test
2020-04-29 19:48:33 +03:00
ab5637a11f Update travis tests (#243)
* Remove docker .env file

* Add enviroment variables defaults

* Update docker-compose version

* Update travis tests variables

* Build document server image

* Fix mariadb

* Fix variable names

* Revert container name

(cherry picked from commit e721ca102d)
2020-04-28 15:23:27 +03:00
e721ca102d Update travis tests (#243)
* Remove docker .env file

* Add enviroment variables defaults

* Update docker-compose version

* Update travis tests variables

* Build document server image

* Fix mariadb

* Fix variable names

* Revert container name
2020-04-28 15:05:35 +03:00
4a38d6faeb v5.5.2 2020-04-27 17:01:52 +03:00
96c0bc432d v5.5.1r2 2020-04-15 14:18:32 +03:00
9d82bb8d1f v5.5.1 2020-04-09 12:40:20 +03:00
048a888836 Add docker-compose cluster example 2020-04-01 18:54:11 +03:00
a51dc61276 Fix db folder mapping for custom build 2020-04-01 12:11:57 +03:00
95c59ed2cd Remake docker-compose file 2020-03-27 18:44:56 +03:00
b72b401e67 Fix #234 (#235) 2020-03-25 12:19:47 +03:00
37c058d281 Add mariadb test 2020-03-16 16:20:36 +03:00
e361537d32 Fix postgres test
See details: https://github.com/docker-library/postgres/issues/681
2020-03-12 14:07:20 +03:00
51b371ff3c Merge pull request #228 from NorseGaud/create_postgresql_tbl-grep-fix
Fix for create_postgresql_tbl grep throwing a failure
2020-03-05 14:17:35 +03:00
cc4b0f3b14 Merge branch 'hotfix/v5.5.1' into create_postgresql_tbl-grep-fix 2020-03-05 14:16:49 +03:00
75b2232733 Merge pull request #229 from hoh/patch-1
Fix insecure http:// urls in README
2020-03-05 14:12:58 +03:00
a553f2eafb Merge branch 'master' into patch-1 2020-03-05 13:39:44 +03:00
82c24e6b4c v5.5.0 2020-03-04 18:33:54 +03:00
dbab7c36b5 v5.5.0 2020-03-04 18:09:03 +03:00
438a41a933 Fix #44534 2020-02-25 13:54:23 +03:00
a21313bb39 Fix insecure http:// urls in README
Many links in the README are using `http://` instead of `https://`, including the link to download the `Community Edition Docker script file`, which is then meant to be executed using bash and could allows an adversary to make the user execute arbitrary code.
2020-02-23 14:07:27 +01:00
43010e1bd2 fix for create_postgresql_tbl grep so it stops throwing a failure 2020-02-22 19:15:48 -05:00
9a2d10ceea Fix build error
The following packages have unmet dependencies:
 curl : Depends: libcurl4 (= 7.58.0-2ubuntu3.8)
 but it is not going to be installed
2020-02-21 16:29:49 +03:00
33d04dc4f4 Remove nodejs dependency 2020-02-21 14:58:20 +03:00
4468a26a3e Change dependency gtk2->gtk3 2020-02-19 19:54:20 +03:00
b639a8ef89 Fix build error 2020-02-17 12:25:38 +03:00
efe1d8482f Fix browser 'wasm' warning
Fix browser  warning:
 wasm streaming compile failed: TypeError: Failed to execute 'compile' on 'WebAssembly': Incorrect response MIME type. Expected 'application/wasm'.
2020-02-14 17:18:04 +03:00
586d1078e6 Create folder for pkg example 2020-02-12 13:42:04 +03:00
6b81686cf6 Fix deploy to docker hub 2020-01-31 17:27:31 +03:00
f241f36893 Add abbility customize docker build 2020-01-31 13:33:25 +03:00
9eff99f618 Remake fix #96 2019-12-26 13:14:51 +03:00
df8e19ed90 Update postgersql version 2019-12-26 13:14:51 +03:00
8988247232 Change base image to ubuntu 18.04 2019-12-26 13:14:51 +03:00
3ff96e8b49 Fix 'JWT_IN_BODY' param parsing 2019-12-25 17:25:57 +03:00
a6cda6537b Add redis test (#206) 2019-12-23 18:45:37 +03:00
08bb07e2d0 Rename AMQP variables (#205) 2019-12-23 18:45:37 +03:00
be9f986578 Add redis test (#206) 2019-12-23 15:59:14 +03:00
d59136d477 Rename AMQP variables (#205) 2019-12-23 12:27:47 +03:00
ee8fa827e3 Add external volumes for rabbitmq and redis (#203) 2019-12-20 13:15:59 +03:00
261232e10d Move from unsupported node.js version 2019-12-16 18:28:50 +03:00
2b982778f3 fix issue #96 ; 'Download failed' after upgrade to onlyoffice (#191)
* fix issue #96 ; 'Download failed' after upgrade to onlyoffice - unable to verify the first certificate

* New variable name REJECT_UNAUTHORIZED_STORAGE

Shell variable rnamed to REJECT_UNAUTHORIZED_STORAGE.
2019-12-05 19:18:36 +03:00
66a293e79d Merge pull request #198 from ONLYOFFICE/hotfix/v5.4.2
v5.4.2
2019-11-29 15:17:45 +03:00
f4c0bd13b2 Merge branch 'develop' into hotfix/v5.4.2 2019-11-29 15:16:41 +03:00
f18d04f406 Fix commands on welcome page (#197) 2019-11-28 14:59:20 +03:00
8e1a52566f v5.4.2 2019-11-27 12:23:13 +03:00
b3055c362c Add support JWT_IN_BODY param (#194) 2019-11-27 11:35:08 +03:00
18b8dbe4fe Fix RabbitMQ high CPU usage on idle VM (#193) 2019-11-26 17:08:29 +03:00
7d1606bc95 Add support of MySQL DBMS (#188)
* Add support of MySQL database
2019-10-29 12:42:43 +03:00
03a96d3765 Add target for deploy docker images to s3 2019-10-21 15:18:04 +03:00
d7833f454b Enable ds path customization 2019-10-21 11:51:06 +03:00
b590340a10 v5.4.1 2019-10-02 12:07:22 +03:00
c2b6187926 v5.4.1 2019-10-02 12:02:37 +03:00
db01421f8a Fix #183 2019-09-25 17:49:18 +03:00
77d47eec3d Fix #175 (#184) 2019-09-24 12:55:24 +03:00
ba14b959ce v5.4.0 2019-09-03 14:37:37 +03:00
acc4da29d5 Remove sudo 2019-08-19 14:04:56 +03:00
93a69e601d Specify POSTGRESQL_SERVER_PORT for new databases (#170) 2019-07-12 02:15:37 -07:00
87aa987e36 v5.3.2 2019-06-21 18:15:04 +03:00
9b51b1dd7a v5.3.1 2019-06-06 12:33:52 +03:00
d34297b159 v5.3.1 2019-06-06 12:32:18 +03:00
89c883646d Fix bug #164 2019-05-29 16:26:22 +03:00
2a78e2f6fa Fix bug #163 2019-05-29 15:34:58 +03:00
b752010202 v5.3.0 2019-05-27 17:21:45 +03:00
3f7630c34c v5.3.0 2019-05-27 17:05:18 +03:00
2d6a4e0908 Fix crash on system without ipv6 2019-05-21 16:26:10 +03:00
5031b7f983 Update Readme.md
- UTMs added to website links in Project information
- Link to solutions comparison added to Project information
2019-05-16 13:15:17 +03:00
796fce01cd Fix setup amqp type 2019-03-22 12:46:11 +03:00
2c44e3833d Change setup amqp server type 2019-03-22 12:46:11 +03:00
f999dd4214 Cosmetic 2019-03-22 12:46:11 +03:00
ad4b496181 Rename AMQP_SERVER_ENGINE->AMQP_SERVER_TYPE 2019-03-22 12:46:11 +03:00
b47a70582a Fix setup amqp type 2019-03-07 15:21:52 +03:00
2a96d3c5f0 Change setup amqp server type 2019-03-06 12:30:54 +03:00
c22686d264 Cosmetic 2019-03-05 18:14:50 +03:00
1fe33f849f Rename AMQP_SERVER_ENGINE->AMQP_SERVER_TYPE 2019-03-05 18:12:54 +03:00
88f33c5d8f Add AMQP_ SERVER_ params descriptions 2019-02-25 19:51:34 +03:00
f0af6fe971 Switch to local json 2019-02-15 15:10:19 +03:00
3642403457 Rebranding config file name 2019-02-14 16:16:28 +03:00
45ce3d40ab Add activemq sample 2019-02-14 13:03:31 +03:00
f8180d1343 Add amqp server params 2019-01-28 15:51:20 +03:00
fbc9f8d208 v5.2.6 2018-12-25 12:02:21 +03:00
bb24a80deb v5.2.4 2018-12-11 16:10:23 +03:00
10d54591de v5.2.4 2018-12-11 16:07:08 +03:00
96c37d7312 Fix log rotation 2018-11-20 17:07:20 +03:00
26f7126cb0 Fix #138 2018-11-15 12:11:35 +03:00
e430c76d51 Fix #134 2018-11-06 17:18:02 +03:00
1ff3e1def6 Fix #133 2018-11-02 11:53:06 +03:00
c266215700 v5.2.3 2018-10-30 13:01:35 +03:00
0154bb08e0 v5.2.3 2018-10-30 12:58:37 +03:00
2b2f409edf Fix issue #92
Thanks to @snorre-k
See:
https://github.com/ONLYOFFICE/Docker-DocumentServer/issues/92#issuecomment-431655508
In short - on some Linux system (Ubuntu at least)
it container stopped - /var/run/rabbitmq dir is not cleared up.
Need to manually clear it on start.
2018-10-22 14:20:40 +03:00
23d320dc2a Fix minishift startup 2018-10-02 19:36:14 +03:00
0effd2b6b8 Setup logrotate config rights 2018-10-02 15:16:50 +03:00
cc055305c1 release/v5.2.0 2018-09-27 19:10:35 +03:00
3696139db2 release/v5.2.0 2018-09-27 19:07:43 +03:00
2c4668d9e3 Update nodejs to version 8.x 2018-08-27 15:47:16 +03:00
9ad9bc8aca Use boolean type for JWT_ENABLED 2018-07-19 16:20:20 +03:00
ae78df1e24 v5.1.5 2018-07-17 17:45:58 +03:00
140931bb62 v5.1.5 2018-07-17 17:08:49 +03:00
520352dec2 Add cron start up to enable log rotation 2018-06-25 14:58:40 +03:00
d5e18c29b7 Add issue templates 2018-06-21 17:43:15 +03:00
9796bd62c6 v5.1.4 2018-05-24 15:34:46 +03:00
4c8bac99c6 v5.1.4 2018-05-24 15:32:34 +03:00
a30463822e Disable install unauth app 2018-05-17 16:22:43 +03:00
cf923c57bc Supress tail directory warnings 2018-05-04 19:31:10 +03:00
01fbb9f231 Use local.json to read settings 2018-05-04 11:56:18 +03:00
9a21a9ab27 Feature/fix package update (#102) 2018-04-26 19:33:42 +03:00
d725cd42a2 Define '**' behavior explicitly (#100)
If globstar is set and  if the pattern '**' is followed by a ‘/’, only directories and subdirectories match.
2018-04-21 12:14:26 +03:00
904b8ef165 Merge pull request #99 from mandusm/ugly-hack-#68
Fixes #68 in a hacky way
2018-04-13 12:58:55 +03:00
670f1bdf68 Fixes #68 in a hacky way 2018-04-12 21:41:24 +00:00
96b98337a8 Added info about correct server restart 2018-04-12 15:06:23 +03:00
d82b075ec3 v5.1.2 2018-04-11 14:28:00 +03:00
d84f8a2fed v5.1.1 2018-04-05 15:56:58 +03:00
d613f02ec2 v5.1.1 2018-04-05 15:55:18 +03:00
edf8e51856 Prevent ds crash by wrong pg rights 2018-04-03 19:39:11 +03:00
ac1e741f87 Merge pull request #90 from ProgVal/patch-1
Use a long keyid for Onlyoffice's Debian repo
2018-04-02 17:18:51 +03:00
c4f20cf8ca Use a long keyid for Onlyoffice's Debian repo
Short keyids are easy to spoof, making the GPG signature verification of packages ineffective against most attackers. See https://evil32.com/
2018-03-31 08:36:10 +02:00
974fce146f v5.1.0 2018-03-28 12:09:00 +03:00
8a02d9fbe4 v5.1.0 2018-03-28 12:06:40 +03:00
1546c72cf0 Remove unused code 2018-03-02 18:07:51 +03:00
56c0805754 Remove font dependency 2018-03-02 18:00:21 +03:00
b2d8ce41f4 Move turning on gzip to the run script 2018-01-29 11:56:51 +03:00
3f3a493507 Turn on static gzip 2018-01-24 13:02:26 +03:00
428b616681 Add detailed message for msttcorefonts failed to download
This is workaround of https://bugs.launchpad.net/ubuntu/+source/msttcorefonts/+bug/1465721
2017-12-19 15:02:48 +03:00
89fd259804 update base image version to 16.04 2017-12-12 17:02:14 +03:00
f541c97720 Merge pull request #85 from ONLYOFFICE/ShockwaveNN-patch-1
Since v4.0 Documentserver not use `mono` in any form
2017-12-04 15:07:58 +03:00
7ce422f662 Since v4.0 Documentserver not use mono in any form 2017-12-04 14:27:22 +03:00
e0a4fc60ab Fixed default welcome page 2017-11-29 14:37:21 +03:00
2060a03b2c Remove unused code 2017-11-29 13:06:55 +03:00
5fbfe49fbd Change nginx config path 2017-11-29 12:52:57 +03:00
ea505411e8 v5.0.5 2017-11-27 17:08:25 +03:00
2461d07035 v5.0.4 2017-11-13 17:46:10 +03:00
0d6fdee656 v5.0.4 2017-11-13 17:44:36 +03:00
e2a60ff07c Change default product name 2017-11-10 15:11:15 +03:00
355ae98867 Setup rights for mapped folders. 2017-11-10 15:10:52 +03:00
36f036d951 v5.0.3 2017-10-31 18:51:20 +03:00
42a7abffb8 v5.0.3 2017-10-31 18:49:25 +03:00
9cceb81469 Merge pull request #77 from ONLYOFFICE/feature/bugfix-issue76
Fixed bug #76
2017-10-23 17:32:05 +03:00
ae259d64e5 Merge 2017-10-13 14:44:53 +03:00
417d62e8d4 Fixed bug #76
Bug on launchpad.net:
https://bugs.launchpad.net/ubuntu/+source/msttcorefonts/+bug/1465721
2017-10-12 18:47:47 +03:00
bbf336a980 v5.0.1 2017-10-05 14:48:06 +03:00
3efb68e169 v5.0.1 2017-10-05 14:46:28 +03:00
990a0ab127 Set NGINX_WORKER_PROCESSES=1 by default 2017-09-20 17:25:38 +03:00
306926402c v5.0.0 2017-09-19 17:28:44 +03:00
7f8c4fd3e8 v5.0.0 2017-09-19 17:04:56 +03:00
5a0a4be801 Merge pull request #72 from ONLYOFFICE/feature/jwt-description
Added description to jwt params
2017-09-12 11:50:02 +03:00
9559beeddf Added description to jwt params 2017-09-11 19:02:19 +03:00
1e012972c9 Merge pull request #71 from ONLYOFFICE/feature/jwt
Added jwt setup to example
2017-09-06 17:23:32 +03:00
6cf41fa955 Added jwt setup to example 2017-09-06 17:21:52 +03:00
bcdf1ebd78 Merge pull request #70 from ONLYOFFICE/feature/jwt
Added jwt params
2017-09-01 17:30:59 +03:00
ef8826aca4 Added jwt params 2017-09-01 16:59:34 +03:00
914ffa6de2 Merge pull request #67 from ONLYOFFICE/alexandervnuchkov-patch-1
Update README.md
2017-08-04 17:07:43 +03:00
716a85ef6d Update README.md 2017-08-04 14:02:42 +03:00
58f6e1cc8e Update README.md 2017-08-04 13:37:13 +03:00
b3bb7ec642 Merge pull request #66 from ONLYOFFICE/feature/fix-description
Update README.md
2017-07-28 11:36:51 +03:00
f52ad9f804 Update README.md 2017-07-27 11:41:30 +03:00
64f3e1b19b Merge tag 'v4.4.1' into develop
v4.4.1
2017-07-05 11:47:38 +03:00
20063dfe03 Merge branch 'release/v4.4.1' 2017-07-05 11:47:08 +03:00
b663638b95 Merge pull request #62 from ONLYOFFICE/feature/optimize-dockerfile
Minor Dockerfile optimization
2017-06-21 11:34:53 +03:00
dd9583498a Split long apt-get and sort it 2017-06-20 19:08:07 +03:00
810d49fd53 Remove specific version of update-notifier-common
Bug was fixed
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1683713
2017-06-20 18:54:59 +03:00
91c987705c Merge pull request #61 from ShockwaveNN/patch-1
Use COPY instead of ADD
2017-06-20 18:18:10 +03:00
f859561507 Use COPY instead of add
According to https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#add-or-copy
It's prefered to use COPY if no need to extract tars
2017-06-20 17:31:20 +03:00
5c15c04ebe Merge tag 'v4.3.5' into develop
v4.3.5 v4.3.5
2017-06-05 16:48:05 +03:00
c2117fce29 Merge branch 'hotfix/v4.3.5' 2017-06-05 16:46:11 +03:00
d2003e9516 Merge pull request #53 from ShockwaveNN/patch-1
Change `MAINTAINER` line to `LABEL`
2017-05-23 11:10:07 +03:00
3f8ac6ee7e Change MAINTAINER line to label
According to https://docs.docker.com/engine/reference/builder/#maintainer-deprecated
`MAINTAINER` is deprecated, and `LABEL maintainer` should be used, since it give more flexebility
2017-05-22 11:49:46 +03:00
e0686e5927 Merge pull request #52 from ONLYOFFICE/feature/ssl-simple
Changes for simple config
2017-05-19 15:15:54 +03:00
af131c3007 debug 2017-05-17 17:44:25 +03:00
9f1048c9f7 Setup default params for make 2017-05-17 17:43:24 +03:00
dfceae2523 Added log level configuration parameter 2017-05-17 17:41:13 +03:00
c3c6a356d7 Cosmetic 2017-05-17 16:35:54 +03:00
d9003c5bae Merge pull request #49 from ONLYOFFICE/feature/ssl-simple
Changes for simple config
2017-05-12 16:58:40 +03:00
32e1c4b1cc Changes for simple config 2017-05-12 16:51:22 +03:00
a96a5f7048 Merge tag 'v4.3.3' into develop
v4.3.3 v4.3.3
2017-04-28 12:44:04 +03:00
47f2766920 Merge branch 'hotfix/v4.3.3' 2017-04-28 12:44:02 +03:00
8ae9329c8e Added pwgen 2017-04-26 19:03:42 +03:00
61a56eb31e Removed unused code 2017-04-25 16:09:38 +03:00
1b8b77c03b Merge pull request #46 from ONLYOFFICE/feature/mount-var-lib
Feature/mount var lib
2017-04-25 15:09:45 +03:00
452b31f235 Merge pull request #45 from ONLYOFFICE/feature/mount-var-lib
debug
2017-04-25 14:30:50 +03:00
f59f75fd69 debug 2017-04-25 14:29:24 +03:00
be8d335063 Merge pull request #44 from ONLYOFFICE/feature/mount-var-lib
Feature/mount var lib
2017-04-24 20:04:31 +03:00
2fd4086173 Added /var/lib/postgresql volume 2017-04-24 20:02:01 +03:00
89ad87d538 Merge pull request #42 from dienteperro/patch-1
Update README.md
2017-04-21 11:55:10 +03:00
853f2b4de8 Update README.md 2017-04-19 17:04:19 -04:00
77f7b813f7 Fixed installation ttf-mscorefonts-installer 2017-04-18 14:31:05 +03:00
ced029b304 Merge tag 'v4.3.2' into develop
v4.3.2 v4.3.2
2017-04-17 14:58:59 +03:00
278bdd870e Merge branch 'hotfix/v4.3.2' 2017-04-17 14:58:56 +03:00
0d8f2ed1a7 Fixed missprint 2017-04-12 14:46:06 +03:00
a0cc6ab7ba Merge tag 'v4.3.1' into develop
v4.3.1 v4.3.1
2017-04-05 17:58:26 +03:00
3e86381bb8 Merge branch 'hotfix/v4.3.1' 2017-04-05 17:58:23 +03:00
57759c43d9 Update README.md 2017-04-05 12:26:27 +03:00
7a14e43467 Merge pull request #37 from HenriWahl/master
Added import of /var/lib/onlyoffice
2017-04-05 12:24:30 +03:00
f3d9d9b9f9 Added import of /var/lib/onlyoffice 2017-04-05 11:11:54 +02:00
84bbcd78b7 Fixed tag for release and hotfix 2017-04-04 11:06:22 +03:00
468420cfcd Update 'latest' tag only for develop build 2017-04-03 14:34:21 +03:00
d31b9e8454 Merge tag 'v4.3.0' into develop
v4.3.0
2017-04-03 12:57:15 +03:00
adf29bc63b Merge branch 'release/v4.3.0' 2017-04-03 12:56:49 +03:00
ac86f08696 Merge tag 'v4.2.11' into develop
v4.2.11 v4.2.11
2017-03-13 10:44:45 +03:00
716f9afb94 Merge pull request #30 from ONLYOFFICE/feature/nginx-params-description
Added nginx params description.
2017-02-27 11:03:45 +03:00
387d1d0cb9 Merge pull request #29 from ONLYOFFICE/feature/nginx-params-description
Added nginx params description.
2017-02-27 10:58:20 +03:00
259d6df478 Added nginx params description. 2017-02-27 10:50:47 +03:00
1047e5189a Use nginx config from the package 2017-01-24 19:34:20 +03:00
b60bd1cebb Export folder for the custom fonts 2017-01-18 14:13:24 +03:00
3f8c314da0 tune welcome page 2017-01-17 16:15:54 +03:00
dd08a39bed Added "How to run DS on different port" 2017-01-13 12:50:24 +03:00
43806526d5 Changed GPG key for the onlyoffice repo 2016-12-26 19:23:14 +03:00
be3f768358 Changed rabbitmq settings 2016-12-09 15:56:11 +03:00
daa1850ed8 Adde to install postgresql-client 2016-12-09 13:10:37 +03:00
c3fbb79748 Merge tag 'v4.2.0' into develop
v4.2.0 v4.2.0
2016-12-05 11:38:57 +03:00
ab992841fd Merge branch 'release/v4.2.0' 2016-12-05 11:38:55 +03:00
8b812ac491 fixed warning: setlocale: LC_ALL: cannot change... 2016-11-23 17:16:59 +03:00
47b0ab27bc Removed node.js key 2016-11-23 17:04:52 +03:00
39ef3f4dae Changed nodejs repo installation 2016-11-23 16:18:57 +03:00
4f55d140cb Update node.js version 2016-11-23 15:45:10 +03:00
f0035e1e27 Removed spdy support 2016-11-18 11:56:55 +03:00
7db1f72dd8 Use standart libstdc++ 2016-11-16 11:55:21 +03:00
f8064da1fd Merge tag 'v4.1.2' into develop
v4.1.2
2016-09-22 12:03:35 +03:00
a4bc2294d5 Merge branch 'hotfix/v4.1.2' 2016-09-22 12:03:11 +03:00
23107e65d0 use cdn url 2016-09-13 11:57:48 +03:00
9cac2cdf42 Fixed Makefile:7: *** missing separator. Stop. 2016-09-12 20:03:05 +03:00
00ed64fa7c Update latest tag when build from next branch
release
develop
hotfix
2016-09-12 19:26:54 +03:00
6a8bdfe6ba Merge pull request #21 from ONLYOFFICE/hotfix/v4.1.1
set public docker image
2016-09-12 14:09:55 +03:00
704bfff215 set public docker image 2016-09-12 14:09:25 +03:00
b03f07b8a1 Merge pull request #20 from ONLYOFFICE/hotfix/v4.1.1
Use release repo for documentserver
2016-09-09 11:50:17 +03:00
27f4bdaf53 Use release repo for documentserver 2016-09-09 11:49:14 +03:00
24d8fd6a97 Merge tag 'v4.1.0' into develop
v4.1.0
2016-09-05 13:48:07 +03:00
7b5dda41a9 Merge branch 'release/v4.1.0' 2016-09-05 13:46:29 +03:00
fa6b305fd4 Remove custom postgresql 2016-08-31 19:09:25 +03:00
fdf21d1a8c Fixed build error 2016-08-31 14:47:26 +03:00
a5ebbe5cb4 read product name from env variable 2016-08-31 14:06:41 +03:00
a015fe4c8c Moved down REPO_URL to enable caching 2016-08-31 11:22:25 +03:00
7d60ffe26d Merge pull request #19 from alexandervnuchkov/patch-3
Update README.md
2016-08-30 18:53:24 +03:00
5ef37630c5 Use ARG to set up documentserver repo 2016-08-30 17:06:02 +03:00
2518588d7f Update README.md
Added link to Stack Overflow
2016-08-30 16:44:04 +03:00
4236d71fe3 Merge pull request #18 from ONLYOFFICE/master
Back merge from master
2016-08-26 17:25:01 +03:00
65fe888648 Merge pull request #16 from alexandervnuchkov/patch-2
Update README.md
2016-08-26 17:23:00 +03:00
6ea703a44c MySQL -> PostgreSQL 2016-08-26 17:02:51 +03:00
83582dd9c6 Add a postgre key without storing a file on disk 2016-08-26 15:44:32 +03:00
4a362b008c changed user name for db 2016-08-26 15:20:13 +03:00
2d67dfe27d fixed misprint 2016-08-26 15:10:53 +03:00
e14b97bd76 Create db and user before install documentserver 2016-08-26 13:39:29 +03:00
6956f21194 fixed misprint 2016-08-26 12:18:53 +03:00
b9f9ed6ba5 mysql -> postgresql 2016-08-25 19:52:14 +03:00
4859e8f422 Removed setup max connection count 2016-08-23 17:22:42 +03:00
befb9c1c65 Increase max comnections count 2016-08-23 13:45:53 +03:00
e3b22c436c Excluded unused backend 2016-08-17 15:54:19 +03:00
48eb2b4afb Update README.md 2016-08-03 15:09:21 +03:00
5eb38213d3 Merge pull request #14 from ONLYOFFICE/master
Added a docker params description
2016-07-29 15:06:58 +03:00
5b9c158da2 Merge pull request #12 from ONLYOFFICE/docker-params
Added thr docker params description
2016-07-29 15:04:19 +03:00
e40bec3bac Merge pull request #13 from alexandervnuchkov/patch-1
Corrections for README.md
2016-07-29 15:03:34 +03:00
28ac7a080a Update Dockerfile 2016-07-28 12:39:56 +03:00
be0a9e50c1 Corrections for README.md 2016-07-28 12:23:41 +03:00
d262c96c11 Update README.md 2016-07-28 12:13:29 +03:00
bad15130c4 Merge pull request #11 from ONLYOFFICE/master
Update README.md
2016-07-27 18:31:49 +03:00
c515adf693 Remade setup a docker version 2016-07-27 16:13:52 +03:00
421b24c01c Fixed build crash 2016-07-27 15:24:47 +03:00
8ec2fe79a5 Changed version from X.X.X-X to X.X.X.X 2016-07-27 14:27:54 +03:00
05c96650fd Update docker-compose.yml
Fixed ERROR: An HTTP request took too long to complete.
2016-07-27 12:18:30 +03:00
e7b7e7dd1a made availability check the data container to ensure the correct order of starting the containers 2016-07-20 18:56:20 +03:00
d0e1228330 Merge pull request #10 from ONLYOFFICE/feature/docker-compose
Feature/docker compose
2016-07-15 17:20:45 +03:00
dd27f00a62 Seach for the string "true" in a http body when healthcheack service 2016-07-15 17:14:18 +03:00
b1053d4512 Merge branch 'feature/docker-compose' of https://github.com/ONLYOFFICE/Docker-DocumentServer into feature/docker-compose 2016-07-15 16:35:23 +03:00
a813036830 Updated haproxy container, removed virtual host, added templates for ssl 2016-07-15 16:31:53 +03:00
ad64cea8ec removed unused code 2016-07-12 17:27:04 +03:00
7955487352 Added uri balanced type. 2016-07-12 15:37:09 +03:00
0dd2cc1e59 use http proxy instead of tcp proxy. 2016-07-12 15:07:52 +03:00
d31b8939f8 Merge pull request #9 from ONLYOFFICE/feature/docker-compose
Feature/docker compose
2016-07-12 11:39:25 +03:00
dbd0e01e86 Update docker-compose.yml
added ONLYOFFICE_DATA_CONTAINER=true to data container
2016-07-11 13:53:45 +03:00
ca5bc8526d Update docker-compose.yml
fixed missprint
2016-07-11 13:52:09 +03:00
89de48c8de added data container for onlyoffice-documentserver 2016-07-11 11:47:22 +03:00
0fa55f0192 removed "^[\s]-" prefix for all lines of file 2016-07-07 17:13:26 +03:00
b3ebf467a6 Create docker-compose.yml 2016-07-04 18:43:58 +03:00
0253fe3ece Update README.md 2016-07-04 15:51:13 +03:00
97f1c087a2 Update Dockerfile 2016-07-01 16:19:10 +03:00
fd1fc534b5 Update Dockerfile 2016-07-01 15:50:57 +03:00
69a3516b20 Added Makefile to build and deploy docker 2016-07-01 14:59:12 +03:00
9aa15443ad Added test repo url 2016-07-01 14:06:44 +03:00
033c77b2ab AGPL v3 2016-06-30 19:52:31 +03:00
3e84c55dd5 AGPL v3 2016-06-30 19:52:17 +03:00
5d761b4b58 Update README.md 2016-06-30 18:10:22 +03:00
1125fc0900 updated for onlyoffice-documentserver v4.0 2016-06-30 12:41:52 +03:00
55 changed files with 6085 additions and 247 deletions

13
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,13 @@
**Do you want to request a *feature* or report a *bug*?**
**What is the current behavior?**
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.**
**What is the expected behavior?**
**Did this work in previous versions of DocumentServer?**
**DocumentServer Docker tag:**
**Host Operating System:**

186
.github/workflows/4testing-build.yml vendored Normal file
View File

@ -0,0 +1,186 @@
### This workflow setup instance then build and push images ###
name: 4testing multiarch-build
run-name: >-
Build #${{ inputs.build }} [
${{ inputs.amd64 && 'AMD64' || '-' }}
${{ inputs.arm64 && 'ARM64' || '-' }}
] [
${{ inputs.community && 'CE' || '-' }}
${{ inputs.developer && 'DE' || '-' }}
${{ inputs.enterprise && 'EE' || '-' }}
]
on:
workflow_dispatch:
inputs:
build:
description: 'Build number (ex. 45)'
type: string
required: true
amd64:
type: boolean
description: 'Build AMD64'
default: true
arm64:
type: boolean
description: 'Build ARM64'
default: true
community:
type: boolean
description: 'Build Community Edition'
default: true
enterprise:
type: boolean
description: 'Build Enterprise Edition'
default: true
developer:
type: boolean
description: 'Build Developer Edition'
default: true
env:
COMPANY_NAME: "onlyoffice"
PRODUCT_NAME: "documentserver"
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- id: matrix
env:
BRANCH_NAME: ${{ github.ref_name }}
AMD64: ${{ github.event.inputs.amd64 }}
ARM64: ${{ github.event.inputs.arm64 }}
COMMUNITY: ${{ github.event.inputs.community }}
ENTERPRISE: ${{ github.event.inputs.enterprise }}
DEVELOPER: ${{ github.event.inputs.developer }}
run: |
set -ex
if ! [[ "$BRANCH_NAME" == develop || "$BRANCH_NAME" =~ hotfix || "$BRANCH_NAME" =~ release ]]; then
echo "Wrong branch."
exit 1
fi
[ "${AMD64}" = true ] && PLATFORMS+=("amd64")
[ "${ARM64}" = true ] && PLATFORMS+=("arm64")
if [ -z ${PLATFORMS} ]; then
echo "None of the platforms are selected."
exit 1
fi
[ "${COMMUNITY}" = true ] && EDITIONS+=("community")
[ "${ENTERPRISE}" = true ] && EDITIONS+=("enterprise")
[ "${DEVELOPER}" = true ] && EDITIONS+=("developer")
if [ -z ${EDITIONS} ]; then
echo "None of the editions are selected."
exit 1
fi
echo "editions=$(jq -n -c --arg s "${EDITIONS[*]}" '($s|split(" "))')" >> $GITHUB_OUTPUT
outputs:
editions: ${{ steps.matrix.outputs.editions }}
build:
name: "Build ${{ matrix.image }}-${{ matrix.edition }}"
runs-on: ubuntu-latest
needs: prepare
strategy:
fail-fast: false
matrix:
image: ["documentserver"]
edition: ${{ fromJSON(needs.prepare.outputs.editions) }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build 4testing
id: build-ds
env:
BRANCH_NAME: ${{ github.ref_name }}
AMD64: ${{ github.event.inputs.amd64 }}
ARM64: ${{ github.event.inputs.arm64 }}
BUILD_NUMBER: ${{ github.event.inputs.build }}
EDITION: ${{ matrix.edition }}
IMAGE: ${{ matrix.image }}
PACKAGE_BASEURL: ${{ secrets.REPO_BASEURL }}
run: |
set -eux
### ==>> At this step build variable declaration ###
case "${EDITION}" in
community)
PRODUCT_EDITION=""
;;
enterprise)
PRODUCT_EDITION="-ee"
;;
developer)
PRODUCT_EDITION="-de"
;;
esac
[ "${AMD64}" = true ] && PLATFORMS+=("amd64")
[ "${ARM64}" = true ] && PLATFORMS+=("arm64")
PLATFORM=$(echo ${PLATFORMS[*]/#/linux/} | tr ' ' ',')
if [ "$BRANCH_NAME" = develop ]; then
BUILD_CHANNEL=nightly
PRODUCT_VERSION=99.99.99
elif [[ "$BRANCH_NAME" =~ hotfix || "$BRANCH_NAME" =~ release ]]; then
BUILD_CHANNEL=test
PRODUCT_VERSION=${BRANCH_NAME#*/v}
fi
export PRODUCT_EDITION
export PACKAGE_VERSION=${PRODUCT_VERSION}-${BUILD_NUMBER}
export BUILD_CHANNEL
export PLATFORM
export DOCKERFILE=Dockerfile
export PREFIX_NAME=4testing-
export TAG=${PRODUCT_VERSION}.${BUILD_NUMBER}
### ==>> Build and push images at this step ###
docker buildx bake -f docker-bake.hcl "${IMAGE}" --push
echo "DONE: Build success"
### Set output for Zap scanner
### NOTE: Output will be used only in release/hotfix branches
echo "version=${TAG}" >> "$GITHUB_OUTPUT"
echo "branch=${BRANCH_NAME}" >> "$GITHUB_OUTPUT"
shell: bash
# Run scanner only when edition is community
# and branch hit release/ or hotfix/
- name: Trigger zap manualy
if: >-
matrix.edition == 'community' &&
(startsWith(steps.build-ds.outputs.branch, 'release/') ||
startsWith(steps.build-ds.outputs.branch, 'hotfix/'))
env:
VERSION: ${{ steps.build-ds.outputs.version }}
BRANCH: ${{ steps.build-ds.outputs.branch }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}
REPO: ${{ github.repository }}
run: |
gh workflow run zap-ds.yaml \
--repo "${REPO}" \
-f branch="${BRANCH}" \
-f version="${VERSION}"
shell: bash

View File

@ -0,0 +1,22 @@
---
name: Trigger 4testing rebuild
run-name: "Weekly 4testing rebuild trigger"
on:
schedule:
# Run every Saturday at 10 p.m.
- cron: '00 22 * * 6'
jobs:
trigger-rebuild:
name: "trigget-rebuild"
runs-on: "ubuntu-latest"
steps:
- name: Rebuild 4testing manualy
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
run: |
gh workflow run rebuild.yml \
--repo ONLYOFFICE/Docker-DocumentServer \
-f repo=4test

224
.github/workflows/rebuild.yml vendored Normal file
View File

@ -0,0 +1,224 @@
---
name: Rebuild Docker-Documentserver
run-name: >
Rebuild DocumentServer with secure updates for repo: ${{ github.event.inputs.repo }}
on:
workflow_dispatch:
inputs:
repo:
type: choice
description: Please, choose upload repo..
options:
- '4test'
- 'stable'
permissions:
# All other permissions are set to none
contents: read
# Technically read access while waiting for images should be more than enough. However,
# there is a bug in GitHub Actions/Packages and in case private repositories are used, you get a permission
# denied error when attempting to just pull private image, changing the token permission to write solves the
# issue. This is not dangerous, because if it is for "ONLYOFFICE/Docker-DocumentServer", only maintainers can use ds-rebuild.yaml
# If it is for a fork, then the token is read-only anyway.
packages: read
env:
COMPANY_NAME: "onlyoffice"
PRODUCT_NAME: "documentserver"
REGISTRY_URL: "https://hub.docker.com/v2/repositories"
jobs:
rebuild-info:
name: "Rebuild-info"
runs-on: "ubuntu-22.04"
env:
REPO_INPUTS: ${{ github.event.inputs.repo }}
EVENT: ${{ github.event_name }}
outputs:
stable-versions: ${{ steps.selective-checks.outputs.stable-versions }}
ucs-versions: ${{ steps.selective-checks.outputs.ucs-versions }}
minor-tags: ${{ steps.selective-checks.outputs.minor-tags }}
ucs-rebuild-condition: ${{ steps.selective-checks.outputs.ucs-rebuild-condition }}
prefix-name: ${{ steps.selective-checks.outputs.prefix-name }}
repo: ${{ steps.selective-checks.outputs.repo }}
steps:
- name: Selective checks
id: selective-checks
run: |
set -e
REPO=${REPO_INPUTS:-"4test"}
if [ "${REPO}" == "stable" ]; then
UCS_REBUILD=true
UCS_VERSIONS=($(curl -s -H -X ${REGISTRY_URL}/${COMPANY_NAME}/${PRODUCT_NAME}-ucs/tags/?page_size=100 | \
jq -r '.results|.[]|.name' | grep -oxE '[0-9]{1,}.[0-9]{1,}.[0-9]{1,}.1' || true))
echo "ucs-versions=$(jq -c -n '$ARGS.positional' --args "${UCS_VERSIONS[@]}")" >> "$GITHUB_OUTPUT"
elif
[ "${REPO}" == "4test" ]; then
UCS_REBUILD=false
PREFIX_NAME=4testing-
fi
STABLE_VERSIONS=($(curl -s -H -X ${REGISTRY_URL}/${COMPANY_NAME}/${PRODUCT_NAME}/tags/?page_size=100 | \
jq -r '.results|.[]|.name' | grep -oxE '[0-9]{1,}.[0-9]{1,}.[0-9]{1,}.1' || true))
# When rebuilding stable versions of the document server,
# it is necessary to determine the version from which the
# minor x.x tag will need to be pushed.
VERSIONS=(${STABLE_VERSIONS[@]})
for i in {1..10}; do
if [ -z "${VERSIONS}" ]; then
break
else
TEMPLATE=${VERSIONS[0]%.*.*}
TEMPLATE_MINOR=$(printf -- '%s\n' "${VERSIONS[@]}" | grep -o -m 1 "${VERSIONS[0]%.*.*}.[0-9].[0-9]")
MINOR_TAGS+=(${TEMPLATE_MINOR%.*})
for v in ${MINOR_TAGS[@]}; do
VERSIONS=(${VERSIONS[@]//${v%.*}.*.*})
done
fi
done
echo "Stable releases that will be rebuilded"
echo "--------------------------------------"
echo "${STABLE_VERSIONS[@]}"
echo
echo
echo "Ucs releases that will be rebuilded"
echo "-----------------------------------"
echo "${UCS_VERSIONS[@]}"
echo "stable-versions=$(jq -c -n '$ARGS.positional' --args "${STABLE_VERSIONS[@]}")" >> "$GITHUB_OUTPUT"
echo "minor-tags=${MINOR_TAGS[@]}" >> "$GITHUB_OUTPUT"
echo "ucs-rebuild-condition=${UCS_REBUILD}" >> "$GITHUB_OUTPUT"
echo "prefix-name=${PREFIX_NAME}" >> "$GITHUB_OUTPUT"
echo "repo=${REPO}" >> "$GITHUB_OUTPUT"
shell: bash
re-build-stable:
name: "Rebuild stable:${{ matrix.version }} ${{ matrix.edition }}"
needs: [rebuild-info]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
type: ["stable"]
edition: ["", "-ee", "-de"]
version: ${{fromJSON(needs.rebuild-info.outputs.stable-versions)}}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
# Determines the new build number based
# on data from the hub.docker registry
- name: Declare release number
id: release-number
env:
REBUILD_VERSION: ${{ matrix.version }}
run: |
MINOR_VERSION=${REBUILD_VERSION%.*}
LAST_RELEASE=$(curl -s -H -X ${REGISTRY_URL}/${COMPANY_NAME}/${PRODUCT_NAME}/tags/?page_size=100 \
| jq -r '.results|.[]|.name' | grep -Eo -m1 "${MINOR_VERSION}.[0-9]{1,}")
LAST_RELEASE=${LAST_RELEASE#*.*.*.}
echo "release-number=$((LAST_RELEASE+1))" >> "$GITHUB_OUTPUT"
shell: bash
# Note: Rebuilding images with an
# extra layer to update security and
# all dependencies. Update tags got +1 to previous release.
- name: Re-build documentserver-stable
env:
MINOR_TAGS_ST: ${{ needs.rebuild-info.outputs.minor-tags }}
VERSION: ${{ matrix.version }}
RELEASE_NUMBER: ${{ steps.release-number.outputs.release-number }}
PREFIX_NAME: ${{ needs.rebuild-info.outputs.prefix-name }}
REPO: ${{ needs.rebuild-info.outputs.repo }}
PRODUCT_EDITION: ${{ matrix.edition }}
run: |
set -eux
export PULL_TAG=${VERSION}
export TAG=${VERSION%.*}.${RELEASE_NUMBER}
export SHORTER_TAG=${VERSION%.*}
export SHORTEST_TAG=${VERSION%.*.*}
if [ "${REPO}" == "stable" ]; then
MINOR_TAGS=(${MINOR_TAGS_ST})
for v in ${MINOR_TAGS[@]}; do
if [ "${SHORTER_TAG}" == "${v}" ]; then
export PUSH_MAJOR="true"
fi
done
if [ "${SHORTER_TAG}" == "${MINOR_TAGS[0]}" ]; then
export LATEST="true"
fi
fi
docker buildx bake -f docker-bake.hcl documentserver-stable-rebuild --push
shell: bash
re-build-ucs:
name: "Rebuild ucs: ${{ matrix.version }} ${{ matrix.edition }}"
if: needs.rebuild-info.outputs.ucs-rebuild-condition == 'true'
needs: [rebuild-info]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
type: ["ucs"]
edition: ["", "-ee"]
version: ${{fromJSON(needs.rebuild-info.outputs.ucs-versions)}}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
# Determines the new build number based
# on data from the hub.docker registry
- name: Declare release number
id: release-number
env:
REBUILD_VERSION: ${{ matrix.version }}
run: |
MINOR_VERSION=${REBUILD_VERSION%.*}
LAST_RELEASE=$(curl -s -H -X ${REGISTRY_URL}/${COMPANY_NAME}/${PRODUCT_NAME}/tags/?page_size=100 \
| jq -r '.results|.[]|.name' | grep -Eo -m1 "${MINOR_VERSION}.[0-9]{1,}")
LAST_RELEASE=${LAST_RELEASE#*.*.*.}
echo "release-number=$((LAST_RELEASE+1))" >> "$GITHUB_OUTPUT"
shell: bash
# Note: Rebuilding images with an
# extra layer to update security and
# all dependencies. Update tags +1 to previous release.
- name: Re-build documentserver-ucs
env:
VERSION: ${{ matrix.version }}
RELEASE_NUMBER: ${{ steps.release-number.outputs.release-number }}
PRODUCT_EDITION: ${{ matrix.edition }}
run: |
set -eux
export PULL_TAG=${VERSION}
export TAG=${VERSION%.*}.${RELEASE_NUMBER}
export SHORTER_TAG=${VERSION%.*}
export SHORTEST_TAG=${VERSION%.*.*}
export UCS_REBUILD=true
export UCS_PREFIX=-ucs
docker buildx bake -f docker-bake.hcl documentserver-stable-rebuild --push
shell: bash

139
.github/workflows/stable-build.yml vendored Normal file
View File

@ -0,0 +1,139 @@
### This workflow setup instance then build and push images ###
name: Multi-arch build stable
run-name: ${{ inputs.tag }} (${{ inputs.release_number }})
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag for release (ex. 1.2.3.45)'
type: string
required: true
release_number:
description: 'Sequence number of the release (ex. x.x.x.<number>)'
type: string
required: true
default: '1'
env:
COMPANY_NAME: "onlyoffice"
PRODUCT_NAME: "documentserver"
VERSION: ${{ github.event.inputs.tag }}
RELEASE_NUMBER: ${{ github.event.inputs.release_number }}
jobs:
build:
name: "Release image: DocumentServer${{ matrix.edition }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
images: ["documentserver-stable"]
edition: ["", "-ee", "-de"]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build documentserver-release
env:
TARGET: ${{ matrix.images }}
PRODUCT_EDITION: ${{ matrix.edition }}
run: |
set -eux
TESTING_IMAGE=${COMPANY_NAME}/4testing-${PRODUCT_NAME}${PRODUCT_EDITION}
export PRODUCT_EDITION
export PULL_TAG=${VERSION}
export TAG=${VERSION%.*}.${RELEASE_NUMBER}
export SHORTER_TAG=${VERSION%.*}
export SHORTEST_TAG=${VERSION%.*.*}
docker buildx bake -f docker-bake.hcl "${TARGET}" --push
echo "DONE: Build success >> exit with 0"
exit 0
shell: bash
build-nonexample:
name: "Release image: DocumentServer${{ matrix.edition }}-nonExample"
runs-on: ubuntu-latest
needs: [build]
if: ${{ false }}
strategy:
fail-fast: false
matrix:
images: ["documentserver-nonexample"]
edition: ["", "-ee", "-de"]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: build image
env:
TARGET: ${{ matrix.images }}
PRODUCT_EDITION: ${{ matrix.edition }}
run: |
set -eux
export PULL_TAG=${VERSION%.*}.${RELEASE_NUMBER}
export TAG=${VERSION%.*}.${RELEASE_NUMBER}
docker buildx bake -f docker-bake.hcl "${TARGET}" --push
shell: bash
build-ucs-ubuntu20:
name: "Release image: DocumentServer${{ matrix.edition }}-ucs"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
edition: ["", "-ee"]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: build UCS
env:
PACKAGE_BASEURL: ${{ secrets.REPO_BASEURL }}
PRODUCT_EDITION: ${{ matrix.edition }}
run: |
set -eux
export DOCKERFILE=Dockerfile
export BASE_VERSION=20.04
export PG_VERSION=12
export PACKAGE_SUFFIX=
export TAG=${VERSION%.*}.${RELEASE_NUMBER}
export PACKAGE_VERSION=$( echo ${VERSION} | sed -E 's/(.*)\./\1-/')
docker buildx bake -f docker-bake.hcl documentserver-ucs --push
shell: bash

70
.github/workflows/zap-ds.yaml vendored Normal file
View File

@ -0,0 +1,70 @@
---
name: Scanning DocumentServer with ZAP
run-name: >
ZAP DocumentServer ver: ${{ github.event.inputs.version }} from branch: ${{ github.event.inputs.branch }}
on:
workflow_dispatch:
inputs:
version:
description: 'Set DocumentServer version that will be deployed'
type: string
required: true
branch:
description: 'The branch from which the scan will be performed'
type: string
required: true
jobs:
zap:
name: "Zap scanning DocumentServer"
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run DS
id: run-ds
env:
TAG: ${{ github.event.inputs.version }}
run: |
# Create ssl certs
openssl genrsa -out tls.key 2048
openssl req -new -key tls.key -out tls.csr -subj "/C=RU/ST=NizhObl/L=NizhNov/O=RK-Tech/OU=TestUnit/CN=TestName"
openssl x509 -req -days 365 -in tls.csr -signkey tls.key -out tls.crt
openssl dhparam -out dhparam.pem 2048
sudo mkdir -p /app/onlyoffice/DocumentServer/data/certs
sudo cp ./tls.key /app/onlyoffice/DocumentServer/data/certs/
sudo cp ./tls.crt /app/onlyoffice/DocumentServer/data/certs/
sudo cp ./dhparam.pem /app/onlyoffice/DocumentServer/data/certs/
sudo chmod 400 /app/onlyoffice/DocumentServer/data/certs/tls.key
rm ./tls.key ./tls.crt ./dhparam.pem
# Run Ds with enabled ssl
export CONTAINER_NAME="documentserver"
sudo docker run -itd \
--name ${CONTAINER_NAME} \
-p 80:80 \
-p 443:443 \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \
onlyoffice/4testing-documentserver:${TAG}
sleep 60
sudo docker exec ${CONTAINER_NAME} sudo supervisorctl start ds:example
LOCAL_IP=$(hostname -I | awk '{print $1}')
echo "local-ip=${LOCAL_IP}" >> "$GITHUB_OUTPUT"
# Scan DocumentServer with ZAP.
# NOTE: Full scan get a lot of time.
# If you want make scan more faster (but less accurate) remove `cmd options` field
# -j mean that scanning use AJAX Spider, with this spider the scan takes approximately an hour
# Without any cmd options will be used default spider and the scan takes approximately ~10-15 minutes
- name: ZAP Scan
uses: zaproxy/action-full-scan@v0.8.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
docker_name: 'ghcr.io/zaproxy/zaproxy:stable'
target: 'https://${{ steps.run-ds.outputs.local-ip }}/'
allow_issue_writing: false
cmd_options: '-j'

131
.travis.yml Normal file
View File

@ -0,0 +1,131 @@
language: generic
dist: trusty
env:
# community edition
- config: standalone.yml
# integration edition
- config: standalone.yml
PRODUCT_NAME: documentserver-ie
# certificates (default tls if onlyoffice not exists)
- config: certs.yml
ssl: true
# certificates (default onlyoffice if exists)
- config: certs.yml
ssl: true
private_key: onlyoffice.key
certificate_request: onlyoffice.csr
certificate: onlyoffice.crt
# custom certificates
- config: certs-customized.yml
ssl: true
private_key: mycert.key
certificate_request: mycert.csr
certificate: mycert.crt
SSL_CERTIFICATE_PATH: /var/www/onlyoffice/Data/certs/mycert.crt
SSL_KEY_PATH: /var/www/onlyoffice/Data/certs/mycert.key
# postgresql 16
- config: postgres.yml
POSTGRES_VERSION: 16
# postgresql 15
- config: postgres.yml
POSTGRES_VERSION: 15
# postgresql 14
- config: postgres.yml
POSTGRES_VERSION: 14
# postgresql 13
- config: postgres.yml
POSTGRES_VERSION: 13
# postgresql 12
- config: postgres.yml
# postgresql custom values
- config: postgres.yml
DB_NAME: mydb
DB_USER: myuser
DB_PWD: password
POSTGRES_DB: mydb
POSTGRES_USER: myuser
# postgresql deprecated variables
- config: postgres-old.yml
# mysql 8
- config: mysql.yml
MYSQL_VERSION: 8
# mysql 5
- config: mysql.yml
MYSQL_VERSION: 5
# mysql 5.7
- config: mysql.yml
# mariadb 10
- config: mariadb.yml
MARIADB_VERSION: 10
# mariadb 10.5
- config: mariadb.yml
- config: activemq.yml
ACTIVEMQ_VERSION: latest
# activemq 5.14.3
- config: activemq.yml
# rabbitmq latest
- config: rabbitmq.yml
# rabbitmq 3
- config: rabbitmq.yml
RABBITMQ_VERSION: 3
# rabbitmq old variables
- config: rabbitmq-old.yml
# redis latest with community edition
- config: redis.yml
# redis latest with integraion edition
- config: redis.yml
PRODUCT_NAME: documentserver-ie
# redis 6
- config: redis.yml
REDIS_VERSION: 6
# redis 5
- config: redis.yml
REDIS_VERSION: 5
# graphite
- config: graphite.yml
services:
- docker
script:
# Go to tests dir
- cd ${PWD}/tests
# Run test.
- ./test.sh

View File

@ -1,36 +1,138 @@
FROM ubuntu:14.04
MAINTAINER Ascensio System SIA <support@onlyoffice.com>
ARG BASE_VERSION=24.04
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ARG BASE_IMAGE=ubuntu:$BASE_VERSION
RUN apt-get update && apt-get -y -q install libreoffice
FROM ${BASE_IMAGE} AS documentserver
LABEL maintainer Ascensio System SIA <support@onlyoffice.com>
ARG BASE_VERSION
ARG PG_VERSION=16
ARG PACKAGE_SUFFIX=t64
ENV OC_RELEASE_NUM=21
ENV OC_RU_VER=12
ENV OC_RU_REVISION_VER=0
ENV OC_RESERVED_NUM=0
ENV OC_RU_DATE=0
ENV OC_PATH=${OC_RELEASE_NUM}${OC_RU_VER}000
ENV OC_FILE_SUFFIX=${OC_RELEASE_NUM}.${OC_RU_VER}.${OC_RU_REVISION_VER}.${OC_RESERVED_NUM}.${OC_RU_DATE}${OC_FILE_SUFFIX}dbru
ENV OC_VER_DIR=${OC_RELEASE_NUM}_${OC_RU_VER}
ENV OC_DOWNLOAD_URL=https://download.oracle.com/otn_software/linux/instantclient/${OC_PATH}
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive PG_VERSION=${PG_VERSION} BASE_VERSION=${BASE_VERSION}
ARG ONLYOFFICE_VALUE=onlyoffice
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
echo "deb http://static.teamlab.com.s3.amazonaws.com/repo/debian/ squeeze main" >> /etc/apt/sources.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D9D0BF019CC8AC0D && \
echo "deb http://download.mono-project.com/repo/debian wheezy/snapshots/3.12.0 main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
echo "deb http://archive.ubuntu.com/ubuntu precise main universe multiverse" >> /etc/apt/sources.list && \
DEBIAN_FRONTEND=noninteractive && \
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" && \
wget -q -O /tmp/microsoft.asc https://packages.microsoft.com/keys/microsoft.asc && \
apt-key add /tmp/microsoft.asc && \
gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg < /tmp/microsoft.asc && \
apt-get -y update && \
locale-gen en_US.UTF-8 && \
apt-get -y update && \
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \
apt-get install --force-yes -yq software-properties-common && \
add-apt-repository ppa:ubuntu-toolchain-r/test && \
apt-get -y update && \
apt-get --force-yes -yq install gcc-4.9 onlyoffice-documentserver nano htop && \
ACCEPT_EULA=Y apt-get -yq install \
adduser \
apt-utils \
bomstrip \
certbot \
cron \
curl \
htop \
libaio1${PACKAGE_SUFFIX} \
libasound2${PACKAGE_SUFFIX} \
libboost-regex-dev \
libcairo2 \
libcurl3-gnutls \
libcurl4 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libstdc++6 \
libxml2 \
libxss1 \
libxtst6 \
mssql-tools18 \
mysql-client \
nano \
net-tools \
netcat-openbsd \
nginx-extras \
postgresql \
postgresql-client \
pwgen \
rabbitmq-server \
redis-server \
sudo \
supervisor \
ttf-mscorefonts-installer \
unixodbc-dev \
unzip \
xvfb \
xxd \
zlib1g || dpkg --configure -a && \
# Added dpkg --configure -a to handle installation issues with rabbitmq-server on arm64 architecture
if [ $(ls -l /usr/share/fonts/truetype/msttcorefonts | wc -l) -ne 61 ]; \
then echo 'msttcorefonts failed to download'; exit 1; fi && \
echo "SERVER_ADDITIONAL_ERL_ARGS=\"+S 1:1\"" | tee -a /etc/rabbitmq/rabbitmq-env.conf && \
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 && \
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.x64-${OC_FILE_SUFFIX}.zip && \
wget -O sqlplus.zip ${OC_DOWNLOAD_URL}/instantclient-sqlplus-linux.x64-${OC_FILE_SUFFIX}.zip && \
unzip -d /usr/share basic.zip && \
unzip -d /usr/share sqlplus.zip && \
mv /usr/share/instantclient_${OC_VER_DIR} /usr/share/instantclient && \
service postgresql stop && \
service redis-server stop && \
service rabbitmq-server stop && \
service supervisor stop && \
service nginx stop && \
rm -rf /var/lib/apt/lists/*
ADD config /app/onlyoffice/setup/config/
ADD run-document-server.sh /app/onlyoffice/run-document-server.sh
RUN chmod 755 /app/onlyoffice/*.sh
COPY config/supervisor/supervisor /etc/init.d/
COPY config/supervisor/ds/*.conf /etc/supervisor/conf.d/
COPY run-document-server.sh /app/ds/run-document-server.sh
COPY oracle/sqlplus /usr/bin/sqlplus
VOLUME ["/var/log/onlyoffice"]
VOLUME ["/var/www/onlyoffice/Data"]
EXPOSE 80 443
EXPOSE 80
EXPOSE 443
ARG COMPANY_NAME=onlyoffice
ARG PRODUCT_NAME=documentserver
ARG PRODUCT_EDITION=
ARG PACKAGE_VERSION=
ARG TARGETARCH
ARG PACKAGE_BASEURL="http://download.onlyoffice.com/install/documentserver/linux"
CMD bash -C '/app/onlyoffice/run-document-server.sh';'bash'
ENV COMPANY_NAME=$COMPANY_NAME \
PRODUCT_NAME=$PRODUCT_NAME \
PRODUCT_EDITION=$PRODUCT_EDITION \
DS_PLUGIN_INSTALLATION=false \
DS_DOCKER_INSTALLATION=true
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" && \
apt-get -y update && \
service postgresql start && \
apt-get -yq install /tmp/$PACKAGE_FILE && \
service postgresql stop && \
chmod 755 /etc/init.d/supervisor && \
sed "s/COMPANY_NAME/${COMPANY_NAME}/g" -i /etc/supervisor/conf.d/*.conf && \
service supervisor stop && \
chmod 755 /app/ds/*.sh && \
printf "\nGO" >> "/var/www/$COMPANY_NAME/documentserver/server/schema/mssql/createdb.sql" && \
printf "\nGO" >> "/var/www/$COMPANY_NAME/documentserver/server/schema/mssql/removetbl.sql" && \
printf "\nexit" >> "/var/www/$COMPANY_NAME/documentserver/server/schema/oracle/createdb.sql" && \
printf "\nexit" >> "/var/www/$COMPANY_NAME/documentserver/server/schema/oracle/removetbl.sql" && \
rm -f /tmp/$PACKAGE_FILE && \
rm -rf /var/log/$COMPANY_NAME && \
rm -rf /var/lib/apt/lists/*
VOLUME /var/log/$COMPANY_NAME /var/lib/$COMPANY_NAME /var/www/$COMPANY_NAME/Data /var/lib/postgresql /var/lib/rabbitmq /var/lib/redis /usr/share/fonts/truetype/custom
ENTRYPOINT ["/app/ds/run-document-server.sh"]

View File

@ -658,4 +658,4 @@ specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<http://www.gnu.org/licenses/>.
<http://www.gnu.org/licenses/>.

66
Makefile Normal file
View File

@ -0,0 +1,66 @@
COMPANY_NAME ?= ONLYOFFICE
GIT_BRANCH ?= develop
PRODUCT_NAME ?= documentserver
PRODUCT_EDITION ?=
PRODUCT_VERSION ?= 0.0.0
BUILD_NUMBER ?= 0
BUILD_CHANNEL ?= nightly
ONLYOFFICE_VALUE ?= onlyoffice
COMPANY_NAME_LOW = $(shell echo $(COMPANY_NAME) | tr A-Z a-z)
PACKAGE_NAME := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME)$(PRODUCT_EDITION)
PACKAGE_VERSION ?= $(PRODUCT_VERSION)-$(BUILD_NUMBER)~stretch
PACKAGE_BASEURL ?= https://s3.eu-west-1.amazonaws.com/repo-doc-onlyoffice-com/server/linux/debian
ifeq ($(BUILD_CHANNEL),$(filter $(BUILD_CHANNEL),nightly test))
DOCKER_TAG := $(PRODUCT_VERSION).$(BUILD_NUMBER)
else
DOCKER_TAG := $(PRODUCT_VERSION).$(BUILD_NUMBER)-$(subst /,-,$(GIT_BRANCH))
endif
DOCKER_ORG ?= $(COMPANY_NAME_LOW)
DOCKER_IMAGE := $(DOCKER_ORG)/4testing-$(PRODUCT_NAME)$(PRODUCT_EDITION)
DOCKER_DUMMY := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME)$(PRODUCT_EDITION)__$(DOCKER_TAG).dummy
DOCKER_ARCH := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME)_$(DOCKER_TAG).tar.gz
.PHONY: all clean clean-docker image deploy docker
$(DOCKER_DUMMY):
docker pull ubuntu:22.04
docker build \
--build-arg COMPANY_NAME=$(COMPANY_NAME_LOW) \
--build-arg PRODUCT_NAME=$(PRODUCT_NAME) \
--build-arg PRODUCT_EDITION=$(PRODUCT_EDITION) \
--build-arg PACKAGE_VERSION=$(PACKAGE_VERSION) \
--build-arg PACKAGE_BASEURL=$(PACKAGE_BASEURL) \
--build-arg TARGETARCH=amd64 \
--build-arg ONLYOFFICE_VALUE=$(ONLYOFFICE_VALUE) \
-t $(DOCKER_IMAGE):$(DOCKER_TAG) . && \
mkdir -p $$(dirname $@) && \
echo "Done" > $@
$(DOCKER_ARCH): $(DOCKER_DUMMY)
docker save $(DOCKER_IMAGE):$(DOCKER_TAG) | \
gzip > $@
all: image
clean:
rm -rfv *.dummy *.tar.gz
clean-docker:
docker rmi -f $$(docker images -q $(COMPANY_NAME_LOW)/*) || exit 0
image: $(DOCKER_DUMMY)
deploy: $(DOCKER_DUMMY)
for i in {1..3}; do \
docker push $(DOCKER_IMAGE):$(DOCKER_TAG) && break || sleep 1m; \
done
ifeq ($(BUILD_CHANNEL),nightly)
docker tag $(DOCKER_IMAGE):$(DOCKER_TAG) $(DOCKER_IMAGE):latest
for i in {1..3}; do \
docker push $(DOCKER_IMAGE):latest && break || sleep 1m; \
done
endif

249
README.md
View File

@ -11,9 +11,10 @@
+ [Installation of the SSL Certificates](#installation-of-the-ssl-certificates)
+ [Available Configuration Parameters](#available-configuration-parameters)
* [Installing ONLYOFFICE Document Server integrated with Community and Mail Servers](#installing-onlyoffice-document-server-integrated-with-community-and-mail-servers)
* [ONLYOFFICE Document Server ipv6 setup](#onlyoffice-document-server-ipv6-setup)
* [Issues](#issues)
- [Docker Issues](#docker-issues)
- [Mono Issues](#mono-issues)
- [Document Server usage Issues](#document-server-usage-issues)
* [Project Information](#project-information)
* [User Feedback and Support](#user-feedback-and-support)
@ -21,6 +22,12 @@
ONLYOFFICE Document Server is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
Starting from version 6.0, Document Server is distributed as ONLYOFFICE Docs. It has [three editions](https://github.com/ONLYOFFICE/DocumentServer#onlyoffice-document-server-editions). With this image, you will install the free Community version.
ONLYOFFICE Docs can be used as a part of ONLYOFFICE Workspace or with third-party sync&share solutions (e.g. Nextcloud, ownCloud, Seafile) to enable collaborative editing within their interface.
***Important*** Please update `docker-engine` to latest version (`20.10.21` as of writing this doc) before using it. We use `ubuntu:22.04` as base image and it older versions of docker have compatibility problems with it
## Functionality ##
* ONLYOFFICE Document Editor
* ONLYOFFICE Spreadsheet Editor
@ -40,10 +47,10 @@ Integrating it with ONLYOFFICE Community Server you will be able to:
* **RAM**: 4 GB or more
* **CPU**: dual-core 2 GHz or higher
* **Swap file**: at least 2 GB
* **Swap**: at least 2 GB
* **HDD**: at least 2 GB of free space
* **Distributive**: 64-bit Red Hat, CentOS or other compatible distributive with kernel version 3.8 or later, 64-bit Debian, Ubuntu or other compatible distributive with kernel version 3.8 or later
* **Docker**: version 1.4.1 or later
* **Distribution**: 64-bit Red Hat, CentOS or other compatible distributive with kernel version 3.8 or later, 64-bit Debian, Ubuntu or other compatible distributive with kernel version 3.8 or later
* **Docker**: version 1.9.0 or later
## Running Docker Image
@ -58,14 +65,23 @@ Use this command if you wish to install ONLYOFFICE Document Server separately. T
All the data are stored in the specially-designated directories, **data volumes**, at the following location:
* **/var/log/onlyoffice** for ONLYOFFICE Document Server logs
* **/var/www/onlyoffice/Data** for certificates
* **/var/lib/onlyoffice** for file cache
* **/var/lib/postgresql** for database
To get access to your data from outside the container, you need to mount the volumes. It can be done by specifying the '-v' option in the docker run command.
sudo docker run -i -t -d -p 80:80 \
-v /opt/onlyoffice/Logs:/var/log/onlyoffice \
-v /opt/onlyoffice/Data:/var/www/onlyoffice/Data onlyoffice/documentserver
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \
-v /app/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq \
-v /app/onlyoffice/DocumentServer/redis:/var/lib/redis \
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql onlyoffice/documentserver
Storing the data on the host machine allows you to easily update ONLYOFFICE once the new version is released without losing your data.
Normally, you do not need to store container data because the container's operation does not depend on its state. Saving data will be useful:
* For easy access to container data, such as logs
* To remove the limit on the size of the data inside the container
* When using services launched outside the container such as PostgreSQL, Redis, RabbitMQ
### Running ONLYOFFICE Document Server on Different Port
@ -76,7 +92,7 @@ To change the port, use the -p command. E.g.: to make your portal accessible via
### Running ONLYOFFICE Document Server using HTTPS
sudo docker run -i -t -d -p 443:443 \
-v /opt/onlyoffice/Data:/var/www/onlyoffice/Data onlyoffice/documentserver
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver
Access to the onlyoffice application can be secured using SSL so as to prevent unauthorized access. While a CA certified SSL certificate allows for verification of trust via the CA, a self signed certificates can also provide an equal level of trust verification as long as each client takes some additional steps to verify the identity of your website. Below the instructions on achieving this are provided.
@ -87,10 +103,17 @@ To secure the application via SSL basically two things are needed:
So you need to create and install the following files:
/opt/onlyoffice/Data/certs/onlyoffice.key
/opt/onlyoffice/Data/certs/onlyoffice.crt
/app/onlyoffice/DocumentServer/data/certs/tls.key
/app/onlyoffice/DocumentServer/data/certs/tls.crt
When using CA certified certificates, these files are provided to you by the CA. When using self-signed certificates you need to generate these files yourself. Skip the following section if you are have CA certified SSL certificates.
When using CA certified certificates (e.g [Let's encrypt](https://letsencrypt.org)), these files are provided to you by the CA. If you are using self-signed certificates you need to generate these files [yourself](#generation-of-self-signed-certificates).
#### Using the automatically generated Let's Encrypt SSL Certificates
sudo docker run -i -t -d -p 80:80 -p 443:443 \
-e LETS_ENCRYPT_DOMAIN=your_domain -e LETS_ENCRYPT_MAIL=your_mail onlyoffice/documentserver
If you want to get and extend Let's Encrypt SSL Certificates automatically just set LETS_ENCRYPT_DOMAIN and LETS_ENCRYPT_MAIL variables.
#### Generation of Self Signed Certificates
@ -99,19 +122,19 @@ Generation of self-signed SSL certificates involves a simple 3 step procedure.
**STEP 1**: Create the server private key
```bash
openssl genrsa -out onlyoffice.key 2048
openssl genrsa -out tls.key 2048
```
**STEP 2**: Create the certificate signing request (CSR)
```bash
openssl req -new -key onlyoffice.key -out onlyoffice.csr
openssl req -new -key tls.key -out tls.csr
```
**STEP 3**: Sign the certificate using the private key and CSR
```bash
openssl x509 -req -days 365 -in onlyoffice.csr -signkey onlyoffice.key -out onlyoffice.crt
openssl x509 -req -days 365 -in tls.csr -signkey tls.key -out tls.crt
```
You have now generated an SSL certificate that's valid for 365 days.
@ -127,18 +150,18 @@ openssl dhparam -out dhparam.pem 2048
#### Installation of the SSL Certificates
Out of the four files generated above, you need to install the `onlyoffice.key`, `onlyoffice.crt` and `dhparam.pem` files at the onlyoffice server. The CSR file is not needed, but do make sure you safely backup the file (in case you ever need it again).
Out of the four files generated above, you need to install the `tls.key`, `tls.crt` and `dhparam.pem` files at the onlyoffice server. The CSR file is not needed, but do make sure you safely backup the file (in case you ever need it again).
The default path that the onlyoffice application is configured to look for the SSL certificates is at `/var/www/onlyoffice/Data/certs`, this can however be changed using the `SSL_KEY_PATH`, `SSL_CERTIFICATE_PATH` and `SSL_DHPARAM_PATH` configuration options.
The `/var/www/onlyoffice/Data/` path is the path of the data store, which means that you have to create a folder named certs inside `/opt/onlyoffice/Data/` and copy the files into it and as a measure of security you will update the permission on the `onlyoffice.key` file to only be readable by the owner.
The `/var/www/onlyoffice/Data/` path is the path of the data store, which means that you have to create a folder named certs inside `/app/onlyoffice/DocumentServer/data/` and copy the files into it and as a measure of security you will update the permission on the `tls.key` file to only be readable by the owner.
```bash
mkdir -p /opt/onlyoffice/Data/certs
cp onlyoffice.key /opt/onlyoffice/Data/certs/
cp onlyoffice.crt /opt/onlyoffice/Data/certs/
cp dhparam.pem /opt/onlyoffice/Data/certs/
chmod 400 /opt/onlyoffice/Data/certs/onlyoffice.key
mkdir -p /app/onlyoffice/DocumentServer/data/certs
cp tls.key /app/onlyoffice/DocumentServer/data/certs/
cp tls.crt /app/onlyoffice/DocumentServer/data/certs/
cp dhparam.pem /app/onlyoffice/DocumentServer/data/certs/
chmod 400 /app/onlyoffice/DocumentServer/data/certs/tls.key
```
You are now just one step away from having our application secured.
@ -151,47 +174,179 @@ Below is the complete list of parameters that can be set using environment varia
- **ONLYOFFICE_HTTPS_HSTS_ENABLED**: Advanced configuration option for turning off the HSTS configuration. Applicable only when SSL is in use. Defaults to `true`.
- **ONLYOFFICE_HTTPS_HSTS_MAXAGE**: Advanced configuration option for setting the HSTS max-age in the onlyoffice nginx vHost configuration. Applicable only when SSL is in use. Defaults to `31536000`.
- **SSL_CERTIFICATE_PATH**: The path to the SSL certificate to use. Defaults to `/var/www/onlyoffice/Data/certs/onlyoffice.crt`.
- **SSL_KEY_PATH**: The path to the SSL certificate's private key. Defaults to `/var/www/onlyoffice/Data/certs/onlyoffice.key`.
- **SSL_CERTIFICATE_PATH**: The path to the SSL certificate to use. Defaults to `/var/www/onlyoffice/Data/certs/tls.crt`.
- **SSL_KEY_PATH**: The path to the SSL certificate's private key. Defaults to `/var/www/onlyoffice/Data/certs/tls.key`.
- **SSL_DHPARAM_PATH**: The path to the Diffie-Hellman parameter. Defaults to `/var/www/onlyoffice/Data/certs/dhparam.pem`.
- **SSL_VERIFY_CLIENT**: Enable verification of client certificates using the `CA_CERTIFICATES_PATH` file. Defaults to `false`
- **NODE_EXTRA_CA_CERTS**: The [NODE_EXTRA_CA_CERTS](https://nodejs.org/api/cli.html#node_extra_ca_certsfile "Node.js documentation") to extend CAs with the extra certificates for Node.js. Defaults to `/var/www/onlyoffice/Data/certs/extra-ca-certs.pem`.
- **DB_TYPE**: The database type. Supported values are `postgres`, `mariadb`, `mysql`, `mssql` or `oracle`. Defaults to `postgres`.
- **DB_HOST**: The IP address or the name of the host where the database server is running.
- **DB_PORT**: The database server port number.
- **DB_NAME**: The name of a database to use. Should be existing on container startup.
- **DB_USER**: The new user name with superuser permissions for the database account.
- **DB_PWD**: The password set for the database account.
- **AMQP_URI**: The [AMQP URI](https://www.rabbitmq.com/uri-spec.html "RabbitMQ URI Specification") to connect to message broker server.
- **AMQP_TYPE**: The message broker type. Supported values are `rabbitmq` or `activemq`. Defaults to `rabbitmq`.
- **REDIS_SERVER_HOST**: The IP address or the name of the host where the Redis server is running.
- **REDIS_SERVER_PORT**: The Redis server port number.
- **REDIS_SERVER_PASS**: The Redis server password. The password is not set by default.
- **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.
- **SECURE_LINK_SECRET**: Defines secret for the nginx config directive [secure_link_md5](https://nginx.org/en/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_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_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`.
- **ALLOW_META_IP_ADDRESS**: Defines if it is allowed to connect meta IP address or not. Defaults to `false`.
- **ALLOW_PRIVATE_IP_ADDRESS**: Defines if it is allowed to connect private IP address or not. Defaults to `false`.
- **USE_UNAUTHORIZED_STORAGE**: Set to `true`if using selfsigned certificates for your storage server e.g. Nextcloud. Defaults to `false`
- **GENERATE_FONTS**: When 'true' regenerates fonts list and the fonts thumbnails etc. at each start. Defaults to `true`
- **METRICS_ENABLED**: Specifies the enabling StatsD for ONLYOFFICE Document Server. Defaults to `false`.
- **METRICS_HOST**: Defines StatsD listening host. Defaults to `localhost`.
- **METRICS_PORT**: Defines StatsD listening port. Defaults to `8125`.
- **METRICS_PREFIX**: Defines StatsD metrics prefix for backend services. Defaults to `ds.`.
- **LETS_ENCRYPT_DOMAIN**: Defines the domain for Let's Encrypt certificate.
- **LETS_ENCRYPT_MAIL**: Defines the domain administator mail address for Let's Encrypt certificate.
- **PLUGINS_ENABLED**: Defines whether to enable default plugins. Defaults to `true`.
## Installing ONLYOFFICE Document Server integrated with Community and Mail Servers
ONLYOFFICE Document Server is a part of ONLYOFFICE Free Edition that comprises also Community Server and Mail Server. To install them, follow these easy steps:
ONLYOFFICE Document Server is a part of ONLYOFFICE Community Edition that comprises also Community Server and Mail Server. To install them, follow these easy steps:
**STEP 1**: Install ONLYOFFICE Document Server.
**STEP 1**: Create the `onlyoffice` network.
```bash
sudo docker run -i -t -d --name onlyoffice-document-server onlyoffice/documentserver
docker network create --driver bridge onlyoffice
```
Then launch containers on it using the 'docker run --net onlyoffice' option:
**STEP 2**: Install MySQL.
Follow [these steps](#installing-mysql) to install MySQL server.
**STEP 3**: Generate JWT Secret
JWT secret defines the secret key to validate the JSON Web Token in the request to the **ONLYOFFICE Document Server**. You can specify it yourself or easily get it using the command:
```
JWT_SECRET=$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 12);
```
**STEP 2**: Install ONLYOFFICE Mail Server.
**STEP 4**: Install ONLYOFFICE Document Server.
```bash
sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-document-server \
-e JWT_ENABLED=true \
-e JWT_SECRET=${JWT_SECRET} \
-e JWT_HEADER=AuthorizationJwt \
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql \
onlyoffice/documentserver
```
**STEP 5**: Install ONLYOFFICE Mail Server.
For the mail server correct work you need to specify its hostname 'yourdomain.com'.
To learn more, refer to the [ONLYOFFICE Mail Server documentation](https://github.com/ONLYOFFICE/MailServer "ONLYOFFICE Mail Server documentation").
```bash
sudo docker run --privileged -i -t -d --name onlyoffice-mail-server -p 25:25 -p 143:143 -p 587:587 \
-h yourdomain.com onlyoffice/mailserver
sudo docker run --init --net onlyoffice --privileged -i -t -d --restart=always --name onlyoffice-mail-server -p 25:25 -p 143:143 -p 587:587 \
-e MYSQL_SERVER=onlyoffice-mysql-server \
-e MYSQL_SERVER_PORT=3306 \
-e MYSQL_ROOT_USER=root \
-e MYSQL_ROOT_PASSWD=my-secret-pw \
-e MYSQL_SERVER_DB_NAME=onlyoffice_mailserver \
-v /app/onlyoffice/MailServer/data:/var/vmail \
-v /app/onlyoffice/MailServer/data/certs:/etc/pki/tls/mailserver \
-v /app/onlyoffice/MailServer/logs:/var/log \
-h yourdomain.com \
onlyoffice/mailserver
```
**STEP 3**: Install ONLYOFFICE Community Server
The additional parameters for mail server are available [here](https://github.com/ONLYOFFICE/Docker-CommunityServer/blob/master/docker-compose.workspace_enterprise.yml#L87).
To learn more, refer to the [ONLYOFFICE Mail Server documentation](https://github.com/ONLYOFFICE/Docker-MailServer "ONLYOFFICE Mail Server documentation").
**STEP 6**: Install ONLYOFFICE Community Server
```bash
sudo docker run -i -t -d -p 80:80 -p 5222:5222 -p 443:443 \
--link onlyoffice-mail-server:mail_server \
--link onlyoffice-document-server:document_server \
onlyoffice/communityserver
sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 --cgroupns=host \
-e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \
-e MYSQL_SERVER_DB_NAME=onlyoffice \
-e MYSQL_SERVER_HOST=onlyoffice-mysql-server \
-e MYSQL_SERVER_USER=onlyoffice_user \
-e MYSQL_SERVER_PASS=onlyoffice_pass \
-e DOCUMENT_SERVER_PORT_80_TCP_ADDR=onlyoffice-document-server \
-e DOCUMENT_SERVER_JWT_ENABLED=true \
-e DOCUMENT_SERVER_JWT_SECRET=${JWT_SECRET} \
-e DOCUMENT_SERVER_JWT_HEADER=AuthorizationJwt \
-e MAIL_SERVER_API_HOST=${MAIL_SERVER_IP} \
-e MAIL_SERVER_DB_HOST=onlyoffice-mysql-server \
-e MAIL_SERVER_DB_NAME=onlyoffice_mailserver \
-e MAIL_SERVER_DB_PORT=3306 \
-e MAIL_SERVER_DB_USER=root \
-e MAIL_SERVER_DB_PASS=my-secret-pw \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
-v /sys/fs/cgroup:/sys/fs/cgroup:rw \
onlyoffice/communityserver
```
Alternatively, you can use [docker-compose](https://docs.docker.com/compose/install "docker-compose") to install the whole ONLYOFFICE Free Edition at once. For the mail server correct work you need to specify its hostname 'yourdomain.com'. Assuming you have docker-compose installed, execute the following command:
Where `${MAIL_SERVER_IP}` is the IP address for **ONLYOFFICE Mail Server**. You can easily get it using the command:
```
MAIL_SERVER_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' onlyoffice-mail-server)
```
Alternatively, you can use an automatic installation script to install the whole ONLYOFFICE Community Edition at once. For the mail server correct work you need to specify its hostname 'yourdomain.com'.
**STEP 1**: Download the Community Edition Docker script file
```bash
wget https://raw.githubusercontent.com/ONLYOFFICE/Docker-CommunityServer/master/docker-compose.yml
wget https://download.onlyoffice.com/install/opensource-install.sh
```
**STEP 2**: Install ONLYOFFICE Community Edition executing the following command:
```bash
bash opensource-install.sh -md yourdomain.com
```
Or, use [docker-compose](https://docs.docker.com/compose/install "docker-compose"). For the mail server correct work you need to specify its hostname 'yourdomain.com'. Assuming you have docker-compose installed, execute the following command:
```bash
wget https://raw.githubusercontent.com/ONLYOFFICE/Docker-CommunityServer/master/docker-compose.groups.yml
docker-compose up -d
```
## ONLYOFFICE Document Server ipv6 setup
(Works and is supported only for Linux hosts)
Docker does not currently provide ipv6 addresses to containers by default. This function is experimental now.
To set up interaction via ipv6, you need to enable support for this feature in your Docker. For this you need:
- create the `/etc/docker/daemon.json` file with the following content:
```
{
"ipv6": true,
"fixed-cidr-v6": "2001:db8:abc1::/64"
}
```
- restart docker with the following command: `systemctl restart docker`
After that, all running containers receive an ipv6 address and have an inet6 interface.
You can check your default bridge network and see the field there
`EnableIPv6=true`. A new ipv6 subnet will also be added.
For more information, visit the official [Docker manual site](https://docs.docker.com/config/daemon/ipv6/)
## Issues
### Docker Issues
@ -200,14 +355,19 @@ As a relatively new project Docker is being worked on and actively developed by
The known Docker issue with ONLYOFFICE Document Server with rpm-based distributives is that sometimes the processes fail to start inside Docker container. Fedora and RHEL/CentOS users should try disabling selinux with setenforce 0. If it fixes the issue then you can either stick with SELinux disabled which is not recommended by RedHat, or switch to using Ubuntu.
### Mono Issues
### Document Server usage issues
ONLYOFFICE installation requires the presence of mono (tested for version 3.12.1 or [older](http://www.mono-project.com/docs/getting-started/install/linux/#accessing-older-releases "older")) that may cause problems for some Linux kernel versions. The full list of supported kernel versions is available [here](http://onlyo.co/1PABPEI "here").
Due to the operational characteristic, **Document Server** saves a document only after the document has been closed by all the users who edited it. To avoid data loss, you must forcefully disconnect the **Document Server** users when you need to stop **Document Server** in cases of the application update, server reboot etc. To do that, execute the following script on the server where **Document Server** is installed:
```
sudo docker exec <CONTAINER> documentserver-prepare4shutdown.sh
```
Please note, that both executing the script and disconnecting users may take a long time (up to 5 minutes).
## Project Information
Official website: [http://www.onlyoffice.org](http://onlyoffice.org "http://www.onlyoffice.org")
Official website: [https://www.onlyoffice.com](https://www.onlyoffice.com/?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDockerDS)
Code repository: [https://github.com/ONLYOFFICE/DocumentServer](https://github.com/ONLYOFFICE/DocumentServer "https://github.com/ONLYOFFICE/DocumentServer")
@ -215,10 +375,13 @@ Docker Image: [https://github.com/ONLYOFFICE/Docker-DocumentServer](https://gith
License: [GNU AGPL v3.0](https://help.onlyoffice.com/products/files/doceditor.aspx?fileid=4358397&doc=K0ZUdlVuQzQ0RFhhMzhZRVN4ZFIvaHlhUjN2eS9XMXpKR1M5WEppUk1Gcz0_IjQzNTgzOTci0 "GNU AGPL v3.0")
SaaS version: [http://www.onlyoffice.com](http://www.onlyoffice.com "http://www.onlyoffice.com")
Free version vs commercial builds comparison: https://github.com/ONLYOFFICE/DocumentServer#onlyoffice-document-server-editions
SaaS version: [https://www.onlyoffice.com/cloud-office.aspx](https://www.onlyoffice.com/cloud-office.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDockerDS)
## User Feedback and Support
If you have any problems with or questions about this image, please contact us through a [dev.onlyoffice.org][1].
If you have any problems with or questions about this image, please visit our official forum to find answers to your questions: [forum.onlyoffice.com][1] or you can ask and answer ONLYOFFICE development questions on [Stack Overflow][2].
[1]: http://dev.onlyoffice.org
[1]: https://forum.onlyoffice.com
[2]: https://stackoverflow.com/questions/tagged/onlyoffice

View File

@ -1,114 +0,0 @@
## Normal HTTP host
server {
listen 0.0.0.0:80;
listen [::]:80 default_server;
server_name _;
server_tokens off;
## Redirects all traffic to the HTTPS host
root /nowhere; ## root doesn't have to be a valid path since we are redirecting
rewrite ^ https://$host$request_uri? permanent;
}
upstream fastcgi_backend {
server 127.0.0.1:9001;
keepalive 32;
}
## HTTPS host
server {
listen 0.0.0.0:443 ssl spdy;
listen [::]:443 ssl spdy default_server;
server_tokens off;
root /usr/share/nginx/html;
## Increase this if you want to upload large attachments
client_max_body_size 100m;
## Strong SSL Security
## https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html
ssl on;
ssl_certificate {{SSL_CERTIFICATE_PATH}};
ssl_certificate_key {{SSL_KEY_PATH}};
ssl_verify_client {{SSL_VERIFY_CLIENT}};
ssl_client_certificate {{CA_CERTIFICATES_PATH}};
ssl_ciphers "ECDHE-RSA-AES128-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA128:DHE-RSA-AES128-GCM-SHA384:DHE-RSA-AES128-GCM-SHA128:ECDHE-RSA-AES128-SHA384:ECDHE-RSA-AES128-SHA128:ECDHE-RSA-AES128-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA128:DHE-RSA-AES128-SHA128:DHE-RSA-AES128-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA384:AES128-GCM-SHA128:AES128-SHA128:AES128-SHA128:AES128-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_session_cache builtin:1000 shared:SSL:10m;
ssl_prefer_server_ciphers on;
add_header Strict-Transport-Security max-age={{ONLYOFFICE_HTTPS_HSTS_MAXAGE}};
# add_header X-Frame-Options SAMEORIGIN;
add_header X-Content-Type-Options nosniff;
## [Optional] If your certficate has OCSP, enable OCSP stapling to reduce the overhead and latency of running SSL.
## Replace with your ssl_trusted_certificate. For more info see:
## - https://medium.com/devops-programming/4445f4862461
## - https://www.ruby-forum.com/topic/4419319
## - https://www.digitalocean.com/community/tutorials/how-to-configure-ocsp-stapling-on-apache-and-nginx
# ssl_stapling on;
# ssl_stapling_verify on;
# ssl_trusted_certificate /etc/nginx/ssl/stapling.trusted.crt;
# resolver 208.67.222.222 208.67.222.220 valid=300s; # Can change to your DNS resolver if desired
# resolver_timeout 10s;
## [Optional] Generate a stronger DHE parameter:
## cd /etc/ssl/certs
## sudo openssl dhparam -out dhparam.pem 4096
##
ssl_dhparam {{SSL_DHPARAM_PATH}};
gzip on;
gzip_types text/plain
text/xml
text/css
text/csv
application/xml
application/javascript
application/x-javascript
application/json
application/octet-stream
application/pdf
application/rtf
application/msword
application/vnd.ms-excel
application/vnd.ms-powerpoint;
#application/vnd.oasis.opendocument.text
#application/vnd.oasis.opendocument.spreadsheet
#application/vnd.oasis.opendocument.presentation
#application/vnd.openxmlformats-officedocument.wordprocessingml.document
#application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
#application/vnd.openxmlformats-officedocument.presentationml.presentation;
location / {
root /var/www/onlyoffice/documentserver/DocService/;
index index.html index.htm default.aspx Default.aspx;
fastcgi_index Default.aspx;
fastcgi_keep_conn on;
fastcgi_pass fastcgi_backend;
include /etc/onlyoffice/documentserver/fastcgi_params;
}
location ~ \/OfficeWeb\/(?!sdk\/Fonts\/) {
root /var/www/onlyoffice/documentserver/DocService;
}
location /coauthoring/ {
proxy_pass http://localhost:8000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /spellchecker/ {
proxy_pass http://localhost:8080/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}

View 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,LD_LIBRARY_PATH=/var/www/COMPANY_NAME/documentserver/server/FileConverter/bin
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

@ -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,APPLICATION_NAME=COMPANY_NAME
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

@ -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

View 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=false
autorestart=false

View File

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

View File

@ -0,0 +1,176 @@
#! /bin/sh
#
# skeleton example file to build /etc/init.d/ scripts.
# This file should be used to construct scripts for /etc/init.d.
#
# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
# Modified for Debian
# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
# Further changes by Javier Fernandez-Sanguino <jfs@debian.org>
#
# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl
#
### BEGIN INIT INFO
# Provides: supervisor
# Required-Start: $remote_fs $network $named
# Required-Stop: $remote_fs $network $named
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start/stop supervisor
# Description: Start/stop supervisor daemon and its configured
# subprocesses.
### END INIT INFO
. /lib/lsb/init-functions
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/supervisord
NAME=supervisord
DESC=supervisor
test -x $DAEMON || exit 0
LOGDIR=/var/log/supervisor
PIDFILE=/var/run/$NAME.pid
PS_COUNT=0
DODTIME=5 # Time to wait for the server to die, in seconds
# If this value is set too low you might not
# let some servers to die gracefully and
# 'restart' will not work
# Include supervisor defaults if available
if [ -f /etc/default/supervisor ] ; then
. /etc/default/supervisor
fi
DAEMON_OPTS="-c /etc/supervisor/supervisord.conf $DAEMON_OPTS"
set -e
running_pid()
{
# Check if a given process pid's cmdline matches a given name
pid=$1
name=$2
[ -z "$pid" ] && return 1
[ ! -d /proc/$pid ] && return 1
(cat /proc/$pid/cmdline | tr "\000" "\n"|grep -q $name) || return 1
return 0
}
running()
{
# Check if the process is running looking at /proc
# (works for all users)
# No pidfile, probably no daemon present
[ ! -f "$PIDFILE" ] && return 1
# Obtain the pid and check it against the binary name
pid=`cat $PIDFILE`
running_pid $pid $DAEMON || return 1
return 0
}
force_stop() {
# Forcefully kill the process
[ ! -f "$PIDFILE" ] && return
if running ; then
kill -15 $pid
# Is it really dead?
[ -n "$DODTIME" ] && sleep "$DODTIME"s
if running ; then
kill -9 $pid
[ -n "$DODTIME" ] && sleep "$DODTIME"s
if running ; then
echo "Cannot kill $LABEL (pid=$pid)!"
exit 1
fi
fi
fi
rm -f $PIDFILE
return 0
}
get_pid() {
PS_COUNT=$(pgrep -fc $DAEMON || true)
}
case "$1" in
start)
get_pid
if [ $PS_COUNT -eq 0 ]; then
rm -f "$PIDFILE"
fi
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--startas $DAEMON -- $DAEMON_OPTS
test -f $PIDFILE || sleep 1
if running ; then
echo "$NAME."
else
echo " ERROR."
fi
;;
stop)
echo -n "Stopping $DESC: "
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
echo "$NAME."
;;
force-stop)
echo -n "Forcefully stopping $DESC: "
force_stop
if ! running ; then
echo "$NAME."
else
echo " ERROR."
fi
;;
#reload)
#
# If the daemon can reload its config files on the fly
# for example by sending it SIGHUP, do it here.
#
# If the daemon responds to changes in its config file
# directly anyway, make this a do-nothing entry.
#
# echo "Reloading $DESC configuration files."
# start-stop-daemon --stop --signal 1 --quiet --pidfile \
# /var/run/$NAME.pid --exec $DAEMON
#;;
force-reload)
#
# If the "reload" option is implemented, move the "force-reload"
# option to the "reload" entry above. If not, "force-reload" is
# just the same as "restart" except that it does nothing if the
# daemon isn't already running.
# check wether $DAEMON is running. If so, restart
start-stop-daemon --stop --test --quiet --pidfile $PIDFILE \
--startas $DAEMON \
&& $0 restart \
|| exit 0
;;
restart)
echo -n "Restarting $DESC: "
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
[ -n "$DODTIME" ] && sleep $DODTIME
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--startas $DAEMON -- $DAEMON_OPTS
echo "$NAME."
;;
status)
echo -n "$LABEL is "
if running ; then
echo "running"
else
echo " not running."
exit 1
fi
;;
*)
N=/etc/init.d/$NAME
# echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2
exit 1
;;
esac
exit 0

174
docker-bake.hcl Normal file
View File

@ -0,0 +1,174 @@
variable "TAG" {
default = ""
}
variable "SHORTER_TAG" {
default = ""
}
variable "SHORTEST_TAG" {
default = ""
}
variable "PULL_TAG" {
default = ""
}
variable "COMPANY_NAME" {
default = ""
}
variable "PREFIX_NAME" {
default = ""
}
variable "PRODUCT_EDITION" {
default = ""
}
variable "PRODUCT_NAME" {
default = ""
}
variable "PACKAGE_VERSION" {
default = ""
}
variable "DOCKERFILE" {
default = ""
}
variable "PLATFORM" {
default = ""
}
variable "PACKAGE_BASEURL" {
default = ""
}
variable "PACKAGE_FILE" {
default = ""
}
variable "BUILD_CHANNEL" {
default = ""
}
variable "PUSH_MAJOR" {
default = "false"
}
variable "LATEST" {
default = "false"
}
### ↓ Variables for UCS build ↓
variable "BASE_VERSION" {
default = ""
}
variable "PACKAGE_SUFFIX" {
default = ""
}
variable "PG_VERSION" {
default = ""
}
variable "UCS_REBUILD" {
default = ""
}
variable "UCS_PREFIX" {
default = ""
}
### ↑ Variables for UCS build ↑
target "documentserver" {
target = "documentserver"
dockerfile = "${DOCKERFILE}"
tags = [
"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": "",
]
platforms = ["${PLATFORM}"]
args = {
"COMPANY_NAME": "${COMPANY_NAME}"
"PRODUCT_NAME": "${PRODUCT_NAME}"
"PRODUCT_EDITION": "${PRODUCT_EDITION}"
"PACKAGE_VERSION": "${PACKAGE_VERSION}"
"PACKAGE_BASEURL": "${PACKAGE_BASEURL}"
"PLATFORM": "${PLATFORM}"
}
}
target "documentserver-stable" {
target = "documentserver-stable"
dockerfile = "production.dockerfile"
tags = ["docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}",
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${SHORTER_TAG}",
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${SHORTEST_TAG}",
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:latest",
equal("-ee",PRODUCT_EDITION) ? "docker.io/${COMPANY_NAME}4enterprise/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}": "",]
platforms = ["linux/amd64", "linux/arm64"]
args = {
"PULL_TAG": "${PULL_TAG}"
"COMPANY_NAME": "${COMPANY_NAME}"
"PRODUCT_NAME": "${PRODUCT_NAME}"
"PRODUCT_EDITION": "${PRODUCT_EDITION}"
}
}
target "documentserver-ucs" {
target = "documentserver"
dockerfile = "${DOCKERFILE}"
tags = [
"docker.io/${COMPANY_NAME}/${PRODUCT_NAME}${PRODUCT_EDITION}-ucs:${TAG}"
]
platforms = ["linux/amd64", "linux/arm64"]
args = {
"PRODUCT_EDITION": "${PRODUCT_EDITION}"
"PRODUCT_NAME": "${PRODUCT_NAME}"
"COMPANY_NAME": "${COMPANY_NAME}"
"PACKAGE_VERSION": "${PACKAGE_VERSION}"
"PACKAGE_BASEURL": "${PACKAGE_BASEURL}"
"PACKAGE_SUFFIX": "${PACKAGE_SUFFIX}"
"BASE_VERSION": "${BASE_VERSION}"
"PG_VERSION": "${PG_VERSION}"
}
}
target "documentserver-nonexample" {
target = "documentserver-nonexample"
dockerfile = "production.dockerfile"
tags = [ "docker.io/${COMPANY_NAME}/${PRODUCT_NAME}${PREFIX_NAME}${PRODUCT_EDITION}:${TAG}-nonexample" ]
platforms = ["linux/amd64", "linux/arm64"]
args = {
"PULL_TAG": "${PULL_TAG}"
"COMPANY_NAME": "${COMPANY_NAME}"
"PRODUCT_NAME": "${PRODUCT_NAME}"
"PRODUCT_EDITION": "${PRODUCT_EDITION}"
}
}
target "documentserver-stable-rebuild" {
target = "documentserver-stable-rebuild"
dockerfile = "production.dockerfile"
tags = equal("true",UCS_REBUILD) ? ["docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}-ucs:${TAG}",] : [
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}",
equal("",PREFIX_NAME) ? "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${SHORTER_TAG}": "",
equal("true",PUSH_MAJOR) ? "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${SHORTEST_TAG}": "",
equal("",PREFIX_NAME) && equal("true",LATEST) ? "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:latest": "",
equal("-ee",PRODUCT_EDITION) && equal("",PREFIX_NAME) ? "docker.io/${COMPANY_NAME}4enterprise/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}": "",
]
platforms = ["linux/amd64", "linux/arm64"]
args = {
"UCS_PREFIX": "${UCS_PREFIX}"
"PULL_TAG": "${PULL_TAG}"
"COMPANY_NAME": "${COMPANY_NAME}"
"PRODUCT_NAME": "${PRODUCT_NAME}"
"PRODUCT_EDITION": "${PRODUCT_EDITION}"
}
}

55
docker-compose.yml Normal file
View File

@ -0,0 +1,55 @@
services:
onlyoffice-documentserver:
build:
context: .
container_name: onlyoffice-documentserver
depends_on:
- onlyoffice-postgresql
- onlyoffice-rabbitmq
environment:
- DB_TYPE=postgres
- DB_HOST=onlyoffice-postgresql
- DB_PORT=5432
- 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:
- /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-postgresql:
container_name: onlyoffice-postgresql
image: postgres:12
environment:
- POSTGRES_DB=onlyoffice
- POSTGRES_USER=onlyoffice
- POSTGRES_HOST_AUTH_METHOD=trust
restart: always
expose:
- '5432'
volumes:
- postgresql_data:/var/lib/postgresql
volumes:
postgresql_data:

6
oracle/sqlplus Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
CLIENTDIR=/usr/share/instantclient
export LD_LIBRARY_PATH=$CLIENTDIR
$CLIENTDIR/sqlplus $@

33
production.dockerfile Normal file
View File

@ -0,0 +1,33 @@
### Arguments avavlivable only for FROM instruction ###
ARG PULL_TAG=latest
ARG COMPANY_NAME=onlyoffice
ARG PRODUCT_EDITION=
### Rebuild arguments
ARG UCS_PREFIX=
ARG IMAGE=${COMPANY_NAME}/documentserver${PRODUCT_EDITION}${UCS_PREFIX}:${PULL_TAG}
### Build main-release ###
FROM ${COMPANY_NAME}/4testing-documentserver${PRODUCT_EDITION}:${PULL_TAG} as documentserver-stable
### Rebuild stable images with secure updates
FROM ${IMAGE} as documentserver-stable-rebuild
RUN echo "This is rebuild" \
&& apt-get update -y \
&& apt-get upgrade -y
### Build nonexample ###
FROM ${COMPANY_NAME}/documentserver${PRODUCT_EDITION}:${PULL_TAG} as documentserver-nonexample
ARG COMPANY_NAME=onlyoffice
ARG PRODUCT_NAME=documentserver
ARG DS_SUPERVISOR_CONF=/etc/supervisor/conf.d/ds.conf
### Remove all documentserver-example data ###
RUN rm -rf /var/www/$COMPANY_NAME/$PRODUCT_NAME-example \
&& rm -rf /etc/$COMPANY_NAME/$PRODUCT_NAME-example \
&& rm -f $DS_SUPERVISOR_CONF \
&& rm -f /etc/nginx/includes/ds-example.conf \
&& ln -s /etc/$COMPANY_NAME/$PRODUCT_NAME/supervisor/ds.conf $DS_SUPERVISOR_CONF

View File

@ -1,76 +1,795 @@
#!/bin/bash
sed "/user=/s/onlyoffice/root/" -i /etc/supervisor/conf.d/CoAuthoringService.conf
sed "/user=/s/onlyoffice/root/" -i /etc/supervisor/conf.d/DocService.conf
sed "/user=/s/onlyoffice/root/" -i /etc/supervisor/conf.d/FileConverterService.conf
sed "/user=/s/onlyoffice/root/" -i /etc/supervisor/conf.d/LibreOfficeService.conf
sed "/user=/s/onlyoffice/root/" -i /etc/supervisor/conf.d/SpellCheckerService.conf
umask 0022
sed "/sudo /s/-u onlyoffice//" -i /var/www/onlyoffice/documentserver/Tools/CheckDocService.sh
sed "/sudo /s/-u onlyoffice//" -i /var/www/onlyoffice/documentserver/Tools/GenerateAllFonts.sh
start_process() {
"$@" &
CHILD=$!; wait "$CHILD"; CHILD="";
}
chown root /var/www/onlyoffice
chown root /var/lib/onlyoffice
function clean_exit {
[[ -z "$CHILD" ]] || kill -s SIGTERM "$CHILD" 2>/dev/null
if [ ${ONLYOFFICE_DATA_CONTAINER} == "false" ] && \
[ ${ONLYOFFICE_DATA_CONTAINER_HOST} == "localhost" ]; then
/usr/bin/documentserver-prepare4shutdown.sh
fi
exit
}
adduser --quiet www-data root
trap clean_exit SIGTERM SIGQUIT SIGABRT SIGINT
DATA_DIR="/var/www/onlyoffice/Data"
LOG_DIR="/var/log/onlyoffice"
# Define '**' behavior explicitly
shopt -s globstar
ONLYOFFICE_HTTPS=${ONLYOFFICE_HTTPS:-false}
APP_DIR="/var/www/${COMPANY_NAME}/documentserver"
DATA_DIR="/var/www/${COMPANY_NAME}/Data"
PRIVATE_DATA_DIR="${DATA_DIR}/.private"
DS_RELEASE_DATE="${PRIVATE_DATA_DIR}/ds_release_date"
LOG_DIR="/var/log/${COMPANY_NAME}"
DS_LOG_DIR="${LOG_DIR}/documentserver"
LIB_DIR="/var/lib/${COMPANY_NAME}"
DS_LIB_DIR="${LIB_DIR}/documentserver"
CONF_DIR="/etc/${COMPANY_NAME}/documentserver"
SUPERVISOR_CONF_DIR="/etc/supervisor/conf.d"
IS_UPGRADE="false"
PLUGINS_ENABLED=${PLUGINS_ENABLED:-true}
SSL_CERTIFICATES_DIR="${DATA_DIR}/certs"
SSL_CERTIFICATE_PATH=${SSL_CERTIFICATE_PATH:-${SSL_CERTIFICATES_DIR}/onlyoffice.crt}
SSL_KEY_PATH=${SSL_KEY_PATH:-${SSL_CERTIFICATES_DIR}/onlyoffice.key}
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_MAXAG:-31536000}
SYSCONF_TEMPLATES_DIR="/app/onlyoffice/setup/config"
ONLYOFFICE_DATA_CONTAINER=${ONLYOFFICE_DATA_CONTAINER:-false}
ONLYOFFICE_DATA_CONTAINER_HOST=${ONLYOFFICE_DATA_CONTAINER_HOST:-localhost}
ONLYOFFICE_DATA_CONTAINER_PORT=80
NGINX_ONLYOFFICE_PATH="/etc/nginx/sites-enabled/onlyoffice-documentserver";
# create base folders
mkdir -p /var/log/onlyoffice/documentserver/FileConverterService/
mkdir -p /var/log/onlyoffice/documentserver/CoAuthoringService/
mkdir -p /var/log/onlyoffice/documentserver/DocService/
mkdir -p /var/log/onlyoffice/documentserver/SpellCheckerService/
mkdir -p /var/log/onlyoffice/documentserver/LibreOfficeService/
mkdir -p /var/log/onlyoffice/documentserver/WatchDogService/
# setup HTTPS
if [ -f "${SSL_CERTIFICATE_PATH}" -a -f "${SSL_KEY_PATH}" ]; then
cp ${SYSCONF_TEMPLATES_DIR}/nginx/onlyoffice-ssl ${NGINX_ONLYOFFICE_PATH}
mkdir ${DATA_DIR}
mkdir ${LOG_DIR}/nginx
# configure nginx
sed 's,{{SSL_CERTIFICATE_PATH}},'"${SSL_CERTIFICATE_PATH}"',' -i ${NGINX_ONLYOFFICE_PATH}
sed 's,{{SSL_KEY_PATH}},'"${SSL_KEY_PATH}"',' -i ${NGINX_ONLYOFFICE_PATH}
# if dhparam path is valid, add to the config, otherwise remove the option
if [ -r "${SSL_DHPARAM_PATH}" ]; then
sed 's,{{SSL_DHPARAM_PATH}},'"${SSL_DHPARAM_PATH}"',' -i ${NGINX_ONLYOFFICE_PATH}
else
sed '/ssl_dhparam {{SSL_DHPARAM_PATH}};/d' -i ${NGINX_ONLYOFFICE_PATH}
fi
sed 's,{{SSL_VERIFY_CLIENT}},'"${SSL_VERIFY_CLIENT}"',' -i ${NGINX_ONLYOFFICE_PATH}
if [ -f /usr/local/share/ca-certificates/ca.crt ]; then
sed 's,{{CA_CERTIFICATES_PATH}},'"${CA_CERTIFICATES_PATH}"',' -i ${NGINX_ONLYOFFICE_PATH}
else
sed '/{{CA_CERTIFICATES_PATH}}/d' -i ${NGINX_ONLYOFFICE_PATH}
fi
if [ "${ONLYOFFICE_HTTPS_HSTS_ENABLED}" == "true" ]; then
sed 's/{{ONLYOFFICE_HTTPS_HSTS_MAXAGE}}/'"${ONLYOFFICE_HTTPS_HSTS_MAXAGE}"'/' -i ${NGINX_ONLYOFFICE_PATH}
else
sed '/{{ONLYOFFICE_HTTPS_HSTS_MAXAGE}}/d' -i ${NGINX_ONLYOFFICE_PATH}
fi
RELEASE_DATE="$(stat -c="%y" ${APP_DIR}/server/DocService/docservice | sed -r 's/=([0-9]+)-([0-9]+)-([0-9]+) ([0-9:.+ ]+)/\1-\2-\3/')";
if [ -f ${DS_RELEASE_DATE} ]; then
PREV_RELEASE_DATE=$(head -n 1 ${DS_RELEASE_DATE})
else
PREV_RELEASE_DATE="0"
fi
service mysql start
if [ "${RELEASE_DATE}" != "${PREV_RELEASE_DATE}" ]; then
if [ ${ONLYOFFICE_DATA_CONTAINER} != "true" ]; then
IS_UPGRADE="true";
fi
fi
SSL_CERTIFICATES_DIR="/usr/share/ca-certificates/ds"
mkdir -p ${SSL_CERTIFICATES_DIR}
if find "${DATA_DIR}/certs" -type f \( -name "*.crt" -o -name "*.pem" \) -print -quit >/dev/null 2>&1; then
cp -f ${DATA_DIR}/certs/* ${SSL_CERTIFICATES_DIR}
chmod 644 ${SSL_CERTIFICATES_DIR}/*.{crt,pem} 2>/dev/null
chmod 400 ${SSL_CERTIFICATES_DIR}/*.key 2>/dev/null
fi
if [[ -z $SSL_CERTIFICATE_PATH ]] && [[ -f ${SSL_CERTIFICATES_DIR}/${COMPANY_NAME}.crt ]]; then
SSL_CERTIFICATE_PATH=${SSL_CERTIFICATES_DIR}/${COMPANY_NAME}.crt
else
SSL_CERTIFICATE_PATH=${SSL_CERTIFICATE_PATH:-${SSL_CERTIFICATES_DIR}/tls.crt}
fi
if [[ -z $SSL_KEY_PATH ]] && [[ -f ${SSL_CERTIFICATES_DIR}/${COMPANY_NAME}.key ]]; then
SSL_KEY_PATH=${SSL_CERTIFICATES_DIR}/${COMPANY_NAME}.key
else
SSL_KEY_PATH=${SSL_KEY_PATH:-${SSL_CERTIFICATES_DIR}/tls.key}
fi
#When set, the well known "root" CAs will be extended with the extra certificates in file
NODE_EXTRA_CA_CERTS=${NODE_EXTRA_CA_CERTS:-${SSL_CERTIFICATES_DIR}/extra-ca-certs.pem}
if [[ -f ${NODE_EXTRA_CA_CERTS} ]]; then
NODE_EXTRA_ENVIRONMENT="${NODE_EXTRA_CA_CERTS}"
elif [[ -f ${SSL_CERTIFICATE_PATH} ]]; then
SSL_CERTIFICATE_SUBJECT=$(openssl x509 -subject -noout -in "${SSL_CERTIFICATE_PATH}" | sed 's/subject=//')
SSL_CERTIFICATE_ISSUER=$(openssl x509 -issuer -noout -in "${SSL_CERTIFICATE_PATH}" | sed 's/issuer=//')
#Add self-signed certificate to trusted list for validating Docs requests to the test example
if [[ -n $SSL_CERTIFICATE_SUBJECT && $SSL_CERTIFICATE_SUBJECT == $SSL_CERTIFICATE_ISSUER ]]; then
NODE_EXTRA_ENVIRONMENT="${SSL_CERTIFICATE_PATH}"
fi
fi
if [[ -n $NODE_EXTRA_ENVIRONMENT ]]; then
sed -i "s|^environment=.*$|&,NODE_EXTRA_CA_CERTS=${NODE_EXTRA_ENVIRONMENT}|" /etc/supervisor/conf.d/*.conf
fi
CA_CERTIFICATES_PATH=${CA_CERTIFICATES_PATH:-${SSL_CERTIFICATES_DIR}/ca-certificates.pem}
SSL_DHPARAM_PATH=${SSL_DHPARAM_PATH:-${SSL_CERTIFICATES_DIR}/dhparam.pem}
SSL_VERIFY_CLIENT=${SSL_VERIFY_CLIENT:-off}
USE_UNAUTHORIZED_STORAGE=${USE_UNAUTHORIZED_STORAGE:-false}
ONLYOFFICE_HTTPS_HSTS_ENABLED=${ONLYOFFICE_HTTPS_HSTS_ENABLED:-true}
ONLYOFFICE_HTTPS_HSTS_MAXAGE=${ONLYOFFICE_HTTPS_HSTS_MAXAGE:-31536000}
SYSCONF_TEMPLATES_DIR="/app/ds/setup/config"
NGINX_CONFD_PATH="/etc/nginx/conf.d";
NGINX_ONLYOFFICE_PATH="${CONF_DIR}/nginx"
NGINX_ONLYOFFICE_CONF="${NGINX_ONLYOFFICE_PATH}/ds.conf"
NGINX_ONLYOFFICE_EXAMPLE_PATH="${CONF_DIR}-example/nginx"
NGINX_ONLYOFFICE_EXAMPLE_CONF="${NGINX_ONLYOFFICE_EXAMPLE_PATH}/includes/ds-example.conf"
NGINX_CONFIG_PATH="/etc/nginx/nginx.conf"
NGINX_WORKER_PROCESSES=${NGINX_WORKER_PROCESSES:-1}
# Limiting the maximum number of simultaneous connections due to possible memory shortage
LIMIT=$(ulimit -n); [ $LIMIT -gt 1048576 ] && LIMIT=1048576
NGINX_WORKER_CONNECTIONS=${NGINX_WORKER_CONNECTIONS:-$LIMIT}
RABBIT_CONNECTIONS=${RABBIT_CONNECTIONS:-$LIMIT}
JWT_ENABLED=${JWT_ENABLED:-true}
# validate user's vars before usinig in json
if [ "${JWT_ENABLED}" == "true" ]; then
JWT_ENABLED="true"
else
JWT_ENABLED="false"
fi
[ -z $JWT_SECRET ] && JWT_MESSAGE='JWT is enabled by default. A random secret is generated automatically. Run the command "docker exec $(sudo docker ps -q) sudo documentserver-jwt-status.sh" to get information about JWT.'
JWT_SECRET=${JWT_SECRET:-$(pwgen -s 32)}
JWT_HEADER=${JWT_HEADER:-Authorization}
JWT_IN_BODY=${JWT_IN_BODY:-false}
WOPI_ENABLED=${WOPI_ENABLED:-false}
ALLOW_META_IP_ADDRESS=${ALLOW_META_IP_ADDRESS:-false}
ALLOW_PRIVATE_IP_ADDRESS=${ALLOW_PRIVATE_IP_ADDRESS:-false}
GENERATE_FONTS=${GENERATE_FONTS:-true}
if [[ ${PRODUCT_NAME}${PRODUCT_EDITION} == "documentserver" ]]; then
REDIS_ENABLED=false
else
REDIS_ENABLED=true
fi
ONLYOFFICE_DEFAULT_CONFIG=${CONF_DIR}/local.json
ONLYOFFICE_LOG4JS_CONFIG=${CONF_DIR}/log4js/production.json
ONLYOFFICE_EXAMPLE_CONFIG=${CONF_DIR}-example/local.json
JSON_BIN=${APP_DIR}/npm/json
JSON="${JSON_BIN} -q -f ${ONLYOFFICE_DEFAULT_CONFIG}"
JSON_LOG="${JSON_BIN} -q -f ${ONLYOFFICE_LOG4JS_CONFIG}"
JSON_EXAMPLE="${JSON_BIN} -q -f ${ONLYOFFICE_EXAMPLE_CONFIG}"
LOCAL_SERVICES=()
PG_ROOT=/var/lib/postgresql
PG_NAME=main
PGDATA=${PG_ROOT}/${PG_VERSION}/${PG_NAME}
PG_NEW_CLUSTER=false
RABBITMQ_DATA=/var/lib/rabbitmq
REDIS_DATA=/var/lib/redis
if [ "${LETS_ENCRYPT_DOMAIN}" != "" -a "${LETS_ENCRYPT_MAIL}" != "" ]; then
LETSENCRYPT_ROOT_DIR="/etc/letsencrypt/live"
SSL_CERTIFICATE_PATH=${LETSENCRYPT_ROOT_DIR}/${LETS_ENCRYPT_DOMAIN}/fullchain.pem
SSL_KEY_PATH=${LETSENCRYPT_ROOT_DIR}/${LETS_ENCRYPT_DOMAIN}/privkey.pem
fi
read_setting(){
deprecated_var POSTGRESQL_SERVER_HOST DB_HOST
deprecated_var POSTGRESQL_SERVER_PORT DB_PORT
deprecated_var POSTGRESQL_SERVER_DB_NAME DB_NAME
deprecated_var POSTGRESQL_SERVER_USER DB_USER
deprecated_var POSTGRESQL_SERVER_PASS DB_PWD
deprecated_var RABBITMQ_SERVER_URL AMQP_URI
deprecated_var AMQP_SERVER_URL AMQP_URI
deprecated_var AMQP_SERVER_TYPE AMQP_TYPE
METRICS_ENABLED="${METRICS_ENABLED:-false}"
METRICS_HOST="${METRICS_HOST:-localhost}"
METRICS_PORT="${METRICS_PORT:-8125}"
METRICS_PREFIX="${METRICS_PREFIX:-.ds}"
DB_HOST=${DB_HOST:-${POSTGRESQL_SERVER_HOST:-$(${JSON} services.CoAuthoring.sql.dbHost)}}
DB_TYPE=${DB_TYPE:-$(${JSON} services.CoAuthoring.sql.type)}
case $DB_TYPE in
"postgres")
DB_PORT=${DB_PORT:-"5432"}
;;
"mariadb"|"mysql")
DB_PORT=${DB_PORT:-"3306"}
;;
"dameng")
DB_PORT=${DB_PORT:-"5236"}
;;
"mssql")
DB_PORT=${DB_PORT:-"1433"}
;;
"oracle")
DB_PORT=${DB_PORT:-"1521"}
;;
"")
DB_PORT=${DB_PORT:-${POSTGRESQL_SERVER_PORT:-$(${JSON} services.CoAuthoring.sql.dbPort)}}
;;
*)
echo "ERROR: unknown database type"
exit 1
;;
esac
DB_NAME=${DB_NAME:-${POSTGRESQL_SERVER_DB_NAME:-$(${JSON} services.CoAuthoring.sql.dbName)}}
DB_USER=${DB_USER:-${POSTGRESQL_SERVER_USER:-$(${JSON} services.CoAuthoring.sql.dbUser)}}
DB_PWD=${DB_PWD:-${POSTGRESQL_SERVER_PASS:-$(${JSON} services.CoAuthoring.sql.dbPass)}}
RABBITMQ_SERVER_URL=${RABBITMQ_SERVER_URL:-$(${JSON} rabbitmq.url)}
AMQP_URI=${AMQP_URI:-${AMQP_SERVER_URL:-${RABBITMQ_SERVER_URL}}}
AMQP_TYPE=${AMQP_TYPE:-${AMQP_SERVER_TYPE:-rabbitmq}}
parse_rabbitmq_url ${AMQP_URI}
REDIS_SERVER_HOST=${REDIS_SERVER_HOST:-$(${JSON} services.CoAuthoring.redis.host)}
REDIS_SERVER_PORT=${REDIS_SERVER_PORT:-6379}
DS_LOG_LEVEL=${DS_LOG_LEVEL:-$(${JSON_LOG} categories.default.level)}
}
deprecated_var() {
if [[ -n ${!1} ]]; then
echo "Variable $1 is deprecated. Use $2 instead."
fi
}
parse_rabbitmq_url(){
local amqp=$1
# extract the protocol
local proto="$(echo $amqp | grep :// | sed -e's,^\(.*://\).*,\1,g')"
# remove the protocol
local url="$(echo ${amqp/$proto/})"
# extract the user and password (if any)
local userpass="`echo $url | grep @ | cut -d@ -f1`"
local pass=`echo $userpass | grep : | cut -d: -f2`
local user
if [ -n "$pass" ]; then
user=`echo $userpass | grep : | cut -d: -f1`
else
user=$userpass
fi
# extract the host
local hostport="$(echo ${url/$userpass@/} | cut -d/ -f1)"
# by request - try to extract the port
local port="$(echo $hostport | grep : | sed -r 's_^.*:+|/.*$__g')"
local host
if [ -n "$port" ]; then
host=`echo $hostport | grep : | cut -d: -f1`
else
host=$hostport
port="5672"
fi
# extract the path (if any)
local path="$(echo $url | grep / | cut -d/ -f2-)"
AMQP_SERVER_PROTO=${proto:0:-3}
AMQP_SERVER_HOST=$host
AMQP_SERVER_USER=$user
AMQP_SERVER_PASS=$pass
AMQP_SERVER_PORT=$port
}
waiting_for_connection(){
until nc -z -w 3 "$1" "$2"; do
>&2 echo "Waiting for connection to the $1 host on port $2"
sleep 1
done
}
waiting_for_db_ready(){
case $DB_TYPE in
"oracle")
PDB="XEPDB1"
ORACLE_SQL="sqlplus $DB_USER/$DB_PWD@//$DB_HOST:$DB_PORT/$PDB"
DB_TEST="echo \"SELECT version FROM V\$INSTANCE;\" | $ORACLE_SQL 2>/dev/null | grep \"Connected\" | wc -l"
;;
*)
return
;;
esac
for (( i=1; i <= 10; i++ )); do
RES=$(eval $DB_TEST)
if [ "$RES" -ne "0" ]; then
echo "Database is ready"
break
fi
sleep 5
done
}
waiting_for_db(){
waiting_for_connection $DB_HOST $DB_PORT
waiting_for_db_ready
}
waiting_for_amqp(){
waiting_for_connection ${AMQP_SERVER_HOST} ${AMQP_SERVER_PORT}
}
waiting_for_redis(){
waiting_for_connection ${REDIS_SERVER_HOST} ${REDIS_SERVER_PORT}
}
waiting_for_datacontainer(){
waiting_for_connection ${ONLYOFFICE_DATA_CONTAINER_HOST} ${ONLYOFFICE_DATA_CONTAINER_PORT}
}
update_statsd_settings(){
${JSON} -I -e "if(this.statsd===undefined)this.statsd={};"
${JSON} -I -e "this.statsd.useMetrics = '${METRICS_ENABLED}'"
${JSON} -I -e "this.statsd.host = '${METRICS_HOST}'"
${JSON} -I -e "this.statsd.port = '${METRICS_PORT}'"
${JSON} -I -e "this.statsd.prefix = '${METRICS_PREFIX}'"
sed -i -E "s/(autostart|autorestart)=.*$/\1=${METRICS_ENABLED}/g" ${SUPERVISOR_CONF_DIR}/ds-metrics.conf
}
update_db_settings(){
${JSON} -I -e "this.services.CoAuthoring.sql.type = '${DB_TYPE}'"
${JSON} -I -e "this.services.CoAuthoring.sql.dbHost = '${DB_HOST}'"
${JSON} -I -e "this.services.CoAuthoring.sql.dbPort = '${DB_PORT}'"
${JSON} -I -e "this.services.CoAuthoring.sql.dbName = '${DB_NAME}'"
${JSON} -I -e "this.services.CoAuthoring.sql.dbUser = '${DB_USER}'"
${JSON} -I -e "this.services.CoAuthoring.sql.dbPass = '${DB_PWD}'"
}
update_rabbitmq_setting(){
if [ "${AMQP_TYPE}" == "rabbitmq" ]; then
${JSON} -I -e "if(this.queue===undefined)this.queue={};"
${JSON} -I -e "this.queue.type = 'rabbitmq'"
${JSON} -I -e "this.rabbitmq.url = '${AMQP_URI}'"
fi
if [ "${AMQP_TYPE}" == "activemq" ]; then
${JSON} -I -e "if(this.queue===undefined)this.queue={};"
${JSON} -I -e "this.queue.type = 'activemq'"
${JSON} -I -e "if(this.activemq===undefined)this.activemq={};"
${JSON} -I -e "if(this.activemq.connectOptions===undefined)this.activemq.connectOptions={};"
${JSON} -I -e "this.activemq.connectOptions.host = '${AMQP_SERVER_HOST}'"
if [ ! "${AMQP_SERVER_PORT}" == "" ]; then
${JSON} -I -e "this.activemq.connectOptions.port = '${AMQP_SERVER_PORT}'"
else
${JSON} -I -e "delete this.activemq.connectOptions.port"
fi
if [ ! "${AMQP_SERVER_USER}" == "" ]; then
${JSON} -I -e "this.activemq.connectOptions.username = '${AMQP_SERVER_USER}'"
else
${JSON} -I -e "delete this.activemq.connectOptions.username"
fi
if [ ! "${AMQP_SERVER_PASS}" == "" ]; then
${JSON} -I -e "this.activemq.connectOptions.password = '${AMQP_SERVER_PASS}'"
else
${JSON} -I -e "delete this.activemq.connectOptions.password"
fi
case "${AMQP_SERVER_PROTO}" in
amqp+ssl|amqps)
${JSON} -I -e "this.activemq.connectOptions.transport = 'tls'"
;;
*)
${JSON} -I -e "delete this.activemq.connectOptions.transport"
;;
esac
fi
}
update_redis_settings(){
${JSON} -I -e "if(this.services.CoAuthoring.redis===undefined)this.services.CoAuthoring.redis={};"
${JSON} -I -e "this.services.CoAuthoring.redis.host = '${REDIS_SERVER_HOST}'"
${JSON} -I -e "this.services.CoAuthoring.redis.port = '${REDIS_SERVER_PORT}'"
if [ -n "${REDIS_SERVER_PASS}" ]; then
${JSON} -I -e "this.services.CoAuthoring.redis.options = {'password':'${REDIS_SERVER_PASS}'}"
fi
}
update_ds_settings(){
${JSON} -I -e "this.services.CoAuthoring.token.enable.browser = ${JWT_ENABLED}"
${JSON} -I -e "this.services.CoAuthoring.token.enable.request.inbox = ${JWT_ENABLED}"
${JSON} -I -e "this.services.CoAuthoring.token.enable.request.outbox = ${JWT_ENABLED}"
${JSON} -I -e "this.services.CoAuthoring.secret.inbox.string = '${JWT_SECRET}'"
${JSON} -I -e "this.services.CoAuthoring.secret.outbox.string = '${JWT_SECRET}'"
${JSON} -I -e "this.services.CoAuthoring.secret.session.string = '${JWT_SECRET}'"
${JSON} -I -e "this.services.CoAuthoring.token.inbox.header = '${JWT_HEADER}'"
${JSON} -I -e "this.services.CoAuthoring.token.outbox.header = '${JWT_HEADER}'"
${JSON} -I -e "this.services.CoAuthoring.token.inbox.inBody = ${JWT_IN_BODY}"
${JSON} -I -e "this.services.CoAuthoring.token.outbox.inBody = ${JWT_IN_BODY}"
if [ -f "${ONLYOFFICE_EXAMPLE_CONFIG}" ]; then
${JSON_EXAMPLE} -I -e "this.server.token.enable = ${JWT_ENABLED}"
${JSON_EXAMPLE} -I -e "this.server.token.secret = '${JWT_SECRET}'"
${JSON_EXAMPLE} -I -e "this.server.token.authorizationHeader = '${JWT_HEADER}'"
fi
if [ "${USE_UNAUTHORIZED_STORAGE}" == "true" ]; then
${JSON} -I -e "if(this.services.CoAuthoring.requestDefaults===undefined)this.services.CoAuthoring.requestDefaults={}"
${JSON} -I -e "if(this.services.CoAuthoring.requestDefaults.rejectUnauthorized===undefined)this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false"
fi
WOPI_PRIVATE_KEY="${DATA_DIR}/wopi_private.key"
WOPI_PUBLIC_KEY="${DATA_DIR}/wopi_public.key"
[ ! -f "${WOPI_PRIVATE_KEY}" ] && echo -n "Generating WOPI private key..." && openssl genpkey -algorithm RSA -outform PEM -out "${WOPI_PRIVATE_KEY}" >/dev/null 2>&1 && echo "Done"
[ ! -f "${WOPI_PUBLIC_KEY}" ] && echo -n "Generating WOPI public key..." && openssl rsa -RSAPublicKey_out -in "${WOPI_PRIVATE_KEY}" -outform "MS PUBLICKEYBLOB" -out "${WOPI_PUBLIC_KEY}" >/dev/null 2>&1 && echo "Done"
WOPI_MODULUS=$(openssl rsa -pubin -inform "MS PUBLICKEYBLOB" -modulus -noout -in "${WOPI_PUBLIC_KEY}" | sed 's/Modulus=//' | xxd -r -p | openssl base64 -A)
WOPI_EXPONENT=$(openssl rsa -pubin -inform "MS PUBLICKEYBLOB" -text -noout -in "${WOPI_PUBLIC_KEY}" | grep -oP '(?<=Exponent: )\d+')
${JSON} -I -e "if(this.wopi===undefined)this.wopi={};"
${JSON} -I -e "this.wopi.enable = ${WOPI_ENABLED}"
${JSON} -I -e "this.wopi.privateKey = '$(awk '{printf "%s\\n", $0}' ${WOPI_PRIVATE_KEY})'"
${JSON} -I -e "this.wopi.privateKeyOld = '$(awk '{printf "%s\\n", $0}' ${WOPI_PRIVATE_KEY})'"
${JSON} -I -e "this.wopi.publicKey = '$(openssl base64 -in ${WOPI_PUBLIC_KEY} -A)'"
${JSON} -I -e "this.wopi.publicKeyOld = '$(openssl base64 -in ${WOPI_PUBLIC_KEY} -A)'"
${JSON} -I -e "this.wopi.modulus = '${WOPI_MODULUS}'"
${JSON} -I -e "this.wopi.modulusOld = '${WOPI_MODULUS}'"
${JSON} -I -e "this.wopi.exponent = ${WOPI_EXPONENT}"
${JSON} -I -e "this.wopi.exponentOld = ${WOPI_EXPONENT}"
if [ "${ALLOW_META_IP_ADDRESS}" = "true" ] || [ "${ALLOW_PRIVATE_IP_ADDRESS}" = "true" ]; then
${JSON} -I -e "if(this.services.CoAuthoring['request-filtering-agent']===undefined)this.services.CoAuthoring['request-filtering-agent']={}"
[ "${ALLOW_META_IP_ADDRESS}" = "true" ] && ${JSON} -I -e "this.services.CoAuthoring['request-filtering-agent'].allowMetaIPAddress = true"
[ "${ALLOW_PRIVATE_IP_ADDRESS}" = "true" ] && ${JSON} -I -e "this.services.CoAuthoring['request-filtering-agent'].allowPrivateIPAddress = true"
fi
}
create_postgresql_cluster(){
local pg_conf_dir=/etc/postgresql/${PG_VERSION}/${PG_NAME}
local postgresql_conf=$pg_conf_dir/postgresql.conf
local hba_conf=$pg_conf_dir/pg_hba.conf
mv $postgresql_conf $postgresql_conf.backup
mv $hba_conf $hba_conf.backup
pg_createcluster ${PG_VERSION} ${PG_NAME}
}
create_postgresql_db(){
sudo -u postgres psql -c "CREATE USER $DB_USER WITH password '"$DB_PWD"';"
sudo -u postgres psql -c "CREATE DATABASE $DB_NAME OWNER $DB_USER;"
}
create_mssql_db(){
MSSQL="/opt/mssql-tools18/bin/sqlcmd -S $DB_HOST,$DB_PORT"
$MSSQL -U $DB_USER -P "$DB_PWD" -C -Q "IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = '$DB_NAME') BEGIN CREATE DATABASE $DB_NAME; END"
}
create_db_tbl() {
case $DB_TYPE in
"postgres")
create_postgresql_tbl
;;
"mariadb"|"mysql")
create_mysql_tbl
;;
"mssql")
create_mssql_tbl
;;
"oracle")
create_oracle_tbl
;;
esac
}
upgrade_db_tbl() {
case $DB_TYPE in
"postgres")
upgrade_postgresql_tbl
;;
"mariadb"|"mysql")
upgrade_mysql_tbl
;;
"mssql")
upgrade_mssql_tbl
;;
"oracle")
upgrade_oracle_tbl
;;
esac
}
upgrade_postgresql_tbl() {
if [ -n "$DB_PWD" ]; then
export PGPASSWORD=$DB_PWD
fi
PSQL="psql -q -h$DB_HOST -p$DB_PORT -d$DB_NAME -U$DB_USER -w"
$PSQL -f "$APP_DIR/server/schema/postgresql/removetbl.sql"
$PSQL -f "$APP_DIR/server/schema/postgresql/createdb.sql"
}
upgrade_mysql_tbl() {
CONNECTION_PARAMS="-h$DB_HOST -P$DB_PORT -u$DB_USER -p$DB_PWD -w"
MYSQL="mysql -q $CONNECTION_PARAMS"
$MYSQL $DB_NAME < "$APP_DIR/server/schema/mysql/removetbl.sql" >/dev/null 2>&1
$MYSQL $DB_NAME < "$APP_DIR/server/schema/mysql/createdb.sql" >/dev/null 2>&1
}
upgrade_mssql_tbl() {
CONN_PARAMS="-U $DB_USER -P "$DB_PWD" -C"
MSSQL="/opt/mssql-tools18/bin/sqlcmd -S $DB_HOST,$DB_PORT $CONN_PARAMS"
$MSSQL < "$APP_DIR/server/schema/mssql/removetbl.sql" >/dev/null 2>&1
$MSSQL < "$APP_DIR/server/schema/mssql/createdb.sql" >/dev/null 2>&1
}
upgrade_oracle_tbl() {
PDB="XEPDB1"
ORACLE_SQL="sqlplus $DB_USER/$DB_PWD@//$DB_HOST:$DB_PORT/$PDB"
$ORACLE_SQL @$APP_DIR/server/schema/oracle/removetbl.sql >/dev/null 2>&1
$ORACLE_SQL @$APP_DIR/server/schema/oracle/createdb.sql >/dev/null 2>&1
}
create_postgresql_tbl() {
if [ -n "$DB_PWD" ]; then
export PGPASSWORD=$DB_PWD
fi
PSQL="psql -q -h$DB_HOST -p$DB_PORT -d$DB_NAME -U$DB_USER -w"
$PSQL -f "$APP_DIR/server/schema/postgresql/createdb.sql"
}
create_mysql_tbl() {
CONNECTION_PARAMS="-h$DB_HOST -P$DB_PORT -u$DB_USER -p$DB_PWD -w"
MYSQL="mysql -q $CONNECTION_PARAMS"
# Create db on remote server
$MYSQL -e "CREATE DATABASE IF NOT EXISTS $DB_NAME DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;" >/dev/null 2>&1
$MYSQL $DB_NAME < "$APP_DIR/server/schema/mysql/createdb.sql" >/dev/null 2>&1
}
create_mssql_tbl() {
create_mssql_db
CONN_PARAMS="-U $DB_USER -P "$DB_PWD" -C"
MSSQL="/opt/mssql-tools18/bin/sqlcmd -S $DB_HOST,$DB_PORT $CONN_PARAMS"
$MSSQL < "$APP_DIR/server/schema/mssql/createdb.sql" >/dev/null 2>&1
}
create_oracle_tbl() {
PDB="XEPDB1"
ORACLE_SQL="sqlplus $DB_USER/$DB_PWD@//$DB_HOST:$DB_PORT/$PDB"
$ORACLE_SQL @$APP_DIR/server/schema/oracle/createdb.sql >/dev/null 2>&1
}
update_welcome_page() {
WELCOME_PAGE="${APP_DIR}-example/welcome/docker.html"
if [[ -e $WELCOME_PAGE ]]; then
DOCKER_CONTAINER_ID=$(basename $(cat /proc/1/cpuset))
(( ${#DOCKER_CONTAINER_ID} < 12 )) && DOCKER_CONTAINER_ID=$(hostname)
if (( ${#DOCKER_CONTAINER_ID} >= 12 )); then
if [[ -x $(command -v docker) ]]; then
DOCKER_CONTAINER_NAME=$(docker inspect --format="{{.Name}}" $DOCKER_CONTAINER_ID)
sed 's/$(sudo docker ps -q)/'"${DOCKER_CONTAINER_NAME#/}"'/' -i $WELCOME_PAGE
JWT_MESSAGE=$(echo $JWT_MESSAGE | sed 's/$(sudo docker ps -q)/'"${DOCKER_CONTAINER_NAME#/}"'/')
else
sed 's/$(sudo docker ps -q)/'"${DOCKER_CONTAINER_ID::12}"'/' -i $WELCOME_PAGE
JWT_MESSAGE=$(echo $JWT_MESSAGE | sed 's/$(sudo docker ps -q)/'"${DOCKER_CONTAINER_ID::12}"'/')
fi
fi
fi
}
update_nginx_settings(){
# Set up nginx
sed 's/^worker_processes.*/'"worker_processes ${NGINX_WORKER_PROCESSES};"'/' -i ${NGINX_CONFIG_PATH}
sed 's/worker_connections.*/'"worker_connections ${NGINX_WORKER_CONNECTIONS};"'/' -i ${NGINX_CONFIG_PATH}
sed 's/access_log.*/'"access_log off;"'/' -i ${NGINX_CONFIG_PATH}
# setup HTTPS
if [ -f "${SSL_CERTIFICATE_PATH}" -a -f "${SSL_KEY_PATH}" ]; then
cp -f ${NGINX_ONLYOFFICE_PATH}/ds-ssl.conf.tmpl ${NGINX_ONLYOFFICE_CONF}
# configure nginx
sed 's,{{SSL_CERTIFICATE_PATH}},'"${SSL_CERTIFICATE_PATH}"',' -i ${NGINX_ONLYOFFICE_CONF}
sed 's,{{SSL_KEY_PATH}},'"${SSL_KEY_PATH}"',' -i ${NGINX_ONLYOFFICE_CONF}
# turn on http2
sed 's,\(443 ssl\),\1 http2,' -i ${NGINX_ONLYOFFICE_CONF}
# if dhparam path is valid, add to the config, otherwise remove the option
if [ -r "${SSL_DHPARAM_PATH}" ]; then
sed 's,\(\#* *\)\?\(ssl_dhparam \).*\(;\)$,'"\2${SSL_DHPARAM_PATH}\3"',' -i ${NGINX_ONLYOFFICE_CONF}
else
sed '/ssl_dhparam/d' -i ${NGINX_ONLYOFFICE_CONF}
fi
sed 's,\(ssl_verify_client \).*\(;\)$,'"\1${SSL_VERIFY_CLIENT}\2"',' -i ${NGINX_ONLYOFFICE_CONF}
if [ -f "${CA_CERTIFICATES_PATH}" ]; then
sed '/ssl_verify_client/a '"ssl_client_certificate ${CA_CERTIFICATES_PATH}"';' -i ${NGINX_ONLYOFFICE_CONF}
fi
if [ "${ONLYOFFICE_HTTPS_HSTS_ENABLED}" == "true" ]; then
sed 's,\(max-age=\).*\(;\)$,'"\1${ONLYOFFICE_HTTPS_HSTS_MAXAGE}\2"',' -i ${NGINX_ONLYOFFICE_CONF}
else
sed '/max-age=/d' -i ${NGINX_ONLYOFFICE_CONF}
fi
else
ln -sf ${NGINX_ONLYOFFICE_PATH}/ds.conf.tmpl ${NGINX_ONLYOFFICE_CONF}
fi
# check if ipv6 supported otherwise remove it from nginx config
if [ ! -f /proc/net/if_inet6 ]; then
sed '/listen\s\+\[::[0-9]*\].\+/d' -i $NGINX_ONLYOFFICE_CONF
fi
if [ -f "${NGINX_ONLYOFFICE_EXAMPLE_CONF}" ]; then
sed 's/linux/docker/' -i ${NGINX_ONLYOFFICE_EXAMPLE_CONF}
fi
start_process documentserver-update-securelink.sh -s ${SECURE_LINK_SECRET:-$(pwgen -s 20)} -r false
}
update_log_settings(){
${JSON_LOG} -I -e "this.categories.default.level = '${DS_LOG_LEVEL}'"
}
update_logrotate_settings(){
sed 's|\(^su\b\).*|\1 root root|' -i /etc/logrotate.conf
}
update_release_date(){
mkdir -p ${PRIVATE_DATA_DIR}
echo ${RELEASE_DATE} > ${DS_RELEASE_DATE}
}
# create base folders
for i in converter docservice metrics; do
mkdir -p "${DS_LOG_DIR}/$i"
done
mkdir -p ${DS_LOG_DIR}-example
# create app folders
for i in ${DS_LIB_DIR}/App_Data/cache/files ${DS_LIB_DIR}/App_Data/docbuilder ${DS_LIB_DIR}-example/files; do
mkdir -p "$i"
done
# change folder rights
for i in ${DS_LOG_DIR} ${DS_LOG_DIR}-example ${LIB_DIR}; do
chown -R ds:ds "$i"
chmod -R 755 "$i"
done
if [ ${ONLYOFFICE_DATA_CONTAINER_HOST} = "localhost" ]; then
read_setting
if [ $METRICS_ENABLED = "true" ]; then
update_statsd_settings
fi
update_welcome_page
update_log_settings
update_ds_settings
# update settings by env variables
if [ $DB_HOST != "localhost" ]; then
update_db_settings
waiting_for_db
create_db_tbl
else
# change rights for postgres directory
chown -R postgres:postgres ${PG_ROOT}
chmod -R 700 ${PG_ROOT}
# create new db if it isn't exist
if [ ! -d ${PGDATA} ]; then
create_postgresql_cluster
PG_NEW_CLUSTER=true
fi
LOCAL_SERVICES+=("postgresql")
fi
if [ ${AMQP_SERVER_HOST} != "localhost" ]; then
update_rabbitmq_setting
else
# change rights for rabbitmq directory
chown -R rabbitmq:rabbitmq ${RABBITMQ_DATA}
chmod -R go=rX,u=rwX ${RABBITMQ_DATA}
if [ -f ${RABBITMQ_DATA}/.erlang.cookie ]; then
chmod 400 ${RABBITMQ_DATA}/.erlang.cookie
fi
echo "ulimit -n $RABBIT_CONNECTIONS" >> /etc/default/rabbitmq-server
LOCAL_SERVICES+=("rabbitmq-server")
# allow Rabbitmq startup after container kill
rm -rf /var/run/rabbitmq
fi
if [ ${REDIS_ENABLED} = "true" ]; then
if [ ${REDIS_SERVER_HOST} != "localhost" ]; then
update_redis_settings
else
# change rights for redis directory
chown -R redis:redis ${REDIS_DATA}
chmod -R 750 ${REDIS_DATA}
LOCAL_SERVICES+=("redis-server")
fi
fi
else
# no need to update settings just wait for remote data
waiting_for_datacontainer
# read settings after the data container in ready state
# to prevent get unconfigureted data
read_setting
update_welcome_page
fi
find /etc/${COMPANY_NAME} ! -path '*logrotate*' -exec chown ds:ds {} \;
#start needed local services
for i in ${LOCAL_SERVICES[@]}; do
service $i start
done
if [ ${PG_NEW_CLUSTER} = "true" ]; then
create_postgresql_db
create_postgresql_tbl
fi
if [ ${ONLYOFFICE_DATA_CONTAINER} != "true" ]; then
waiting_for_db
waiting_for_amqp
if [ ${REDIS_ENABLED} = "true" ]; then
waiting_for_redis
fi
if [ "${IS_UPGRADE}" = "true" ]; then
upgrade_db_tbl
update_release_date
fi
update_nginx_settings
service supervisor start
# start cron to enable log rotating
update_logrotate_settings
service cron start
fi
# Fix to resolve the `unknown "cache_tag" variable` error
start_process documentserver-flush-cache.sh -r false
# nginx used as a proxy, and as data container status service.
# it run in all cases.
service nginx start
service supervisor start
if [ "${LETS_ENCRYPT_DOMAIN}" != "" -a "${LETS_ENCRYPT_MAIL}" != "" ]; then
if [ ! -f "${SSL_CERTIFICATE_PATH}" -a ! -f "${SSL_KEY_PATH}" ]; then
start_process documentserver-letsencrypt.sh ${LETS_ENCRYPT_MAIL} ${LETS_ENCRYPT_DOMAIN}
fi
fi
# Regenerate the fonts list and the fonts thumbnails
if [ "${GENERATE_FONTS}" == "true" ]; then
start_process documentserver-generate-allfonts.sh ${ONLYOFFICE_DATA_CONTAINER}
fi
if [ "${PLUGINS_ENABLED}" = "true" ]; then
echo -n Installing plugins, please wait...
start_process documentserver-pluginsmanager.sh -r false --update=\"${APP_DIR}/sdkjs-plugins/plugin-list-default.json\" >/dev/null
echo Done
fi
start_process documentserver-static-gzip.sh ${ONLYOFFICE_DATA_CONTAINER}
echo "${JWT_MESSAGE}"
start_process tail -f /var/log/${COMPANY_NAME}/**/*.log

3
tests/README.md Normal file
View File

@ -0,0 +1,3 @@
The files in this folder are intended for use in integration auto-tests.
All credentials are strictly for testing purposes only.

32
tests/activemq.yml Normal file
View File

@ -0,0 +1,32 @@
version: '2.1'
services:
onlyoffice-documentserver:
container_name: onlyoffice-documentserver
build:
context: ../.
environment:
- AMQP_TYPE=${AMQP_TYPE:-activemq}
- AMQP_URI=${AMQP_URI:-amqp://guest:guest@onlyoffice-activemq}
stdin_open: true
restart: always
ports:
- '80:80'
- '443:443'
networks:
- onlyoffice
onlyoffice-activemq:
container_name: onlyoffice-activemq
image: webcenter/activemq:${ACTIVEMQ_VERSION:-5.14.3}
environment:
- ACTIVEMQ_USERS_guest=${ACTIVEMQ_USERS_guest:-guest}
- ACTIVEMQ_GROUPS_owners=${ACTIVEMQ_GROUPS_owners:-guest}
restart: always
networks:
- onlyoffice
expose:
- '5672'
networks:
onlyoffice:
driver: 'bridge'

View File

@ -0,0 +1,18 @@
version: '2.1'
services:
onlyoffice-documentserver:
container_name: onlyoffice-documentserver
build:
context: ../.
environment:
- SSL_CERTIFICATE_PATH=${SSL_CERTIFICATE_PATH:-/var/www/onlyoffice/Data/certs/tls.crt}
- SSL_KEY_PATH=${SSL_KEY_PATH:-/var/www/onlyoffice/Data/certs/tls.key}
- CA_CERTIFICATES_PATH=${CA_CERTIFICATES_PATH:-/var/www/onlyoffice/Data/certs/ca-certificates.pem}
- SSL_DHPARAM_PATH=${SSL_DHPARAM_PATH:-/var/www/onlyoffice/Data/certs/dhparam.pem}
stdin_open: true
restart: always
ports:
- '80:80'
- '443:443'
volumes:
- ./data:/var/www/onlyoffice/Data

13
tests/certs.yml Normal file
View File

@ -0,0 +1,13 @@
version: '2.1'
services:
onlyoffice-documentserver:
container_name: onlyoffice-documentserver
build:
context: ../.
stdin_open: true
restart: always
ports:
- '80:80'
- '443:443'
volumes:
- ./data:/var/www/onlyoffice/Data

1
tests/damengdb/.env Normal file
View File

@ -0,0 +1 @@
VERSION=latest

19
tests/damengdb/README.md Normal file
View File

@ -0,0 +1,19 @@
## Stand Documentserver with damengdb
### How it works
For deploy stand, you need:
**STEP 1**: Build you own images, do it with command:
```bash
docker compose build
```
**STEP 2**: Wait build and when it finish deploy with command:
```bash
docker compose up -d
```
Thats all.

View File

@ -0,0 +1,57 @@
FROM onlyoffice/damengdb:8.1.2 as damengdb
ARG DM8_USER="SYSDBA"
ARG DM8_PASS="SYSDBA001"
ARG DB_HOST="localhost"
ARG DB_PORT="5236"
ARG DISQL_BIN="/opt/dmdbms/bin"
SHELL ["/bin/bash", "-c"]
COPY <<"EOF" /wait_dm_ready.sh
#!/usr/bin/env bash
function wait_dm_ready() {
cd /opt/dmdbms/bin
for i in `seq 1 10`; do
echo `./disql /nolog <<EOF
CONN SYSDBA/SYSDBA001@localhost
exit
EOF` | grep "connection failure" > /dev/null 2>&1
if [ $? -eq 0 ]; then
echo "DM Database is not OK, please wait..."
sleep 10
else
echo "DM Database is OK"
break
fi
done
}
wait_dm_ready
EOF
COPY <<"EOF" /permissions.sql
CREATE SYNONYM onlyoffice.DOC_CHANGES FOR sysdba.DOC_CHANGES;
CREATE SYNONYM onlyoffice.TASK_RESULT FOR sysdba.TASK_RESULT;
GRANT ALL PRIVILEGES ON sysdba.DOC_CHANGES TO onlyoffice;
GRANT ALL PRIVILEGES ON sysdba.TASK_RESULT TO onlyoffice;
EOF
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/ \
&& 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;" \
&& ./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 \
&& ./disql $DM8_USER/$DM8_PASS@$DB_HOST:$DB_PORT \`/schema/dameng/createdb.sql \
&& ./disql $DM8_USER/$DM8_PASS@$DB_HOST:$DB_PORT \`/permissions.sql \
&& sleep 10

View File

@ -0,0 +1,67 @@
version: '2'
services:
onlyoffice-documentserver:
build:
context: ../../.
dockerfile: Dockerfile
target: documentserver
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
# Costomize the JSON Web Token validation parameters if needed.
#- JWT_ENABLED=false
#- 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:
- /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
build:
context: .
dockerfile: damengdb.Dockerfile
target: damengdb
args:
DM8_USER: SYSDBA
DM8_PASS: SYSDBA001
DB_HOST: localhost
DB_PORT: 5236
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:

32
tests/graphite.yml Normal file
View File

@ -0,0 +1,32 @@
version: '2.1'
services:
onlyoffice-documentserver:
container_name: onlyoffice-documentserver
build:
context: ../.
depends_on:
- onlyoffice-graphite
environment:
- METRICS_ENABLED=${METRICS_ENABLED:-true}
- METRICS_HOST=${METRICS_HOST:-localhost}
- METRICS_PORT=${METRICS_PORT:-8125}
- METRICS_PREFIX=${METRICS_PREFIX:-ds.}
stdin_open: true
restart: always
expose:
- '2003'
ports:
- '80:80'
volumes:
- ./graphite/statsd:/var/www/onlyoffice/documentserver/server/Metrics/config
onlyoffice-graphite:
container_name: onlyoffice-graphite
image: graphiteapp/graphite-statsd
environment:
- GRAPHITE_STATSD_HOST=${GRAPHITE_STATSD_HOST:-onlyoffice-documentserver}
- GRAPHITE_TIME_ZONE=${GRAPHITE_TIME_ZONE:-Etc/UTC}
ports:
- '8888:80'
stdin_open: true
restart: always

View File

@ -0,0 +1,7 @@
{
"graphiteHost": "onlyoffice-graphite",
"graphitePort": 2003,
"port": 8125,
"flushInterval": 60000,
"backends": [ "./backends/graphite.js" ]
}

36
tests/mariadb.yml Normal file
View File

@ -0,0 +1,36 @@
version: '2.1'
services:
ds:
container_name: ds
build:
context: ../.
depends_on:
- onlyoffice-mariadb
environment:
- DB_TYPE=${DB_TYPE:-mysql}
- DB_HOST=${DB_HOST:-onlyoffice-mariadb}
- DB_PORT=${DB_PORT:-3306}
- DB_NAME=${DB_NAME:-onlyoffice}
- DB_USER=${DB_USER:-onlyoffice}
- DB_PWD=${DB_PWD:-onlyoffice}
stdin_open: true
restart: always
ports:
- '80:80'
onlyoffice-mariadb:
container_name: onlyoffice-mariadb
image: mariadb:${MARIADB_VERSION:-10.5}
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE:-onlyoffice}
- MYSQL_USER=${MYSQL_USER:-onlyoffice}
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-onlyoffice}
- MYSQL_ALLOW_EMPTY_PASSWORD=${MYSQL_ALLOW_EMPTY_PASSWORD:-yes}
restart: always
volumes:
- mysql_data:/var/lib/mysql
expose:
- '3306'
volumes:
mysql_data:

17
tests/mssql/README.md Normal file
View File

@ -0,0 +1,17 @@
## Stand Documentserver with mssql
### How it works
For deploy stand:
**STEP 1**: Build you own images:
```bash
sudo docker-compose build
```
**STEP 2**: Wait build complete and when:
```bash
sudo docker-compose up -d
```

32
tests/mssql/create_db_user.sh Executable file
View File

@ -0,0 +1,32 @@
#!/bin/bash
#generate SA password
SYMBOLS='!#$%&*+,-.:;=?@^_~'
for (( i=1; i <= 20; i++ )); do
PASS=$(tr -dc "A-Za-z0-9$SYMBOLS" </dev/urandom | head -c 15)
if [[ $PASS == *[0-9]* &&
$PASS != $(echo "$PASS" | tr [:upper:] ' ') &&
$PASS != $(echo "$PASS" | tr [:lower:] ' ') &&
$PASS != $(echo "$PASS" | tr "$SYMBOLS" ' ') ]]; then
break
fi
done
export MSSQL_SA_PASSWORD=$PASS
CONNECTION_STR="/opt/mssql-tools/bin/sqlcmd -S localhost,1433 -U SA -P "$MSSQL_SA_PASSWORD" -C -Q"
#start db
/opt/mssql/bin/sqlservr &
#wait for db up
for (( i=1; i <= 10; i++ )); do
RES=$($CONNECTION_STR "SELECT @@VERSION;" 2>/dev/null | grep "affected" | wc -l)
if [ "$RES" -eq "1" ]; then
echo "Database is ready"
break
fi
sleep 10
done
#create new db user
$CONNECTION_STR "IF NOT EXISTS (SELECT * FROM sys.sql_logins WHERE name = '$MSSQL_USER') BEGIN CREATE LOGIN $MSSQL_USER WITH PASSWORD = '$MSSQL_PASSWORD' , CHECK_POLICY = OFF; ALTER SERVER ROLE [dbcreator] ADD MEMBER [$MSSQL_USER]; END"

View File

@ -0,0 +1,38 @@
version: '2.1'
services:
onlyoffice-documentserver:
container_name: onlyoffice-documentserver
build:
context: ../../.
dockerfile: Dockerfile
depends_on:
- onlyoffice-mssql
environment:
- DB_TYPE=${DB_TYPE:-mssql}
- DB_HOST=${DB_HOST:-onlyoffice-mssql}
- DB_PORT=${DB_PORT:-1433}
- DB_NAME=${DB_NAME:-onlyoffice}
- DB_USER=${DB_USER:-onlyoffice}
- DB_PWD=${DB_PWD:-onlyoffice}
stdin_open: true
restart: always
ports:
- '80:80'
onlyoffice-mssql:
container_name: onlyoffice-mssql
build:
context: .
dockerfile: mssql.Dockerfile
args:
- MSSQL_DATABASE=${DB_NAME:-onlyoffice}
- MSSQL_USER=${DB_USER:-onlyoffice}
- MSSQL_PASSWORD=${DB_PWD:-onlyoffice}
restart: always
volumes:
- mssql_data:/var/opt/mssql
expose:
- '1433'
volumes:
mssql_data:

View File

@ -0,0 +1,9 @@
FROM mcr.microsoft.com/mssql/server:2022-latest as onlyoffice-mssql
ENV ACCEPT_EULA=Y
SHELL ["/bin/bash", "-c"]
COPY create_db_user.sh /tmp/create_db_user.sh
RUN bash /tmp/create_db_user.sh

37
tests/mysql.yml Normal file
View File

@ -0,0 +1,37 @@
version: '2.1'
services:
onlyoffice-documentserver:
container_name: onlyoffice-documentserver
build:
context: ../.
depends_on:
- onlyoffice-mysql
environment:
- DB_TYPE=${DB_TYPE:-mysql}
- DB_HOST=${DB_HOST:-onlyoffice-mysql}
- DB_PORT=${DB_PORT:-3306}
- DB_NAME=${DB_NAME:-onlyoffice}
- DB_USER=${DB_USER:-onlyoffice}
- DB_PWD=${DB_PWD:-onlyoffice}
stdin_open: true
restart: always
ports:
- '80:80'
onlyoffice-mysql:
container_name: onlyoffice-mysql
image: mysql:${MYSQL_VERSION:-5.7}
command: --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE:-onlyoffice}
- MYSQL_USER=${MYSQL_USER:-onlyoffice}
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-onlyoffice}
- MYSQL_ALLOW_EMPTY_PASSWORD=${MYSQL_ALLOW_EMPTY_PASSWORD:-yes}
restart: always
volumes:
- mysql_data:/var/lib/mysql
expose:
- '3306'
volumes:
mysql_data:

17
tests/oracle/README.md Normal file
View File

@ -0,0 +1,17 @@
## Stand Documentserver with oracle
### How it works
For deploy stand:
**STEP 1**: Build you own images:
```bash
sudo docker-compose build
```
**STEP 2**: Wait build complete and when:
```bash
sudo docker-compose up -d
```

28
tests/oracle/create_db_user.sh Executable file
View File

@ -0,0 +1,28 @@
#!/bin/bash
CONNECTION_STR="sqlplus sys/$ORACLE_PASSWORD@//localhost:1521/$ORACLE_DATABASE as sysdba"
export ORACLE_PWD=$ORACLE_PASSWORD
#start db
/opt/oracle/runOracle.sh &
#wait for db up
for (( i=1; i <= 20; i++ )); do
RES=$(echo "SELECT version FROM V\$INSTANCE;" | $CONNECTION_STR 2>/dev/null | grep "Connected" | wc -l)
if [ "$RES" -ne "0" ]; then
echo "Database is ready"
break
fi
sleep 10
done
sleep 1
#create new db user
$CONNECTION_STR <<EOF
CREATE USER $ORACLE_USER IDENTIFIED BY $ORACLE_PASSWORD;
GRANT CREATE SESSION TO $ORACLE_USER;
GRANT CREATE TABLE TO $ORACLE_USER;
ALTER USER $ORACLE_USER quota unlimited on USERS;
EOF

View File

@ -0,0 +1,38 @@
version: '2.1'
services:
onlyoffice-documentserver:
container_name: onlyoffice-documentserver
build:
context: ../../.
dockerfile: Dockerfile
depends_on:
- onlyoffice-oracle
environment:
- DB_TYPE=${DB_TYPE:-oracle}
- DB_HOST=${DB_HOST:-onlyoffice-oracle}
- DB_PORT=${DB_PORT:-1521}
- DB_NAME=${DB_NAME:-xepdb1}
- DB_USER=${DB_USER:-onlyoffice}
- DB_PWD=${DB_PWD:-onlyoffice}
stdin_open: true
restart: always
ports:
- '80:80'
onlyoffice-oracle:
container_name: onlyoffice-oracle
build:
context: .
dockerfile: oracle.Dockerfile
args:
- ORACLE_DATABASE=${DB_NAME:-xepdb1}
- ORACLE_USER=${DB_USER:-onlyoffice}
- ORACLE_PASSWORD=${DB_PWD:-onlyoffice}
restart: always
volumes:
- oracle_data:/opt/oracle/oradata
expose:
- '1521'
volumes:
oracle_data:

View File

@ -0,0 +1,15 @@
FROM container-registry.oracle.com/database/express:21.3.0-xe as onlyoffice-oracle
ARG ORACLE_DATABASE=
ARG ORACLE_PASSWORD=
ARG ORACLE_USER=
ENV ORACLE_DATABASE=$ORACLE_DATABASE \
ORACLE_PASSWORD=$ORACLE_PASSWORD \
ORACLE_USER=$ORACLE_USER
SHELL ["/bin/bash", "-c"]
COPY create_db_user.sh /tmp/create_db_user.sh
RUN bash /tmp/create_db_user.sh

34
tests/postgres-old.yml Normal file
View File

@ -0,0 +1,34 @@
version: '2.1'
services:
onlyoffice-documentserver:
container_name: onlyoffice-documentserver
build:
context: ../.
depends_on:
- onlyoffice-postgresql
environment:
- POSTGRESQL_SERVER_HOST=${DB_HOST:-onlyoffice-postgresql}
- POSTGRESQL_SERVER_PORT=${DB_PORT:-5432}
- POSTGRESQL_SERVER_DB_NAME=${DB_NAME:-onlyoffice}
- POSTGRESQL_SERVER_USER=${DB_USER:-onlyoffice}
- POSTGRESQL_SERVER_PASS=${DB_PWD:-onlyoffice}
stdin_open: true
restart: always
ports:
- '80:80'
onlyoffice-postgresql:
container_name: onlyoffice-postgresql
image: postgres:9.5
environment:
- POSTGRES_DB=${POSTGRES_DB:-onlyoffice}
- POSTGRES_USER=${POSTGRES_USER:-onlyoffice}
- POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD:-trust}
restart: always
expose:
- '5432'
volumes:
- postgresql_data:/var/lib/postgresql
volumes:
postgresql_data:

35
tests/postgres.yml Normal file
View File

@ -0,0 +1,35 @@
version: '2.1'
services:
onlyoffice-documentserver:
container_name: onlyoffice-documentserver
build:
context: ../.
depends_on:
- onlyoffice-postgresql
environment:
- DB_TYPE=${DB_TYPE:-postgres}
- DB_HOST=${DB_HOST:-onlyoffice-postgresql}
- DB_PORT=${DB_PORT:-5432}
- DB_NAME=${DB_NAME:-onlyoffice}
- DB_USER=${DB_USER:-onlyoffice}
- DB_PWD=${DB_PWD:-onlyoffice}
stdin_open: true
restart: always
ports:
- '80:80'
onlyoffice-postgresql:
container_name: onlyoffice-postgresql
image: postgres:${POSTGRES_VERSION:-12}
environment:
- POSTGRES_DB=${POSTGRES_DB:-onlyoffice}
- POSTGRES_USER=${POSTGRES_USER:-onlyoffice}
- POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD:-trust}
restart: always
expose:
- '5432'
volumes:
- postgresql_data:/var/lib/postgresql
volumes:
postgresql_data:

46
tests/prometheus.yml Normal file
View File

@ -0,0 +1,46 @@
version: '2.1'
services:
onlyoffice-documentserver:
container_name: onlyoffice-documentserver
build:
context: ../.
depends_on:
- onlyoffice-statsd-exporter
environment:
- METRICS_ENABLED=${METRICS_ENABLED:-true}
- METRICS_HOST=${METRICS_HOST:-onlyoffice-statsd-exporter}
- METRICS_PORT=${METRICS_PORT:-9125}
- METRICS_PREFIX=${METRICS_PREFIX:-ds.}
stdin_open: true
restart: always
ports:
- '80:80'
onlyoffice-statsd-exporter:
container_name: onlyoffice-statsd-exporter
image: prom/statsd-exporter
command: --statsd.event-flush-interval=30000ms
ports:
- '9102:9102'
- '9125:9125/tcp'
- '9125:9125/udp'
onlyoffice-prometheus:
container_name: onlyoffice-prometheus
image: prom/prometheus
ports:
- '9090:9090'
volumes:
- ./prometheus/prometheus-scrape/statsd-exporter.yml:/etc/prometheus/prometheus.yml
grafana:
container_name: onlyoffice-grafana
image: bitnami/grafana
ports:
- '3000:3000'
environment:
- 'GF_SECURITY_ADMIN_PASSWORD=G0pGE4'
volumes:
- ./prometheus/grafana/conf/prometheus.yml:/opt/bitnami/grafana/conf/provisioning/datasources/prometheus.yml
- ./prometheus/grafana/conf/default-provider.yaml:/opt/bitnami/grafana/conf/provisioning/dashboards/default-provider.yaml
- ./prometheus/grafana/dashboards:/opt/bitnami/grafana/dashboards

View File

@ -0,0 +1,23 @@
apiVersion: 1
providers:
# <string> an unique provider name
- name: 'default-provider'
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <string, required> name of the dashboard folder. Required
folder: dashboards
# <string> folder UID. will be automatically generated if not specified
folderUid: ''
# <string, required> provider type. Required
type: file
# <bool> disable dashboard deletion
disableDeletion: false
# <bool> enable dashboard editing
editable: true
# <int> how often Grafana will scan for changed dashboards
updateIntervalSeconds: 10
options:
# <string, required> path to dashboard files on disk. Required
path: /opt/bitnami/grafana/dashboards
# <bool> enable folders creation for dashboards
#foldersFromFilesStructure: true

View File

@ -0,0 +1,6 @@
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://onlyoffice-prometheus:9090
editable: true

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,6 @@
scrape_configs:
- job_name: 'statsd'
scrape_interval: 30s
static_configs:
- targets:
- onlyoffice-statsd-exporter:9102

29
tests/rabbitmq-old.yml Normal file
View File

@ -0,0 +1,29 @@
version: '2.1'
services:
onlyoffice-documentserver:
container_name: onlyoffice-documentserver
build:
context: ../.
environment:
- AMQP_SERVER_TYPE=${AMQP_SERVER_TYPE:-rabbitmq}
- AMQP_SERVER_URL=${AMQP_SERVER_URL:-amqp://guest:guest@onlyoffice-rabbitmq}
stdin_open: true
restart: always
ports:
- '80:80'
- '443:443'
networks:
- onlyoffice
onlyoffice-rabbitmq:
container_name: onlyoffice-rabbitmq
image: rabbitmq
restart: always
networks:
- onlyoffice
expose:
- '5672'
networks:
onlyoffice:
driver: 'bridge'

29
tests/rabbitmq.yml Normal file
View File

@ -0,0 +1,29 @@
version: '2.1'
services:
onlyoffice-documentserver:
container_name: onlyoffice-documentserver
build:
context: ../.
environment:
- AMQP_TYPE=${AMQP_TYPE:-rabbitmq}
- AMQP_URI=${AMQP_URI:-amqp://guest:guest@onlyoffice-rabbitmq}
stdin_open: true
restart: always
ports:
- '80:80'
- '443:443'
networks:
- onlyoffice
onlyoffice-rabbitmq:
container_name: onlyoffice-rabbitmq
image: rabbitmq:${RABBITMQ_VERSION:-latest}
restart: always
networks:
- onlyoffice
expose:
- '5672'
networks:
onlyoffice:
driver: 'bridge'

31
tests/redis.yml Normal file
View File

@ -0,0 +1,31 @@
version: '2.1'
services:
onlyoffice-documentserver:
container_name: onlyoffice-documentserver
build:
context: ../.
args:
- PRODUCT_NAME=${PRODUCT_NAME:-documentserver}
environment:
- REDIS_SERVER_HOST=${REDIS_SERVER_HOST:-onlyoffice-redis}
- REDIS_SERVER_PORT=${REDIS_SERVER_PORT:-6379}
stdin_open: true
restart: always
ports:
- '80:80'
- '443:443'
networks:
- onlyoffice
onlyoffice-redis:
container_name: onlyoffice-redis
image: redis:${REDIS_VERSION:-latest}
restart: always
networks:
- onlyoffice
expose:
- '6379'
networks:
onlyoffice:
driver: 'bridge'

12
tests/standalone.yml Normal file
View File

@ -0,0 +1,12 @@
version: '2.1'
services:
onlyoffice-documentserver:
container_name: onlyoffice-documentserver
build:
context: ../.
args:
- PRODUCT_NAME=${PRODUCT_NAME:-documentserver}
stdin_open: true
restart: always
ports:
- '80:80'

54
tests/test.sh Executable file
View File

@ -0,0 +1,54 @@
#!/bin/bash
ssl=${ssl:-false}
private_key=${private_key:-tls.key}
certificate_request=${certificate_request:-tls.csr}
certificate=${certificate:-tls.crt}
# Generate certificate
if [[ $ssl == "true" ]]; then
url=${url:-"https://localhost"}
mkdir -p data/certs
pushd data/certs
openssl genrsa -out ${private_key} 2048
openssl req \
-new \
-subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" \
-key ${private_key} \
-out ${certificate_request}
openssl x509 -req -days 365 -in ${certificate_request} -signkey ${private_key} -out ${certificate}
openssl dhparam -out dhparam.pem 2048
chmod 400 ${private_key}
popd
else
url=${url:-"http://localhost"}
fi
# Check if the yml exists
if [[ ! -f $config ]]; then
echo "File $config doesn't exist!"
exit 1
fi
# Run test environment
docker-compose -p ds -f $config up -d
wakeup_timeout=90
# Get documentserver healthcheck status
echo "Wait for service wake up"
sleep $wakeup_timeout
healthcheck_res=$(wget --no-check-certificate -qO - ${url}/healthcheck)
# Fail if it isn't true
if [[ $healthcheck_res == "true" ]]; then
echo "Healthcheck passed."
else
echo "Healthcheck failed!"
exit 1
fi
docker-compose -p ds -f $config down