1
0
mirror of https://github.com/zokradonh/kopano-docker synced 2025-06-07 16:06:14 +00:00

Compare commits

...

516 Commits

Author SHA1 Message Date
rr
9c5e0c9c2f fixed volume references, no trailing slash 2022-06-14 10:10:00 +02:00
deatheibon
c1df7f4cc7 remove size check for tmp directory
related to https://github.com/Kopano-dev/kopano-docker/issues/26#issue-1175950951
2022-04-07 10:49:55 +02:00
Felix Bartels
10cffe561c
Update Konnect to 0.34 (#491)
Fixes https://github.com/zokradonh/kopano-docker/issues/490

Signed-off-by: Felix Bartels <felix@9wd.eu>
2022-03-14 15:29:56 +01:00
zokradonh
c7c151b29f
Update Close Stale Issues action 2021-12-20 15:47:22 +01:00
Martin Hoffmann
b638f48011
Fixes z-hub repo (#486)
* Update Makefile

* Updates Readme with new z-hub repo

Repo changed: https://kopano.com/z-push/z-push-new-urls-for-repositories-and-wiki/

* Updates setup.sh with new z-hub repo

Repo changed: https://kopano.com/z-push/z-push-new-urls-for-repositories-and-wiki/

* Updates version.sh

Repo changed: https://kopano.com/z-push/z-push-new-urls-for-repositories-and-wiki/

* Update setup.sh

* Update README.md

* Update Dockerfile
2021-09-02 09:43:06 +02:00
Andreas Bomholtz
a3fb7e8eda
Fixed a typo for dcgoss in the build Dockerfile file (#484) 2021-08-17 12:18:32 +02:00
MAFLO321
0d356bf6ee
update docker-mailserver to 10.x.y (#24) 2021-08-04 14:53:58 +02:00
René Plötz
5617325d8e
Extract spamd-extras into separate extras and add documentation (#482)
Signed-off-by: René Plötz <reneploetz@users.noreply.github.com>
2021-06-22 13:42:55 +02:00
Felix Bartels
83794eb8ab
remove travis automation as their pricing changed (#480)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2021-05-24 16:53:19 +02:00
Felix Bartels
a82fbb0bfc
Update repo signing key (#23)
Signed-off-by: Felix Bartels <felix@9wd.eu>
2021-04-29 12:44:53 +02:00
Felix Bartels
7d225324b8
Update docker-compose.override.yml-minio 2021-04-13 11:45:46 +02:00
Felix Bartels
f7659f5a78
Simplify ldap demo data (#22)
Switch user passwords to plain to make it more obvious to admins which passwords are secretary
Remove passwords for inactive accounts

Signed-off-by: Felix Bartels <felix@9wd.eu>
2021-03-30 13:34:53 +02:00
Felix Bartels
e578ff494c
Update demo-users.ldif
Remove trailing space
2021-03-29 17:24:38 +02:00
Felix Bartels
ccb44dd589
Remove kustomer from the default compose file (#21)
* remove kustomer for now

Fixes zokradonh#479
2021-03-26 12:18:46 +01:00
Felix Bartels
b1eace90e7
add tmpfs for /var/lib/kopano-webapp/plugin_files (#18)
Signed-off-by: Felix Bartels <felix@9wd.eu>
2021-03-04 09:31:49 +01:00
Felix Bartels
4fce2246d6
Update hadolint and no longer ignore SC2215 (#19)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2021-03-04 08:53:55 +01:00
zokradonh
841d181402
Added mount of repository secrets (#477) 2021-03-03 09:37:21 +01:00
Felix Bartels
89ccc1c425
update Konnect to 0.33.11 (#472) 2020-12-14 18:24:08 +01:00
Felix Bartels
d891bbc8d0
update symlink locations for meet (#473)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-12-14 17:09:44 +01:00
Felix Bartels
29f06f906c
Enable separately hosted kwmbridge (#471)
* block access to internal endpoints
* add dedicated vhost for kwmserver mcu api
* update docker-compose.yml
2020-12-08 13:38:32 +01:00
Felix Bartels
e7c5d10753
default to Debian 10 (#470)
Files master is no longer published for Debian 9, which makes the test fail

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-11-04 10:54:53 +01:00
Felix Bartels
ef98cc1ce7 temporarily remove kopano-migration-pst
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-10-16 10:23:59 +02:00
Felix Bartels
7bfc63aa88
Remove debug content from kwmbridge dnat example 2020-10-09 16:19:21 +02:00
Felix Bartels
f67ccd17ea
add new option for kwmbridge dnat mode (#463)
* add new option for kwmbridge dnat mode
* add local config for test of nat functionality
* use variable instead of real ip
* move turn configuration to the right place
* update kwmbridge
* remove trivy
2020-10-05 08:53:36 +02:00
Felix Bartels
9ddc7c55ae
set workdir in onbuild to prevent downloading surch of workdir was changed in another image (#468)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-10-02 16:11:00 +02:00
Felix Bartels
d66c1a3df9
Prepare update of kopano-meet for Univention (#466)
* add kapps repo to base image to prevent from potentially updated components (for example kweb)
* kapps needs to be added to php image, not webapp image
* ignore unknown syntax for build time secrets
* update Konnect
2020-10-02 15:13:35 +02:00
Felix Bartels
bfc5ad9578
update Dockerfile to reflect new location for config overrides (#467)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-10-02 14:17:13 +02:00
Felix Bartels
0acde9ff4b
add environment variables for turn server usage (#465)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-09-30 16:42:24 +02:00
Felix Bartels
0523e232dd
update to latest kweb (#444)
* update to latest kweb
2020-09-29 14:16:48 +02:00
Felix Bartels
d3ef8b472a
enhance example for installing plugins at build time (#458)
* enhance example for installing plugins at build time

Relates to https://github.com/zokradonh/kopano-docker/issues/457

* do not always rebuild the webapp base when building the webapp plugins image
documentation
2020-09-26 15:44:26 +02:00
Felix Bartels
2c783d7256
add code of conduct (#456)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-09-25 11:39:14 +02:00
Felix Bartels
f92488c343
Merge pull request #454 from engelant/start-helper-regex-typo
fix typo in regex
2020-09-24 09:00:03 +02:00
engelant
9ea07a1404
fix typo in regex 2020-09-23 23:00:55 +02:00
Felix Bartels
5f07629a6d
Merge pull request #453 from fbartels/webapp-double-quotes
make sed match on the config option with both single and double quotes
2020-09-23 14:37:28 +02:00
Felix Bartels
a156732e86 make sed match on the config option with both single and double quotes
fixes https://github.com/zokradonh/kopano-docker/issues/452

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-09-23 14:20:17 +02:00
Felix Bartels
08100a3b80 publish kwmbridge container
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-09-23 09:34:25 +02:00
Felix Bartels
1f7346173f
Merge pull request #451 from fbartels/kwmbridge-0.1.2
update kwmbridge to latest version
2020-09-22 16:54:06 +02:00
Felix Bartels
4bc55bd365 update kwmbridge to latest version
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-09-22 16:34:02 +02:00
Felix Bartels
d14777fe39
Misc housekeeping (#450)
* enhance example for builtin webapp plugins
* add example configuration to use kwmbridge with standalone meet
2020-09-22 15:32:19 +02:00
Felix Bartels
b3ee2e218f formatting
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-09-22 14:59:10 +02:00
René Plötz
f72f046fa6
update docker-mailserver to 7.0.0 (#448)
* update docker-mailserver to 7.0.0
  * updated docker-mailserver image to 7.0.0
  * added volume for mail logs
  * use SPAMASSASSIN_SPAM_TO_INBOX to deliver spam to INBOX, upstreams new default is bouncing:
    * https://github.com/tomav/docker-mailserver#spamassassin_spam_to_inbox
  * migrate REPORT_RECIPIENT to the new PFLOGSUMM_TRIGGER=logrotate
* update docker-mailserver image version to 7.0.1

Signed-off-by: René Plötz <reneploetz@users.noreply.github.com>
2020-09-22 14:57:31 +02:00
Felix Bartels
7b11f4f5ba add example configuration to use kwmbridge with standalon meet
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-09-22 14:28:13 +02:00
Felix Bartels
64907e454b enhance example for builtin webapp plugins
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-09-22 11:01:44 +02:00
Felix Bartels
2bc513f4fc
match incl closing tags to prevent confusing PLUGIN_MDM_SERVER_SSL with PLUGIN_MDM_SERVER (#449)
Fixes https://github.com/zokradonh/kopano-docker/issues/446

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-09-22 08:58:03 +02:00
Felix Bartels
0dd0f49866
also update config settings for plugins installed during runtime (#447)
* also update config settings for plugins installed during runtime
* update webapp example
* skip duplicate handling of config.php
* add todo
2020-09-21 16:14:47 +02:00
Felix Bartels
56722ee6fc fix indentation in webapp config readme
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-09-21 08:24:38 +02:00
Felix Bartels
8432396059
prepare changes to run kdav through kweb as well (#424)
* prepare changes to run kdav through kweb as well
* add kdav configuration
* add remaining kdav configuration for kweb
* import remaining kweb/php-fpm config from https://stash.kopano.io/projects/PKG/repos/kopano-one-php-fpm/browse
2020-09-15 11:33:08 +02:00
Felix Bartels
045ca52d79
fallback to a hardcoded value in case FQDNCLEANED is not set (#443)
* fallback to a hardcoded value in case FQDNCLEANED is not set
* strip ports in kweb startup script
2020-09-15 11:29:41 +02:00
peterfromthehill
9a7bca01c7
Allow to install extra packages (#440)
* Allow to install extra packages

The string in line #20 is always zero, we should watch the return value of mkdir.

* fix more mkdir checks

Co-authored-by: peterfromthehill <peter@1qay.net>
2020-09-15 10:48:43 +02:00
Felix Bartels
8902f73e0e
copy config settings to webapp readme (#442)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-09-15 08:50:09 +02:00
Felix Bartels
93b4964f20
update konnect to latest upstream (#441)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-09-11 11:36:50 +02:00
Felix Bartels
5f3ee5ef56
remove scripting for obsolete spell checking plugin in kopano webapp (#439)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-09-07 08:55:46 +02:00
Gerard de Leeuw
1d80122e51
Fix machine-id mount for spamd container (#438) 2020-09-04 08:04:15 +02:00
Felix Bartels
6379f025a4
remove kopano-server pid from goss checks (#437)
* remove kopano-server pid from goss checks
* fix download location of trivy
2020-09-02 14:08:34 +02:00
engelant
d6c3896b4e
Fix kapps version (#436)
* Added KAPPS_VERSION
The KAPPS_VERSION didin't match the CORE_VERSION execept for latest.
A new KAAPS_VERSION var in the .env, which defaults to latest, will fix this.

Co-authored-by: Anton Engelhardt <anton@neednow.de>
Co-authored-by: Felix Bartels <1257835+fbartels@users.noreply.github.com>
2020-09-01 11:55:10 +02:00
Felix Bartels
d514ef44cb
implement new env variable to disable all automatic actions (#434)
* implement new env variable to disable all automatic actions

fixes https://github.com/zokradonh/kopano-docker/issues/360

* wrap the remaining services in checks if autoconfigure/disable_checks is used
* move definition of AUTOCONFIGURE variable into base image
* add logic to kapps and kdav container
* add autoconfigure to konnect container
* update build stage to latest golang
* add autoconfig to remaining images
* delete obsolete apache config in z-push folder
* when specifying config paths use KOPANO_CONFIG_PATH
* also use env variable in helper scripts
* add message about removal of kopano-cli
2020-08-28 09:48:32 +02:00
h44z
3d7ff97aab
Kopano spamd, Bugfixes (#17)
* Add container for kopano-spamd
* Authenticate version requests if needed
* Fix building of z-push for 'supported' base image
* Install kopano-spamd package by default
* Smaller fixes for kopano-spamd
* Fix missing file header
* simplify netrc usage
2020-08-24 15:24:04 +02:00
Felix Bartels
62e175b3ff
simplify help command in makefile (#433)
force curl timeout (useful for firewalled environments)

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-08-21 08:05:41 +02:00
Felix Bartels
404c353ae4
build dependencies (#431) 2020-08-15 17:56:33 +02:00
Felix Bartels
e4c682f43d
Skip downloading of packages if folder already exists (#432)
* Skip downloading of packages if folder already exists

The base image is using onbuild instructions to reduce code duplication (in regards to fetching Kopano packages). Sadly the unbuild instructions are not only executed on the directly following container image, but in every image that is using the images from this project as a base.

Fixes https://github.com/zokradonh/kopano-docker/issues/430
2020-08-14 10:40:59 +02:00
Felix Bartels
f48b0e4374
Remove "missing store" script (#428)
Formatting of kopano-storeadm was changed and script no longer works

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-08-12 16:29:56 +02:00
Felix Bartels
2f47290a12
disable timestamps in stdout of kopano services (#427)
* disable timestamps in stdout of kopano services
* make ldap logging less verbose
* add log level option for ldap container to compose file
2020-07-31 09:58:22 +02:00
Felix Bartels
a6bd0d02b3
Make it possible to override the smtp port for Dockerize (#426)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-07-24 11:51:45 +02:00
Felix Bartels
e2251036b3
add kweb config for z-push (#419)
* add kweb config for z-push
* clean out apache bits from z-push container and use kopano_php as the base
* fix commander tests for current php version
* globally define log location for php-fpm error_log
* move port in outer kweb config
* rewrite other spellings of the autodiscover url
* fix port in startup test
* force plain output to buildkit
* reorder z-push dockerfile
2020-07-21 12:48:33 +02:00
Felix Bartels
45cb9bbd86
remove kopano-cli from the tests and documentation (#423)
it has been removed in master and will no longer be part of kopano 10.x

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-07-20 12:37:31 +02:00
Felix Bartels
4932efba46
Remove RELEASE_KEY_DOWNLOAD from the project (#422)
* Remove RELEASE_KEY_DOWNLOAD from the project
KOPANO_REPOSITORY_FLAGS should not default to always trusting

Fixes #406
2020-07-12 10:38:14 +02:00
jelle van der Waa
a5f6c9d10b
Enable pop3 access for user4 (#16) 2020-07-08 15:23:47 +02:00
Felix Bartels
e99c524d46
Tweaks to allow building supported releases while also including Kapps (#421)
* Tweaks to allow building supported releases while also including Kapps
* switch files to pre-final
* define default for kapps repo

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-06-30 13:33:18 +02:00
Felix Bartels
21781473f0
Update Konnect to 0.33.5 2020-06-30 13:32:58 +02:00
Felix Bartels
de30561217
update Konnect (#418) 2020-06-24 10:02:21 +02:00
Felix Bartels
cb3eecf5bb
Kwmbridge (#405)
* add kwmbridge
* add new config options for kwmserver and kwmbridge
2020-06-23 22:33:23 +02:00
engelant
fabe8f06c4
Added php-xml dependency for z-push (#415)
Upstream report for z-push Debian packaging is issued, while it's not resolved an additional dependency.
Can be removed once https://jira.z-hub.io/projects/ZP/issues/ZP-1558 is fixed

Co-authored-by: Anton Engelhardt <anton@neednow.de>
2020-06-15 20:15:00 +02:00
h44z
4effa19d91
Fix build for official and supported releases (#15)
* Fix build for official and supported releases
* Fix config generation: skip missing config files
* kopano-search ignores KOPANO_CONFIG_PATH env var
* Use kopano core 8.7 by default
* Include APT release key in this repo
* Copy APT release key into image
2020-06-08 12:17:57 +02:00
Felix Bartels
1120a8e08b
update konnect (#404)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-06-03 14:12:35 +02:00
Felix Bartels
e4f9a35c8d
update versions of external applications (#401) 2020-06-02 14:18:38 +02:00
Felix Bartels
b548cba095
tag and publish kapps container (#403)
fixes #402

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-05-28 22:43:49 +02:00
Felix Bartels
4e2060e491
Add container for kapps (which includes the new calendar) (#397)
* Add container for kapps (which includes the new calendar)
* remove calendar.yml
2020-05-26 12:10:59 +02:00
Felix Bartels
e583247a58
Make it possible to send out of office notifications (#400)
* add wrapper to specify config file for kopano-autorespond
* drop overriding definition of tmp_path
2020-05-26 12:08:20 +02:00
Felix Bartels
7a04c93219
Prepare usage of build secrets (#303)
* sort .gitignore and add apt_auth.conf to it
* add helper to setup.sh to create apt_auth.conf (user still needs to enter their own credentials)
   * only create apt_auth.conf in make if it doesn't already exist
* add tooling to core dockerfile and makefile to use build secrets
* add ignore for hadolint as mounting syntax is currently not supported so far
* update to latest docker on travis for buildkit support
* documentation
* sort gitignore
* add dockerfile syntax definition for build args
2020-05-22 10:23:09 +02:00
Felix Bartels
2974903dc5
set CADDYPATH (#396) 2020-05-11 15:39:10 +02:00
Felix Bartels
9bba2ec77e
Make it possible to override the final exe (#392)
* move all env definition in same block
* implement EXE env variable for kopano-core
  * Obsoletes parts of https://github.com/zokradonh/kopano-docker/pull/366
* use EXE in konnect container
* add exe for web
* make it possible to docker-composer run commands in web container
2020-05-05 21:03:47 +02:00
Felix Bartels
05230d1c0a
add Vagrantfile for easy local test/dev deployment (#394)
* add Vagrantfile for easy local test/dev deployment
* add exception to editorconfig
* Update README.md
* update ci tools
* add jq to setup ci script
2020-05-05 20:08:23 +02:00
Felix Bartels
87de275e9f
add example how to build dedicated container for services such as dagent (#391)
* add example how to build dedicated container for services such as dagent

Obsoletes part of https://github.com/zokradonh/kopano-docker/pull/366

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* add new dockerfile for dagent

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-05-01 15:53:57 +02:00
Felix Bartels
7b05f10206
add a switch to allow usage of specific ssl cert (#389)
* add a switch to allow usage of specific ssl cert
* add documentation how to specify own certificates and what to do when running web behind an existing proxy
2020-05-01 14:32:37 +02:00
Felix Bartels
734d3c61db
Check if external authority is correctly configured (#390)
* check if oidc provider is reachable

Relates to https://github.com/zokradonh/kopano-docker/issues/376

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* compare issuer in the discovery document with the configured one

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-05-01 12:23:06 +02:00
Felix Bartels
3572fc74e7
Add parsing of signed_out_uri to konnect (#388)
Allow external configuration of --signed-out-uri in konnect

Signed-off-by: Felix Bartels <felix@host-consultants.de>

Co-authored-by: Erik Damrose <damrose@univention.de>
2020-04-30 13:59:06 +02:00
Felix Bartels
08385e8f79 Repair version label of web container 2020-04-30 13:57:53 +02:00
Felix Bartels
110ea43bf6
Rework label handling (#387)
* be smarter about labels

inspired by https://github.com/Peter-SAARLAND/zero
2020-04-28 22:16:12 +02:00
Felix Bartels
a0c14b6ad4
add config registry settings for single logout (#385)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-04-22 12:50:59 +02:00
Felix Bartels
12f7f82648
Update to latest Konnect release (#383)
* newest konnect

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-04-16 13:01:20 +02:00
Felix Bartels
e33a3cc03e
Add example to use meet with ads (#382)
data provided by @ronnybremer

Fixes: https://github.com/zokradonh/kopano-docker/issues/373

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-04-16 13:00:59 +02:00
Felix Bartels
d188aff633
add apache example (#381)
fixes https://github.com/zokradonh/kopano-docker/issues/372

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-04-16 13:00:46 +02:00
Felix Bartels
f2ad4c5ea7
Fix builds (#384)
A recent change in Alpine broke the use of shellcheck for me and the general recommendation of the Alpine team is to not mix a release with their edge repo. Therefore this fix now copies shellcheck over from their own build instead of installing it from the Alpine repos.

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-04-16 12:24:24 +02:00
Felix Bartels
13dad903c9
Update Konnect to 0.31.0 (#380) 2020-04-10 16:03:09 +02:00
Felix Bartels
9efed4fe80
move implicit defaults to docker-compose (#353)
Reson: some non-default configuration options are backed into the startup scripts. This can be unexpected when mounting files e.g. in a Kubernetes setup.

https://github.com/zokradonh/kopano-docker/issues/294

* core configuration
* fix compose for meet
* remove interpreter from start script
* use default oidc timeout
2020-04-09 09:39:30 +02:00
Felix Bartels
cfbc22d947
Add the ability to specify the client_id for external oidc providers 2020-04-08 08:35:44 +02:00
Felix Bartels
aa8d884a67 fix formatting
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-04-06 09:14:33 +02:00
Felix Bartels
2eb025b86f
more cases for updating the identifier registration (#378)
* update working copy on each step
2020-04-03 11:12:01 +02:00
Felix Bartels
bf8a545e3e
Merge pull request #377 from fbartels/konnect-domain-change
rework "guest already configured check"
2020-04-01 11:54:36 +02:00
Felix Bartels
51c6bb8fca rework "guest already configured check"
Instead of grepping for the guest key it now greps for the fqdn
make output yaml again

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-04-01 08:02:34 +02:00
Felix Bartels
0e0601723b
Merge pull request #375 from fbartels/kweb-caps
drop caps in meet example as well
2020-03-28 18:45:27 +01:00
Felix Bartels
1fe23b36ac drop caps in meet example as well
Fixes: https://github.com/Kopano-dev/kopano-docker/issues/12
Relates to: https://github.com/zokradonh/kopano-docker/issues/322

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-03-28 16:44:08 +01:00
Felix Bartels
c42bb2458f
Mount /var/lib/dbus/machine-id from /etc/machine-id (#374)
Fixes https://github.com/zokradonh/kopano-docker/issues/371
2020-03-27 15:18:46 +01:00
Felix Bartels
97ebd264d6 Mount /var/lib/dbus/machine-id from /etc/machine-id
Fixes https://github.com/zokradonh/kopano-docker/issues/371

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-03-27 14:54:51 +01:00
Felix Bartels
864459d745
Make it possible to specify a turn service secret as a text env (#370)
* update kwmserver to 1.1.1
* add scripting to create turn_server_shared_secret as a file
* make startup of kwmserver verbose when DEBUG env is set
2020-03-25 14:39:11 +01:00
Felix Bartels
c9701494f1
Make registration_conf configurable through an env (#369)
* Make registration_conf configurable through an env

Fixes https://github.com/zokradonh/kopano-docker/issues/368

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* add registration_conf to meet example

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-03-23 16:42:11 +01:00
theoneandonly-vector
5281fb1f03
Allow users to use different saslauthd-options. (#361)
* Update docker-compose.mail.yml
* default to rimap for saslauth
Co-authored-by: Felix Bartels <felix@host-consultants.de>
2020-03-23 15:18:24 +01:00
Felix Bartels
3f4a56a562
fix external authority support (#367)
* comment currently broken tests (because of read-only container)
* move initial creation out of guest or authority configuration
* instead of copying merge files into destination with slurp
* failsafe authority registration
2020-03-19 15:41:23 +00:00
Felix Bartels
c8a7958083
example to build local container with just some added plugins (#350)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-03-16 15:11:21 -04:00
Felix Bartels
4e9829f466
Improve Konnect wrapper script (#359)
* only enter guest mode config if the value is not in the identifier registration already
2020-03-16 15:09:24 -04:00
Felix Bartels
646f5151f5
Make build fail early if bad version string is received (#365)
* add basic version number check
2020-03-15 14:24:37 -04:00
Felix Bartels
ae71b326a7
update to kweb 0.9.1 (#364)
* update to kweb 0.9.1

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* remove workaround for store creation

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-03-13 16:03:05 +01:00
Felix Bartels
3d81632698 also remove wait for socket for secure connections
references https://github.com/zokradonh/kopano-docker/pull/346

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-03-10 16:38:48 +01:00
Felix Bartels
6cc5d12343
fix php version in kweb config (#357)
* fix php version in kweb config
* include webapp kweb config only in the webapp container build
* add workaround for https://jira.kopano.io/browse/KW-3398 for oidc
2020-03-10 15:30:03 +01:00
Felix Bartels
da5d41c411
update konnect to latest (#356)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-03-09 20:41:29 +01:00
Felix Bartels
a0c53e15a9
Install optional grapi dependencies (#347)
* install optional dependencies for grapi
* add hadolint exception
2020-03-06 12:47:31 +01:00
Felix Bartels
5ed1d05fe7
transform LDAP_SERVER to LDAP_HOST (#355)
SASL only wants the host, not the uri

Fixes https://github.com/zokradonh/kopano-docker/issues/354

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-03-06 09:59:31 +01:00
Felix Bartels
43928e538c
Specify config location through KOPANO_CONFIG_PATH env variable (#352)
* Specify config location through KOPANO_CONFIG_PATH env variable
* add commander test to verify config is honoured by cli programs
* remove wrappers other than kopano-cli as it cannot make use of KOPANO_CONFIG_PATH

Fixes: https://github.com/zokradonh/kopano-docker/issues/351
2020-03-05 14:35:05 +01:00
Felix Bartels
5d4fabf280
update ldap container to latest version (#341)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-02-27 15:30:10 +01:00
Felix Bartels
bec6b33365
add php-mbstring directly as this dependency is missing in z-push for Buster (#345)
sort packages to install

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-02-27 15:23:55 +01:00
Felix Bartels
7eeea1944c
repair health check for kopano-webapp and kopano-meet (#344)
* json output in the healtcheck is hard to read

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* fix meet health check after moving json to /tmp

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* fix webapp health check

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-02-27 15:23:13 +01:00
Felix Bartels
40981f460b
No longer test for grapi socket, but kapi endpoint instead (#346)
* we can no longer test for the existance of notify.sock since version 10.1.0 introduces multiple sockets

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* switch startup tests to tcp tests for kapi endpoint

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-02-27 15:00:43 +01:00
Felix Bartels
6521970f23 add note to compose file
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-02-25 13:35:26 +01:00
Felix Bartels
0561a979bc
update to Debian Buster (#253)
* update to Debian Buster
* update webapp container
* update kdav image to buster
  * add some debug commands
* use onbuild to specify building of core repository only in one place
* remove ca-certificates and git from kdav image
  * git should not be needed since kdav has a builder stage
  * ca-certificates is already installed in an earlier stage
* upgrade to Debian 10 for Z-Push
* switch remaining Debian 9 repos in webapp
* use a new major version for the base image
  * since its now based on buster
* add new parameters to the onbuild step
* update repos in setup.sh
* switch default distribution in create repo script
2020-02-25 13:31:54 +01:00
Felix Bartels
24f82964d4
pass --no-cache-dir to pip install (#340)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-02-22 10:21:51 +01:00
Felix Bartels
62837d0809
update konnect (#339)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-02-14 12:20:57 +01:00
Felix Bartels
78bd1a275b
update kwmserver (#338)
* update kwmserver
2020-02-14 09:06:22 +01:00
Felix Bartels
093c7c5daf
Update CONTRIBUTING.md 2020-02-12 12:38:01 +01:00
Felix Bartels
5f10e982a6
relax machine-id check for now (#336)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-02-07 16:03:05 +01:00
Felix Bartels
736943c860 fix pushing containers
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-02-07 11:29:27 +01:00
Felix Bartels
f998cdb7b2
make it possible to specify the path when running konnect in a subpath (#320)
* make it possible to specify the path when running konnect in a subpath
2020-02-04 16:39:40 +01:00
Felix Bartels
8d0a0fd8f5
Add wrapper scripts to easily get admin.cfg (#331)
* add small wrapper scripts to honor admin.cfg at /tmp/kopano
* add script to create stores (workaround to satisfy tests)
* add output of orphaned store list to startup test
2020-02-04 08:07:49 +01:00
Felix Bartels
4941b651b8 fix eclint reports
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-02-03 16:53:38 +01:00
Felix Bartels
0950da3b55
add a Kopano theme to owncloud (#325)
* add wip for a kopano theme for owncloud
2020-02-03 15:17:39 +01:00
Felix Bartels
37b414303d spelling
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-02-02 05:37:57 +01:00
h44z
4e04625918
Add convenience functions to remove build images and containers (#11)
* Add convenience functions to remove build images and containers
* skip images with <none> tag
2020-01-30 12:25:39 +01:00
Felix Bartels
8370961d39 increase version of base image
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-01-29 20:48:05 +01:00
h44z
d0735ebd08
Configurable uid gid (#9)
* allow to specify uid and gid for kopano
* Set default value of GID/UID to keep compatibility with existing containers
2020-01-29 20:46:27 +01:00
Felix Bartels
7bbdfecb0e
Increase amount of lines that are printed at failure (#326)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-01-29 09:30:05 +01:00
Felix Bartels
f8b14c6a98
Makefile tweaks (#329)
* add --rm to build commands to prevent dangling images
relates to https://github.com/Kopano-dev/kopano-docker/pull/11
* remove login from makefile
* add docker login to travis instead
* readme tweaks
2020-01-29 09:29:39 +01:00
Felix Bartels
cdd88b9d11 add meet version detection to script
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-01-27 16:33:42 +01:00
Felix Bartels
64b73be662
tweaks for Kopano Meet 2.0 (#328)
* tweaks for Kopano Meet 2.0
* remove surplus package
2020-01-27 16:08:51 +01:00
Felix Bartels
1ac48eec52 update Konnect
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-01-27 12:06:42 +01:00
Felix Bartels
0277a5e27a
Formatting in readme.md 2020-01-27 07:54:59 +01:00
h44z
20711473fe Recreate tmp folder if it does not exist (#10)
* Recreate tmp folder if it does not exist
2020-01-24 22:03:32 +01:00
Felix Bartels
1759296b70 remove additional packages from builder step
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-01-20 21:31:07 +01:00
Felix Bartels
52d3e366e5
drop cap_* for kweb (#323)
explicit capabilities are not longer required since the process is now running as nobody

fixes #322

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-01-17 12:28:18 +01:00
Felix Bartels
b72359d000
Print a proper (error) message when container is read-only, but packages should be installed (#321)
* print an error message instead of failing to start if container is read-only
2020-01-16 15:22:12 +01:00
Felix Bartels
3367b539b7
move external components to their own files (#319)
* move ldap to its own file
* add separate files for db and mail as well
* add new compose file to the default compose_file variable
* enhance setup.sh to add these new compose files if they are currently missing
2020-01-15 13:26:30 +01:00
Felix Bartels
70e9940b38
Run all containers read-only (#314)
* switch containers in compose file to read-only
related to https://github.com/zokradonh/kopano-docker/issues/310
* make scheduler container read-only
* make meet container read-only
* fix konnect for read-only
* make core mostly read-only
* add custom location for ldap.cfg to default config
* sort config option for readability
* update makefile pull workaround
* make kdav read-only
* remove locale generation code from core startup
* fix commander tests
* fix store language tests
* add test for a dutch mailbox
* make it possible to run webapp read-only
* add locale hint to the compose file
* finish read-only mode for z-push
2020-01-14 14:31:53 +01:00
Felix Bartels
5a4335998d add debugging input to readme and bug report template
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-01-13 08:43:18 +01:00
Felix Bartels
d8811ec591 add rule for yml-off
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-01-06 15:02:31 +01:00
renovate[bot]
343730b9e1 Update golang Docker tag to v1.13.5 (#5)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 14:07:25 +01:00
renovate[bot]
dca6228c3d Update halverneus/static-file-server Docker tag to v1.7.0 (#6)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 14:07:11 +01:00
renovate[bot]
0fda7f0bcb Update alpine Docker tag to v3.11 (#3)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 14:03:14 +01:00
renovate[bot]
82bdf65858 Update composer Docker tag to v1.9 (#4)
Co-authored-by: Renovate Bot <renovatebot@gmail.com>
2020-01-06 14:02:49 +01:00
Felix Bartels
c1914a7f41 rename reviewdog workflow file
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2020-01-06 13:39:40 +01:00
Felix Bartels
a11a6135a2
Merge pull request #2 from fbartels/renovate/configure
Configure Renovate
2020-01-06 13:36:53 +01:00
Renovate Bot
1b672f4c36
Add renovate.json 2020-01-06 12:32:59 +00:00
Felix Bartels
3b105980c1
prepare for reviewdog checks (#308)
* add some reviewdog checks
* give the workflow a better name
* debug goss check
* fix goss test for dagent
* disable reviewdog for now as it does not properly work
2019-12-30 13:55:15 +01:00
Felix Bartels
574e9de669
print version at startup (#312)
* print version at startup

fixes #285
2019-12-22 18:10:50 +01:00
Felix Bartels
f5ff9393ff
add tests for downloading archive from kopano download server (#311)
* add tests for downloading archive from kopano download server
add some makefile defaults

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* linting

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-12-22 13:31:34 +01:00
Felix Bartels
b36093d074 retry github actions run for goss
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-12-16 08:03:39 +01:00
Felix Bartels
acdb5bed88
spell (via mispell) and markup fixed (#307)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-12-13 13:27:55 +01:00
Felix Bartels
d1e71c6a25
strip folders from fqdn in identifier registry (#306)
This change is required in case Konnect is running in a subfolder (and since clients like Meet are still accessible at /meet and not /subfolder/meet)
2019-12-13 08:04:44 +01:00
Felix Bartels
b7a682d437
reduce size of konnect with multistage builds (#237)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-12-12 16:58:07 +01:00
Felix Bartels
9badb0af5a
Add ldap account manager as an "extra" (#276)
* add compose file
* add working configuration for ldap account manager
depends on https://github.com/LDAPAccountManager/lam/pull/76

Important note: the open source code of lam does not include the Kopano integration. So admins can generally manage users, but to add kopano attributes admins would need to switch to the ldap tree view.

* use :7.0.RC1 as this is the first image that supports automatic setup
2019-12-11 11:36:23 +01:00
Felix Bartels
09ccf72180
add entry for kopano kustomerd (#301)
* add entry for kopano kustomerd
* add a volume for license files
* add kustomer to meet example
2019-12-11 10:55:42 +01:00
Felix Bartels
d17f26e67d
Create github actions workflow for goss (#305) 2019-12-11 08:38:16 +01:00
Felix Bartels
499740b9db
Add Github actions for stale issues and prs 2019-12-11 07:44:30 +01:00
Felix Bartels
bbebae8e49
simplify failing goss_wait tests (#304)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-12-11 07:37:54 +01:00
Felix Bartels
5ed2a3e941 disable updating of the readme for now. for one account it works, on the other it fails
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-12-09 15:07:27 +01:00
Felix Bartels
0a8421cfaa debugging
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-12-09 14:25:21 +01:00
Felix Bartels
e06ae73240
change url for updateing readme (#302)
upstream pr at https://github.com/moikot/docker-tools/pull/1

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-12-09 12:16:45 +01:00
Felix Bartels
8f1b634c35
Make app grid more finely grained configurable
Add option to configure Kopano Meet and Konnect
If all options are disabled kpop will default to its behaviour in showing all apps
2019-12-05 12:44:32 +01:00
Felix Bartels
4f8af8f86f
update konnect (#299)
* update konnect to 0.28.0
* make signing_method configurable
* instruct npm to run with unsafe permissions (fixes error on jenkins)
  * https://github.com/npm/npm/issues/20861
2019-12-05 11:10:17 +01:00
Felix Bartels
7eab9c7c06
Hardcoded server names (#298)
* use variables to check if the server is running
* use kopano_con to address the specified kopano socket in an unified way
* set default value for kopano_con
2019-11-28 13:05:54 +01:00
Felix Bartels
20bbbd2085
default port for z-push should be 237 2019-11-28 12:40:29 +01:00
RobinvG
edf4086d7e Disable some checks when deploying with injected cfg files (#295)
* Add variables to disable some checks that aren't needed if you inject the cfg files
* add tests for new functionality
* uncomment write protected test

fixes https://github.com/zokradonh/kopano-docker/pull/296
2019-11-27 14:56:27 +01:00
Felix Bartels
d7fb796fa3
split up installation for core and kapi+grapi (#293)
* split up installation for core and kapi+grapi
* add some debug output in case package installation fails
* let konnect run as nobody
* add code to check writing permissions for certificates and create certificates in container if possible
* add tests to check on failed and successful certificate creation
* add certificate creation logic from the konnect binfile
* add env for custom dockerize timeout (to fail earlier in tests)
2019-11-26 10:10:22 +01:00
Thomas Müller
08a009c7ed Generated comment in konnectd.config.php was in the wrong line (#7) 2019-11-25 12:14:28 +01:00
Felix Bartels
a0fdd5d984 add todo
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-11-22 12:05:49 +01:00
Felix Bartels
0130c9829f
Move ecparam and eckey generation into guest mode if (#291)
move waiting for ecparam and eckey into the allow guest mode if as this is only required for the guest mode
2019-11-22 08:19:44 +01:00
Felix Bartels
3165430f72
add all ci relevant tools to the build helper (#290)
also push the build helper into the docker hub

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-11-21 08:37:01 +01:00
Felix Bartels
ead0acfdb0
Add a per setup unique machine-id (#257)
* add mount for machine-id
* services should check the availability of the machine id before starting
* add a note to the readme
* add new mounts to the multiserver example
* add dockerize to kweb
* fix meet demo
2019-11-19 13:55:11 +01:00
Thomas Müller
753dc21eae Configuration file for OpenIdConnect integration is now generated on … (#5)
* Configuration file for OpenIdConnect integration is now generated on container startup

* Add a startup dependency to owncloud phoenix

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-11-19 08:26:49 +01:00
Thomas Müller
2564e34f3a calendar path was missing - paths need to be relative to the project root (#4) 2019-11-18 12:38:13 +01:00
Felix Bartels
8915a7e3bd
speed up tests by using tmpfs for data directories during startup test (#289)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-11-17 21:04:55 +01:00
Felix Bartels
03c7154299
smaller konnect fixes (#288)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-11-17 16:35:57 +01:00
Felix Bartels
97c115c556
add tests for webapp plugins (#287)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-11-15 19:16:33 +01:00
Felix Bartels
a6dfd1869b
Add option to phoenix for silent refresh 2019-11-15 09:08:43 +01:00
Felix Bartels
f94373903b
Ease use of Owncloud Phoenix (#286)
* add tweak to serve phoenix from /files
* auto enable oidc
* simplify setup by adding root directly to kweb
* add some descriptions for overriding kweb configuration
* add some configuration and clean up
2019-11-13 15:31:18 +01:00
Felix Bartels
df6268e24f
bring back the possibillity to specify args (#284)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-11-13 09:44:00 +01:00
Felix Bartels
d531ac4b1c
Fixes (#283)
* make readme of owncloud more clear
* clarify setup.sh
* make user23 an admin by default
* remove hard depenency on reg
* add completed message
* set more attributes on startup

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* use cn instead of uid
* add config for owncloud phoenix ui and openid plugin
* add override for experimental feature endpoint
* import kweb-calendar.cfg
* experimental endpoint is yes/no
* grapi also needs the ability to run insecure
* grapi needs to resolve the domain, therefore needs to be in the web network
2019-11-12 22:23:38 +01:00
Felix Bartels
9bb7f04670
Fix pushing for other travis accounts (#282)
* do not cleanup on deploy
* uncomment ldap variables before sourcing
2019-11-12 12:03:58 +01:00
Felix Bartels
012d64d2bd bugfix wrongly used variable name for writing identifier registration
add test for identifier scopes conf

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-11-11 12:47:17 +01:00
Felix Bartels
72ff6a4d51
tests if deadlock also apprears when syning users first (#281)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-11-11 11:38:12 +01:00
Felix Bartels
52d6b18322
Further tweaks for univention app (#264)
* add option to change base path
* fix env name
* add kweb configuration for using konnect in a subpath
* make webapp display configurable
* more explicit startup messages
* add ability to use an external oidc provider
* install the grapi ldap backend in the image when building with a recent enough kopano version
* add the ability to run test in the konnect container
  * the startup script gets more and more complicated, there should be a way to test it
* test some values and add test helper
* do not simply cat the registration, but call with yq
* update kweb and konnect
2019-11-11 10:54:54 +01:00
Felix Bartels
d13a82aed1
add some more tools (#279)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-11-04 10:44:28 +01:00
mithomas
92247340e1 Fixed issues with Z-Push shared folder configuration. (#278)
start.sh generated wrong config key for folder id and wrong datatypes
for folder type and flags. This has been corrected both there and in
the automated tests.
2019-11-04 08:38:10 +01:00
Felix Bartels
73fbadab65
DEBIAN_FRONTEND=noninteractive should be an env not an arg (#277)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-11-04 07:38:40 +01:00
Felix Bartels
2cfa0dab7f
Check at startup if a given store exists (#275)
* add check to see if a store exists
2019-11-03 21:44:29 +01:00
Felix Bartels
e3061aa0fd
update konnect, kwmserver and kweb to the latest version (#274) 2019-10-29 12:47:36 +01:00
Felix Bartels
a66ada8655 update kwmserver and kweb
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-10-29 12:26:08 +01:00
Felix Bartels
a827ef65b7
Make sure that services listen globally (#273)
they need to be made available through reverse proxy and port forwarding anyways
changed in https://jira.kopano.io/browse/KC-1616

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-10-29 12:16:39 +01:00
Felix Bartels
6ad012b234 ci: committing changes for konnect 2019-10-29 11:56:39 +01:00
Felix Bartels
e74da7b832
run apt non-interactive to prevent package questions (like config updates) during install (#272)
relates to https://github.com/zokradonh/kopano-docker/issues/261

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-10-29 10:14:44 +01:00
Felix Bartels
8fa4da5f74
further goss checks (#270)
* check for running kopano-server
* run goss during startup test for kopano-server
2019-10-24 18:49:41 +02:00
Felix Bartels
b3f7030a55
move tests into tests folder (#271)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-10-23 16:29:13 +02:00
Felix Bartels
5077bbd1b6
improve config options for grapi (#269)
* make it possible to configure grapi through its cfg
* add test for config setting in grapi
* add volume for persistent data
* chown and add tests for dir
2019-10-23 14:54:25 +02:00
Felix Bartels
bcb0926c6d
Misc changes (#268)
* fixes for setup-tools.sh

fixes https://github.com/zokradonh/kopano-docker/issues/266

* add startup tests for meet demo
* add architecture to contributing file
* define ical_listen for kopano-ical
* precreate database if it does not yet exist
* fix spelling
2019-10-22 15:00:31 +02:00
Michael Thomas
4dac253cf2 Added automatic Z-Push shared folder registration.
Via a new environment variable containing the relevant information in a
JSON string, shared folders can be specifified which will be set using
Z-Push's $additionalFolders configuration option.
2019-10-21 13:05:36 +02:00
Felix Bartels
cbe582b8ff add variables for keys to compose file for meet 2019-10-21 11:59:27 +02:00
Felix Bartels
1e5f3253a1 set the default redirect to /meet 2019-10-21 11:59:27 +02:00
Felix Bartels
4fb98fb69c
Only add guest mode configuration if guest mode is (#263)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-10-18 14:04:23 +02:00
Felix Bartels
88d71e94aa
Update bug_report.md 2019-10-18 08:32:46 +02:00
Felix Bartels
b3c7d702be
prepare ldap for multiserver (#169)
* add multi-server attributes to ldif
* add  example compose file for a multiserver
* add readme
* add script for database creation within the existing database instance
* add generation of admin.pem
* add own certificate for kopano_server_2
* add admin.pem to compose (only for multiserver)
* add spooler for 2nd node
* add link to ldap demo readme
2019-10-16 22:39:15 +02:00
Felix Bartels
b004988517
Separate out testing dependencies to be more independent of travis
* move docker-hub-helper in a general ci folder
* move installation of tools into dedicated script (will make it easier to use a different ci platform)
* mention the setup-tools script in contributing and move testing instructions in there as well
2019-10-16 17:30:42 +02:00
Felix Bartels
a06a495c1d
intruct curl to follow redirects (#259)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-10-16 14:18:32 +02:00
Felix Bartels
c49da1d5eb
Store language (#251)
* clean out unneeded locales
* add test to verify that language is picked up in admin.cfg
* add basic question for language and use variable in compose
* use scriptlet to generate locales before start of kopano-server
* add script to check folders of a given mailbox (for language checks)
* add tests for locale generation

relates to #248
2019-10-15 09:24:10 +02:00
Felix Bartels
cd74f245f1 fix linting error introduced by #256
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-10-14 11:34:47 +02:00
Felix Bartels
37f3ee0720
Make repo script more dynamic #232
* also add the ability to download the tar for supported releases
* use env variables for distribution, channel and branch
* add tests for new archive download for supported releases
2019-10-14 11:19:07 +02:00
Felix Bartels
9b5187d2e4
implement more fine grained version tagging (#256) 2019-10-11 18:20:25 +02:00
Felix Bartels
b840e66418
Add hints about Docker caching (#255)
* tweaking for docker caching
* tweaks to contributing
2019-10-09 19:46:54 +02:00
Felix Bartels
bf114ecd51
Create CONTRIBUTING.md 2019-10-09 16:49:36 +02:00
Felix Bartels
80a3b2a563
experiment with overriding exec to test bash script functions (#254)
* experiment with overriding exec to test bash script functions

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* refine tests

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* test installation of packages

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* make sure package list is not updated when there are not additional packages

* basic commander tests for webapp

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* add webapp commander to makefile

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* basic tests for webapp

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* check webapp config.php

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* add tests for z-push

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-10-08 23:00:36 +02:00
Felix Bartels
dca6e0c87b
Some tweaks to owncloud readme 2019-10-08 13:23:57 +02:00
Felix Bartels
a33458bd15
Remove printing of image size (does not work on Travis) (#252)
* move repo definition outside of ifndef
2019-10-07 15:45:24 +02:00
Felix Bartels
1de183766d
replace hexdump (#250) 2019-10-05 22:56:12 +02:00
Felix Bartels
4ae6af33fb
Enhance description with relation between containers (#243)
* add container structure as architecture document and link to it from the readme
* have separate architecture description for Meet
2019-10-04 15:28:28 +02:00
Felix Bartels
e482ed4cf5 add question issue template
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-10-03 00:31:30 +02:00
Felix Bartels
b3c3ac669e
Switch to PERMIT_DOCKER=connected-networks (#210)
* test if https://github.com/tomav/docker-mailserver/issues/1079 is resolved
* add spooler test to commander target
2019-09-18 17:17:35 +02:00
Felix Bartels
b60176ee93
move optional containers into their own compose files (#246)
* move playground into its own compose file

fixes #245

* move ldap-admin and ssp into their own directories

fixes #244

* remove command for konnect from meet example
2019-09-18 07:30:54 +02:00
Felix Bartels
c50f952456
Create pull_request_template.md 2019-09-16 11:08:03 +02:00
Felix Bartels
2ba3363c42 Update issue templates 2019-09-16 11:01:42 +02:00
Felix Bartels
b273c87cb3
More tests (#240)
* add goss healthcheck to meet
* add goss healthcheck to scheduler
* enhance goss tests for webapp
* add meet and scheduler to make target for goss
* fix healtcheck for webapp

will report 200, but also cause an error because of it being requested over plain
have dedicated url for check
* disable stats reporting in build
* update commander
2019-09-15 18:01:09 +02:00
Felix Bartels
00b15becfd wording in readme
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-09-12 13:54:48 +02:00
Felix Bartels
ab35522da5
Further improve commander test cases (#233)
* add a more detailed example based on https://github.com/SimonBaeumer/commander/pull/82
include test for '!include /usr/share/kopano/ldap.openldap.cfg'?
* add readme on testing
* add goss wait files for dagent and spooler
2019-09-12 13:26:05 +02:00
Felix Bartels
c057337097
Update Kweb, Konnect and Kwmserver to latest version (#239) 2019-09-11 13:20:39 +02:00
Felix Bartels
8026092ecb
Update setup.sh 2019-09-10 22:16:55 +02:00
Felix Bartels
1a16f9822e
make search start again (#238)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-09-10 15:22:16 +02:00
Felix Bartels
a1d1de9767
add example to run owncloud along with Kopano (#211)
* add example to run owncloud along with Kopano
* move ownloud files into dedicated folder
* add readme
* add script for ldap auto configuration
2019-09-10 14:04:37 +02:00
Felix Bartels
68c691acbd
Adapt Konnect Container for Univention (#236)
* precreate meet keys in ssl, but do the actual action in konnect
* generate all keys for meet within Konnect
* incorporate explicit logging and settings set by ucs app
* make konnect container more dynamic
* set default oidc_issuer_identifier
* print size of container
* builder image is not required for security scanning
* define entrypoint instead of using command
* more cleanup of testing containers
* give logs in case of error
2019-09-10 13:48:19 +02:00
Felix Bartels
f6074c65b1
Fix Docker syntax for proper display on Github 2019-09-10 11:33:45 +02:00
Felix Bartels
8b7b5efd28 example tuning
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-09-06 13:26:59 +02:00
Felix Bartels
8135321201
Add example compose file to run Meet without Kopano (#217)
* Add example compose file to run Meet without Kopano
* add readme 
* add an example env file
* add setup.sh so user can easily create their own
* use kopano repo by default
2019-09-06 13:19:13 +02:00
Felix Bartels
da43a5abbf
define exit trap after checking for reg (#235)
otherwise script would print an undefined variable for tmpfile

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-09-06 13:10:03 +02:00
Felix Bartels
1d3093680d remove "secure" variables
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-09-06 11:17:12 +02:00
Felix Bartels
7717fcf344 add functionality to detect the grapi version
this allows running the same dockerfile with both master and final branches of Kopano Groupware Core

Signed-off-by: Felix Bartels <felix@host-consultants.de>
(cherry picked from commit a40db475f92eb9908348871ccd4b40f24161de66)
2019-09-02 12:49:13 +02:00
RobinvG
0a7eb73e69 Add variables to change names of the other docker container (#231)
* Add variables to change names of the other docker container
	modified:   Dockerfile
	modified:   kweb.cfg
* fix default values for konnect and kapi
add inline comment
2019-08-31 20:23:39 +02:00
Felix Bartels
de66536525
Fix version detection in version.sh and add testing for it (#225)
* fix version syntax
* commander: verify output of version.sh
* commander: exit setup.sh with code 1 when .env exists
* add commander to travis
* minimal test for commander in core container
2019-08-30 18:22:36 +02:00
Felix Bartels
237b09b449
Meet quoting again (#230)
some values need explicit quoting
2019-08-29 17:15:37 +02:00
Felix Bartels
7fdb48a773 empty lines
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-08-29 16:33:11 +02:00
Felix Bartels
663b9a2e5f ci: committing changes for meet 2019-08-29 16:04:39 +02:00
Felix Bartels
4ddb0c6da7
Fix quoting of meet settings (#229)
* add on the fly debugging to meet container
* fix quoting of settings

fixes #228
2019-08-29 14:15:05 +02:00
bjoernneumann
db63ee39cb core-start-service: make the grapi ldap-backend usable (#227)
* core-start-service: make the grapi ldap-backend usable
* fix startup script for kopano grapi backend
2019-08-29 12:47:21 +02:00
Felix Bartels
1c4b520b53
also log errors for port 80 2019-08-29 10:48:02 +02:00
Felix Bartels
26c45ce1db
cut quotes from additional package var earlier on (#224)
* cut quotes from additional package var earlier on
* add easy debugging switch to script and predefine env var in base image
2019-08-28 20:49:31 +02:00
Felix Bartels
4878fc9917
Use goss for healthchecks (#223)
* basic healthcheck based on goss
* add goss to travis
* healtcheck command runs now for all services
* add to makefile
2019-08-27 14:56:49 +02:00
Felix Bartels
d6744b20e2
Add test implementation of goss (#222)
* add test target for goss
split test-ci up to later add goss to it
* bring back chown of /kopano/data
* use a dedicated goss file for kopano-server
* add todo
2019-08-24 15:40:56 +02:00
Felix Bartels
a7f0d298ad
make it possible to redirect to another url, than /webapp (#221)
* make it possible to redirect to another url, than /webapp
* add documentation
* define default value in container
* add value to .env through setup.sh
2019-08-22 16:57:31 +02:00
zokradonh
b0236bf0d8 Cure some quoting issues
* Double quotes not needed by docker compose

Same issue as here https://github.com/zokradonh/kopano-docker/issues/216

* move deletion of tmpfile into an exit trap

otherwise the file is not cleaned up when supported images are built

* repair sourcing of env by removing kopano ldap settings from env before sourcing

* additional packages env vars should be quoted in .env
* adapt start scripts to handle quotes additional packages
* treat update-tag script with ldap variable fix from setup.sh

fixes #216

* run version.sh in travis (to fail early if something is wrong there)
commit forgotten fixes to start scripts
2019-08-22 09:21:10 +02:00
Felix Bartels
b8885da14e
remove chown step in service startup (#219)
change is not neccesary and is blocking startup on kubernetes

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-08-22 08:34:08 +02:00
Felix Bartels
88409f5f37
Update grapi-explorer.yml 2019-08-21 16:09:39 +02:00
Felix Bartels
8e94353544
Update README.md 2019-08-21 08:46:22 +02:00
Felix Bartels
87b844b10e
Add grapi-explorer (#215)
* grapi explorer is located in its own (optional) file
* update readme
* optimize eclint check
2019-08-20 21:58:54 +02:00
Felix Bartels
f7934cbc51
Make it possible to use an existing konnect instance (#195)
* make konnect url configurable
* switch to fork of dockerize as it allows to skip ssl verification
since the address of the oidc issuer is now dynamic it could point to an invalid ssl certificate (the self signed cert is by default "valid" for *)
* update hadolint
* add more scopes
* only skip ssl verification when running insecure
2019-08-20 21:16:42 +02:00
Felix Bartels
ae7f679be2
remove obsolete (and wrong) "starting apache" line (#214)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-08-13 07:38:54 +02:00
Felix Bartels
fb37723cc3
Enforce .editorconfig by running eclint (#213)
* tune .editorconfig for the existing files
* fix reported linting issues
* travis: switch language to node_js to be able to run npm
* travis: build on ubuntu bionic
2019-08-12 16:14:45 +02:00
Felix Bartels
d901eb05b9
use the cleaned fqdn inside of kweb.cfg (#212)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-08-09 09:20:29 +02:00
Felix Bartels
9beb322c9d
Add blog articles on kopano.com to the readme 2019-08-08 11:54:54 +02:00
Felix Bartels
45a506c7dd
Update kweb (#209)
* Update kweb to latest release
the fqdn needs to be part of kweb.cfg
make port 2015 explicit
fixes #208

* testing improvements
add git to build container
improve ci testing
add kopano-ical ports to setup


* no longer run kweb as root
now possible because of fd5c7307db
may require to manually delete the kopano_web data volume since kweb user cannot read data from root user.
2019-08-07 14:03:26 +02:00
Felix Bartels
3b8c9c4d68
the mime type error was thrown since the meet container did not have the mime-support package (#205)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-07-12 14:12:37 +02:00
Felix Bartels
3a18f22765
Update konnect and kwmserver (#204)
* Update konnect and kwmserver

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* readd mime type workaround to web container

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-07-12 08:32:06 +02:00
Felix Bartels
d4c8b57b60
Use login via oidc in Kopano WebApp by default (#203)
fixes #202

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-07-11 16:53:29 +02:00
Felix Bartels
b12f323473
add some troubleshooting advice (#201)
* add some troubleshooting advice
* refer to official kopano help
2019-07-11 11:02:36 +02:00
Felix Bartels
fff9f80b1c
build image also needs coreutils (#200)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-07-05 21:26:41 +02:00
cguentherTUChemnitz
e94dfb7fff container restart unless stopped (#199)
* add restart statements to all services except ssl
* requested change: explicit no restart on scheduler
2019-07-04 15:40:12 +02:00
Felix Bartels
8dce0677c0 uncomment kopano-cli as its back in master
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-06-24 09:23:40 +02:00
Felix Bartels
6115b8aee4
Make it possible for users to customise exposed ports (#182)
* move portmapping into docker-compose.ports.yml

Ensure loading of docker-compose.ports.yml via COMPOSE_FILE in .env.

* instruct users to put overridden ports into override.yml
2019-06-23 21:06:35 +02:00
Felix Bartels
f18e19b5b3
update descriptions on docker hub (#191)
* add script to update image description on docker hub
* also set (short) description

fixes #179

* add optional step to makefile to update docker hub readme files

to update readme on docker hub add DOCKERREADME=yes to .env (values of variable is irrelevant, only that it its set)

* add docker_repo to .env

this fixes tagging of images for docker orgs other than the default value
2019-06-23 20:56:38 +02:00
Felix Bartels
371e7a0039
Document minimal versions required for docker and compose (#190)
* 1.19.0 is currently the minimal version you need to have to run this project

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* mention minimal required versions in readme

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-06-23 08:49:10 +02:00
Felix Bartels
f0cc708933
Add softdelete and backup to scheduler (#189)
* disable soft delete in kopano-server and add cron in scheduler to execute it there (fixes #187)
* fix cron example for backup
2019-06-21 07:50:48 +02:00
Felix Bartels
4d2cffbe09
Add linting for yaml files (#186)
* rename check-scripts target to lint
* install yamllint through pip on travis
* add yamllint config, do not fail on too long lines
* fix yaml linting errors
* remove circular dependency
2019-06-19 18:08:36 +02:00
Felix Bartels
e4983a96a2
don't restart scheduler when it fails to start (#188)
it could cause a restart loop when one of the cron commands fail to execute. rather let the container stop instead.
2019-06-19 17:48:54 +02:00
Felix Bartels
e0792a39a5
rework test image (#185)
use scheduler image as base
after dockerize round also execute some other commands
clean up test containers after run
switch kopano-admin to listing users (also more helpful when debugging)
comment kopano-cli for the moment
2019-06-16 10:59:42 +02:00
Felix Bartels
adfbfeb4a3
fail make target when docker wait returns with non zero output (#184)
just install python3-minimal in base
clear apt key todo
rework test-ci to fail when the test containers exits with error code != 1
2019-06-15 19:21:54 +02:00
Felix Bartels
aa2b8332dd
add data volume for webapp session data (#183)
this makes it possible for logged in users to roam between instances of kopano webapp
2019-06-15 11:48:15 +02:00
Felix Bartels
ff13679679
update Konnect to latest upstream (#178)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-06-13 09:45:19 +02:00
Felix Bartels
c870d5a739
use version sort for proper ordering (#180)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-06-13 08:30:06 +02:00
zokradonh
4a2167c4e5
Merge pull request #177 from zokradonh/zokradonh-patch-1
Use jq's -r switch instead of sed
2019-06-13 01:44:28 +02:00
zokradonh
f363073c84
Use jq's -r switch instead of sed
Use jq's -r switch instead of sed to remove double-quotes.
2019-06-12 13:17:18 +02:00
Felix Bartels
4bcb092266
transition to all versions numbers in labels (#175)
* update supercronic to the latest release
* update tagging for base
* fix version tag for core
* put versions for all containers into labels instead
* define vcf_ref once
* remove cache-from as caches will be invalidated early on because of passing the git ref early on
* do not rebuild when publishing
* do not rebuild when publishing
* reduce layers required for env assignment
* pull newer base images for kdav, scheduler and ssl if available
* alsp publish tag for ldap containers
* fix publishing of ssl container
2019-06-11 10:26:59 +02:00
Felix Bartels
787857e2f7
rename COMPOSE_FILE to not conflict with the env setting for this (#173)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-06-07 22:00:03 +02:00
Felix Bartels
02d12ff317
Merge pull request #170 from cguentherTUChemnitz/master
traefik-proxy-subdomain.md setup guide
2019-06-07 14:38:54 +02:00
cguentherTUChemnitz
eacadab501
Create traefik-proxy-subdomain.md 2019-06-07 13:26:43 +02:00
Felix Bartels
7eb769652d
Update LDAP demo data for multi tenant setups (#168)
* split up ldap demo data for multi tenant setups
* replace pictures with new ones from https://www.pexels.com/search/people/ (free license without the need for attribution)
2019-06-05 09:34:55 +02:00
Felix Bartels
3a0ad6d4af
smaller improvements to setup.sh (#153)
* replace bash function to list docker tags with https://github.com/genuinetools/reg/
  * this depends on new release in https://github.com/genuinetools/reg/issues/186 to fully function
* update docker version
* fix version.sh to also show versions from repos defined in .env
* add script to list available tags and update values in .env
* define default values for all version vars
* add previously missing containers
* use command instead of hash in update env script
* use a custom select function instead shell builtin (since it does not handle default values)
* add setup-update-tag in test.exp
2019-05-31 09:37:36 +02:00
Felix Bartels
f19cf274f7
prepare automatic security scanning (#122)
* add todo for docker wait
* add makefile target to scan containers with trivy
* pin version of trivy in travis file
* add trivy cache to persistent storage of travis (commented since not part of ci for the moment)
* reorg travis file + remove goss as it is not used
* add a fixed version for the base image
* add file with tags to gitignore
* introduce tag-all target
* remove after_failure step
* add ignore file for trivy
* store the tag for the builder as well
* remove tag_file after completing scans
* replace manual build and publish commands with generated ones
* update kdav builder to resolve CVE-2019-3855
* ignore CVE-2019-3855 which is thrown in kdav build container
* exclude the build-webapp-demo from build-all
2019-05-27 13:09:13 +02:00
Felix Bartels
d94b7ca55d
remove surplus locale definition from images building upon base (#165)
* remove surplus locale configuration (should only be in base image)
update konnect
add version to ldap and ldap_demo images
* also create a tag for the ldap images
* add ldap version to compose file
2019-05-27 12:01:13 +02:00
Felix Bartels
b1b04859dc
remove --pull again from Makefile (#162)
doing docker build --pull messes with chained builds (base -> php -> webapp)

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-05-27 08:06:34 +02:00
Felix Bartels
e4b391be4f
add some more documentation about used ports (#161)
also add more ports to docker-compose.yml

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-05-22 12:03:56 +02:00
Felix Bartels
394a6de790 remove testing container after test-ci run
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-05-20 09:57:53 +02:00
Felix Bartels
4bf877b791
make sure to pull in updates for the base image (#159)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-05-18 11:26:49 +02:00
Felix Bartels
67219e46cc
fixup check for jq in version.sh (#158)
replace kopano-cli in scheduler container (for the moment, binary is currently missing in master)

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-05-16 22:00:28 +02:00
Felix Bartels
38d9993b68
fix yes set as timezone (#157)
* fix yes set as timezone

value_default would not be empty but rather have yes as the value

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* also add version control for ssl and kweb

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-05-14 15:17:32 +02:00
Felix Bartels
3a886cfbeb Revert "add test to travis to check if all images in compose can be pulled from docker hub (and can also be started)"
This reverts commit 0e6ca288ef31d77d896cbee79210b37eb7e795f2.
2019-05-14 10:27:06 +02:00
Felix Bartels
cc828eddbd no more python2 in core:master
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-05-14 09:38:13 +02:00
Felix Bartels
0e6ca288ef add test to travis to check if all images in compose can be pulled from docker hub (and can also be started)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-05-14 08:20:34 +02:00
Felix Bartels
7affd26ff8 add kopano-ldap to make-publish
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-05-14 07:46:21 +02:00
Felix Bartels
5dd163467d
Add tag to kopano_ssl image (#152)
switch kopano_ssl from apline:latest to alpine:3.9
add tagging and publishing of tag to Makefile
update version of Konnect and Kweb since they have been update meanwhile
2019-05-10 20:30:37 +02:00
Felix Bartels
0f98176282
do not upgrade dependencies when installing additional dependencies (#151)
this would otherwise alter other files in the image (e.g. upgrade z-push from 2.4.5 to 2.5.0). the more sustainable approach is to bake additional packages directly into the container by building an own through the makefile.

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-05-09 13:11:45 +02:00
Felix Bartels
124eb25513
Add second ldap image without demo data (#150)
* have a separate ldap container for demo data
* add question to setup.sh about demo users
* make ldap container switchable
* piggyback small fixup for search failing when starting directly after kopano-server

fixes #53
2019-05-09 09:22:33 +02:00
Felix Bartels
39fc0a90df fix test failure introduced with webapp demo image
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-05-08 12:24:17 +02:00
Felix Bartels
bdca1cd9a0 typo fix
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-05-07 20:06:32 +02:00
Felix Bartels
1ef85eb1ba
Merge pull request #149 from fbartels/kopano-demo
add small modification for use on demo.kopano.com
2019-05-03 10:13:24 +02:00
Felix Bartels
51593d7c68 add small modification for use on demo.kopano.com
on demo systems one can now run `make build-webapp-demo` and then get a kopano_webapp container with added login hints

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-05-03 10:05:03 +02:00
Felix Bartels
10a9f19689
add basic python image (#147)
* add basic python image

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* add python image to tagging and publishing

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-05-02 18:17:26 +02:00
Felix Bartels
f5cd9a2044
add the ldap containers to the ones being published (#148)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-05-02 15:19:06 +02:00
Felix Bartels
13dae1e734
some makefile linting fixes (#145)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-04-19 12:28:23 +02:00
Felix Bartels
1db616d24c remove smime, files and mdm version
as they are just "newest" when using the repo and are put in the file through dl_and_package_community when not
uniquely sort file to filter out duplicates
remove workaround from makefile

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-04-18 22:18:30 +02:00
Felix Bartels
250c73053f
Add additional readme files for all produced images (#141) 2019-04-18 08:20:38 +02:00
Felix Bartels
6b3ded8dfc
hotfix tagging of webapp builds (#143)
since the introduction of the php base image version information in the webapp container are doubled. by removing the build args from the php image at least there is no "newest" version any longer for webapp, but it still shows the version twice.

this introduces a hotfix for this behaviour.

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-04-17 11:38:34 +02:00
Felix Bartels
7da6c3db09
update kwmserver to 0.15.3 (#142)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-04-17 11:27:26 +02:00
Felix Bartels
a65e684463
add a common php image to base webapp, z-push and kdav on (#138)
* adapt webapp container for new php base image
* clean out webapp dockerfile
* complete switch of webapp to php-fpm
* update config in web container
* update readme
* remove logging config from docker-compose.yml
* add php container to tagging and publishing
2019-04-14 13:31:19 +02:00
Felix Bartels
c5756e30c9
Make less matching less strict again (#140)
* remove setting insecure cookies by default
* less strict matching partially undoes 48e22da9d1
2019-04-14 10:31:49 +02:00
Felix Bartels
b75403f69a
Smaller optimisations (#137)
* add docker pull to warm up build cache on travis
* explicitly build multi stage build stages
* make create repo script dynamic in the choice of the distribution
2019-04-05 08:48:32 -05:00
Felix Bartels
de704dd8ec install some more tools in utils
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-31 21:22:41 +02:00
Felix Bartels
48e22da9d1
Rework php cfg handling a bit (#135)
* make sed matching a bit more strict
* append settings if not found instead of throwing error

fixes #133
2019-03-30 19:37:19 +01:00
mithomas
905bdf0edd Change restart to unless-stopped for consistency. (#134) 2019-03-30 06:17:03 +01:00
Felix Bartels
fed033e60c Merge branch 'mithomas-master' 2019-03-28 07:57:50 +01:00
Felix Bartels
23b8a68261 also fix env_file name for scheduler
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-28 07:57:21 +01:00
Michael Thomas
5e678415ab Prefix scheduler container name with COMPOSE_PROJECT_NAME.
In line with the other names for running multiple instances of this stack on the same host.
2019-03-27 21:44:58 +01:00
Felix Bartels
150a75bbe0
add example override file for minio (#130)
rename mail disable override file

fixes #74

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-25 17:00:37 +01:00
Felix Bartels
aefcf10485
Make z-push configurable through env (#128)
* change current config changes to use php_cfg_gen
* add remaining (for kopano relevant config files)
* add autodiscover to z-push image
* add more autodiscover aliases to kweb

fixes #114 #39
2019-03-25 10:16:46 +01:00
Felix Bartels
67e8f44eac add example override file for watchtower
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-24 19:10:40 +01:00
Felix Bartels
92086807ce add missing publish for scheduler
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-24 19:09:24 +01:00
Felix Bartels
cc1167291c
Make this project work with ID4ME (DenicID) (#127)
* update konnect to 0.21.0
* add example configuration
2019-03-24 18:44:36 +01:00
Felix Bartels
caac8a5c03
wip: Implement a scheduler to run recurring tasks (such as z-push-gabsync) (#123)
* add scheduler container for gabsync
Adds a general scheduler container to trigger tasks within containers.
Also adds gabsync to zpush image
* make scheduler dynamic
execute each cron job once at startup to see if they would succeed
* remove services scripts from core container (now is part of the scheduler)
* add "CRONDELAY" for tasks that should not be executed at startup
* add documentation
* clear out crontab at startup
2019-03-24 17:33:41 +01:00
Felix Bartels
830ac3c838
auto create turn credentials file from env (#126)
* auto create turn credentials file from env
2019-03-24 11:36:19 +01:00
Felix Bartels
a95a1f9b14 properly fix non ssl startup for meet
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-23 19:38:20 +01:00
Felix Bartels
b5e6f0fecf add meet port to test
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-23 17:48:45 +01:00
Felix Bartels
60ab127065 readd tls=no
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-23 17:47:43 +01:00
Felix Bartels
b98ecf2342 fix tests
(why did it not fail before?)

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-23 16:58:53 +01:00
Felix Bartels
f48e1b2084
remove container name from images not depending on it (not being able to scale up) (#125)
fixes #124

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-23 09:51:49 +01:00
Felix Bartels
6aff14c021
Check with travis if containers start (#113)
* move .env creation into install
rerun check-scripts after creation as well
* update docker-compose
* add simple test if containers start up
* redirect output of compose stop
2019-03-23 08:36:55 +01:00
mithomas
29839286ad Add dynamic dependency-wait for server and spooler service. (#119)
* Add dynamic dependency-wait for server and spooler service.
Instead of using hard-coded dependency-waits on startup for database and MTA for the server and spooler, respectively, the actually configured values are now used.

For the servers, this also takes the use of a unix file socket over a network socket into account.
2019-03-23 00:10:22 +01:00
Felix Bartels
71f88b8451 fix wrong config option in server default config
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-22 19:34:01 +01:00
Felix Bartels
dffb90e972
Misc (#120)
* add example docker override (one which would disable the mail container)
* move some config options from docker-compose into the default conf
* add missing depends_on
2019-03-22 19:07:44 +01:00
mithomas
676360dbb4 Prefix container names with COMPOSE_PROJECT_NAME. (#118)
* Prefix container names with COMPOSE_PROJECT_NAME.

This way it is easily possible to use several instances of this service stack on one host via different .env-files (e.g. for staging/production).
Volumes and networks are separated in this manner by docker-compose anyway, now the containers are too.

* Use underscore in container-names for consistency with networks and volumes.

* Remove "kopano" from container names.

This avoids repetition in the names when using the default project name which also "kopano".

* Make Caddy default port configurable.
2019-03-22 14:04:42 +01:00
mithomas
aa6043a7bd Remove redundant explicit name for ldap-net. (#117)
Since the custom name for the network ldap-net is identical to the default, this line is redundant.
2019-03-20 22:34:13 +01:00
Felix Bartels
21237f97c3 overriding config
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-20 07:50:38 +01:00
Felix Bartels
9a6dbd4a20
handle true/false differently in webapp config (#115)
* true/false should not be put in quotes as its boolean
* add a tab before inserting
2019-03-18 16:57:19 +01:00
Felix Bartels
140506df7d
Add support for meet guest mode and make meet configurable through env (#105)
* get settings for meet from env
* prepare ssl container for device registration for konnect/kwmserver
* move device registry modification to konnect container
* enable WebApp in the app switcher
* upstream docker container has been updated to alpine 3.9
* update konnect
* add further config for guest mode
* replace the check for the file with a check for konnect startup
* fix kwmserver wrapper
* add possibility to change logging in kwmserver
2019-03-18 15:22:32 +01:00
Felix Bartels
4e367badc5
make webapp configurable from env (#112)
* make webapp configurable from env
inspired by https://github.com/mlan/docker-kopano/blob/master/assets/entrypoint.sh#L80-L92 and a7c2134347/meet/start-service.sh (L22-L27)
  * updating is in a dedicated function and has verbose error handling
* add documentation for env variables
2019-03-18 12:45:03 +01:00
Felix Bartels
c8c55ae2aa add todo about webapp sessions
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-15 09:49:42 +01:00
Felix Bartels
039189520f update ldap base
add another fix to version.sh

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-14 11:29:23 +01:00
Felix Bartels
4303afe1e3 fix last name of Timmothy
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-14 09:25:47 +01:00
Felix Bartels
91ccf89765
add linting for shell scripts and Dockerfiles
* add hadolint for dockerfile linting
* add hadofile config
* add checks for dockerfiles and shellcheck into makefile
* shellcheck fixes
* add workaround so that .env can be sourced again from version.sh
* hadolint fixes
* print progress of build/run.sh
* fix check for jq in setup.sh

relates to #41 and #26
2019-03-14 07:46:54 +01:00
Felix Bartels
f5a24f2150
Merge pull request #107 from cguentherTUChemnitz/patch-1
switch restart always to unless-stopped
2019-03-11 19:59:57 +01:00
Felix Bartels
9dc6d76eea
Merge pull request #109 from mhoffmann75/mhoffmann75-patch-zpush-proxy-header
Make real IP logging work in proxy scenario
2019-03-11 19:28:38 +01:00
Martin Hoffmann
6bd8db655b
Make real IP logging work in proxy scenario
USE_CUSTOM_REMOTE_IP_HEADER should either be false or contain the name of the header to be used.
2019-03-11 18:05:07 +01:00
cguentherTUChemnitz
6e19eeba27
switch restart always to unless-stopped
I try to integrate the backup mechanisms of https://github.com/blacklabelops/volumerize, handling named volumes and automatic service stop and restart for consistent backups. Nevertheless this needs a clean stop of a service, which is only able to be achieved, if the docker restarts the containers only if they are not explicitly stopped.
2019-03-11 12:43:45 +01:00
Felix Bartels
bd83306390
Merge pull request #106 from mithomas/master
Make remaining mail ports (SMTPS/MSA/IMAP) configurable.
2019-03-11 12:28:22 +01:00
Michael Thomas
d378b12a2c Make remaining mail ports (SMTPS/MSA/IMAP) configurable. 2019-03-11 10:39:42 +01:00
Felix Bartels
3868b2af95 also redirect errors when checking for jq
relates to #103

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-10 18:47:05 +01:00
Felix Bartels
142ddc40f7
Merge pull request #104 from r00tc0d3/master
Changed 'sed -r' to 'sed -E' in setup.sh for better compatibility
2019-03-10 18:38:45 +01:00
r00tc0d3
3bf57693d7 Changed 'sed -r' to 'sed -E' in setup.sh for better compatibility 2019-03-10 17:28:57 +01:00
Felix Bartels
b3af961c13 update meet config
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-07 14:33:28 +01:00
Felix Bartels
7ada7e87ff update kweb
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-07 13:04:07 +01:00
Felix Bartels
7bd9a81f45 add imap port to compose file
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-06 15:49:56 +01:00
Felix Bartels
f6fc395066 fix kdav publish 2019-03-05 21:01:40 +01:00
Felix Bartels
1efead4e9c do not tag kdav for the moment 2019-03-05 20:47:55 +01:00
Felix Bartels
44c7eb57f5 create admin.cfg in core image
so that it can be later filled through an env variable

relates to https://github.com/zokradonh/kopano-docker/issues/99
2019-03-05 20:46:42 +01:00
Felix Bartels
842385ee34
add Kdav (#83)
* add a kdav image
* do not install composer into the docker image
instead use a multi stage build that copies the resulting directory into the final image
* set default version in compose

resolves #54
2019-03-05 17:03:22 +01:00
Felix Bartels
4507c0ae9b
Merge pull request #98 from mhoffmann75/patch-1
allow local overrides to docker-compose
2019-03-05 15:01:00 +01:00
Martin Hoffmann
3257107c89
allow local overrides to docker-compose
Exclude docker-compose.override.yml file from git updates to allow for local customizations of projects docker-compose.yml file
2019-03-05 13:59:51 +01:00
Felix Bartels
10d264fa38
Add example to run meet standalone (#90)
* refactor ssl generation
make ssl certificate names match container names
add dns names to certificates
* add example to run meet and its dependencies together with an existing kopano
* update webapp example
* remove port numbers from ssl cert
as these could have been specified in a demo environment
* set default values for HTTP, HTTPS and EMAIL
fail if FQDN is unset
make smtp and kopano-server ports configurable
* add hint about 2015 to setup.sh
* also add new defaults to webapp compose
* add example for standalone core as well
2019-03-04 20:14:36 +01:00
Felix Bartels
511140a975 add smtp submission ports
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-03-01 21:51:40 +01:00
Martin Hoffmann
96d447a4e0 Enables caldav via reverse proxy (#96)
* Adds reverse proxy for Caldav

Adds reverse proxy configuration for /caldav/ running in kopano_ical container
2019-03-01 20:40:02 +01:00
Felix Bartels
8cdd0c63f9
Unignore compose (#94)
* merge docker-compose.yml-example with docker-compose.yml
2019-02-27 12:22:03 +01:00
Felix Bartels
94a2b3ad12 some more shellcheck
fixes #41

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-02-26 17:00:32 +01:00
Felix Bartels
b21beb96c2 shellcheck for webapp
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-02-26 17:00:32 +01:00
Felix Bartels
b8cb5f720d shellsheck
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-02-26 17:00:32 +01:00
Felix Bartels
679249a1ac shellcheck fixes
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-02-26 17:00:32 +01:00
Felix Bartels
e6f290e85f
Merge pull request #89 from fbartels/centos
Improve support on CentOS
2019-02-22 22:28:43 +01:00
osboxes.org
53a5b0868c also commit changes to compose 2019-02-22 08:10:47 -05:00
osboxes.org
7680cfc76f alternative approach to internal name resolution
obsoletes EXTRA_HOST
2019-02-22 08:08:52 -05:00
osboxes.org
897a0df433 on centos7 the file is created only with -rw------- which makes konnect startup fail 2019-02-22 06:15:10 -05:00
Felix Bartels
d0d3d3c852 change interval for healthcheck
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-02-20 17:01:51 +01:00
Felix Bartels
e3d7e01583
Add Kopano Meet and depending instrastructure to meet
Makefile adjustments
reorder Makefile
adds image for kwmserver
adds image for meet
add Meet to compose
clean up proxy configuration
move kcconf.py into the base image
2019-02-19 12:57:57 +01:00
Felix Bartels
0fc1c3bef5 add question about the local ip to setup.sh
could partly resolve https://github.com/zokradonh/kopano-docker/issues/88

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-02-18 21:01:47 +01:00
Felix Bartels
7451d13f83 make build-simple also phony
add default target

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-02-09 13:04:38 +01:00
Felix Bartels
db7d042599 add build-simple
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-02-09 13:04:38 +01:00
Felix Bartels
72846074d6 add docker-file to run webapp standalone
tweak start.sh in webapp image so that it only gets the package list when there are actual packages to install

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-02-05 21:55:20 +01:00
Christian Günther
3b043334d5 support disables ssl on caddy, configured via .env 2019-01-28 22:13:24 +01:00
Christian Günther
996a65c786 document 'off' configuration in setup.sh 2019-01-28 22:13:24 +01:00
Felix Bartels
32fe88e5d8 make ldap port configurable
fix startup for grapi

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-01-28 21:37:57 +01:00
Felix Bartels
6a14fbe174
build fixes and readme improvements (#85)
* add compose to the build image
* update readme
* fine tuning for build container
* directly pass commands to run script in build env
* fix dockerfile so that everything can be build on Docker version 17.05.0-ce, build 9f07f0e-synology
2019-01-28 11:07:06 +01:00
Felix Bartels
6c70d11108 acutally publish konnect
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-01-27 21:00:47 +01:00
Felix Bartels
eafcbc982b get list of docker tags (when jq is available)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-01-27 20:51:38 +01:00
Felix Bartels
abddfcb52f switch back to uptream docker image
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-01-22 14:50:00 +01:00
Felix Bartels
a630007059
add version tagging to the web and konnect image (#78) 2019-01-11 08:06:21 +01:00
Christian Günther
e59d26986b use crypt hashes to store passwords via self-service 2019-01-10 20:50:09 +01:00
Christian Günther
c5bb45bb3d use password reset requirements to provide some more secure passwords 2019-01-10 20:50:09 +01:00
Christian Günther
e40dec737c use fixed version of self-service-password 2019-01-10 20:50:09 +01:00
Christian Günther
13acbc56f4 use fixed self-service --> has to be replaced with static release later on 2019-01-10 20:50:09 +01:00
Christian Günther
3f69629278 set self-service password default values 2019-01-10 20:50:09 +01:00
Christian Günther
8ee8e4b4c1 make password-reset stateless 2019-01-10 20:50:09 +01:00
Christian Günther
153e89f4c4 fix self-service binddn access config; use fixed container version for ssp 2019-01-10 20:50:09 +01:00
Christian Günther
134aa99bb8 add preconfigured password self service as additional folder-based web service 2019-01-10 20:50:09 +01:00
Felix Bartels
ceccd836de we should also publish konnect
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-01-10 18:44:39 +01:00
Felix Bartels
bba8686488 add playground to the containers to be published
fixes https://github.com/zokradonh/kopano-docker/issues/77

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-01-10 18:42:21 +01:00
Felix Bartels
246638297e make build phony
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-01-10 11:41:21 +01:00
Felix Bartels
f4bfb5ede8 add example for oidc playground
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-01-10 10:13:19 +01:00
Felix Bartels
292aed66f6 update readme with current default values for repos
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-01-10 08:14:35 +01:00
Felix Bartels
789762cb34
WIP: Kopano Konnect und Rest API (#72)
* add a new image for konnect
* add konnect to compose file
* adapt gencerts for konnect certs
* integrate gencerts into start.sh and adapt if to only skip individual parts
* add container for kapi
* use same config for webapp and z-push as https://stash.kopano.io/projects/KGOL/repos/kweb/browse/config/legacy.go
* use example compose file in make test target
* make compose file configurable through an env variable
* remove legacy links in compose
* write certificates first to a tempfile
* remove unnecessary paths
* add option to run kapi insecure for testing
* configure openid for kopano-server
* add local playground to test functionality of konnect and kapi
* print errors and logs to stdout in web
* add extrahosts to kopano_server
* adapt extrahosts for ip command on ubuntu 18.04
* add documentation

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-01-09 21:57:04 +01:00
Felix Bartels
d2b6952f8f
add a minimal build environment (#71)
* add a minimal build environment for systems where tools like make are not easily available
2019-01-08 21:16:45 +01:00
Felix Bartels
f5ee74f58a
Merge pull request #73 from fbartels/ldap-optimize
further ldap tuning
2019-01-08 20:37:42 +01:00
Felix Bartels
45d81d77bb further ldap tuning
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-01-08 17:02:55 +01:00
Felix Bartels
a696ca5091
Update README.md 2019-01-04 17:07:00 +01:00
Felix Bartels
b5f058a2e7 reduce ldap logging to default level
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-01-04 14:55:53 +01:00
Felix Bartels
703995e431 forward ports to kopano_server for easy local testing
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-01-04 13:43:02 +01:00
Felix Bartels
0a96798431
Merge pull request #69 from cguentherTUChemnitz/ldap-user-management-readme-hint
link kopano documentation for open-ldap user management
2019-01-03 13:29:49 +01:00
Christian Günther
b6e9bdc32b link kopano documentation for open-ldap user management 2019-01-03 12:57:56 +01:00
Felix Bartels
4313de2f24 make smaller styling changes
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-01-03 12:54:40 +01:00
Felix Bartels
897faadc7d
Merge pull request #68 from cguentherTUChemnitz/pid_removal_on_startup
fix startup of core-image containers after unclean shutdown
2019-01-03 12:51:00 +01:00
Felix Bartels
87c814d491 add todo for fixstates
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2019-01-03 08:40:40 +01:00
Felix Bartels
a9ef309cb0 Merge branch 'cguentherTUChemnitz-master' 2019-01-03 07:54:32 +01:00
Christian Günther
c678bf45d6 rename networks for consistency
readme fixup
2019-01-03 07:53:24 +01:00
Christian Günther
87bc7765ef fix startup of coreimage containers after unclean shutdown 2019-01-03 00:33:27 +01:00
Christian Günther
5b679b08b6 add readme hint to access ldap admin 2019-01-02 20:17:52 +01:00
Christian Günther
0d8bf9b46d split kopano networking into kopanonet and ldap-net 2019-01-02 20:00:11 +01:00
Christian Günther
29f72f0f69 use statically named ldap-net to be able to connect external services more easily 2019-01-02 19:58:43 +01:00
Christian Günther
0be4ae2d25 fix ldap admin does not reach the ldap service 2019-01-02 19:57:44 +01:00
zokradonh
037900a9a6
Added travis build badge 2019-01-02 09:51:12 +01:00
Felix Bartels
a52a4b9eaa add hint about dns to compose example
https://github.com/zokradonh/kopano-docker/issues/52

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-30 18:05:07 +01:00
Felix Bartels
cfd3ce09b6 remove pushing of git tags
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-30 18:05:07 +01:00
Felix Bartels
c38da0ee3e move docker_repo into the ifndef as well
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-30 18:05:07 +01:00
Felix Bartels
3c822ad08f try to fix password sourcing for travis
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-30 18:05:07 +01:00
Felix Bartels
a0e045ff38 implement building and tagging through jenkins
* improve runtime by moving some variable assignments into the individual tag targets
* add expect script to run setup.sh in travis
* change language in travis
* add secrets for kopano docker account
2018-12-30 18:05:07 +01:00
Felix Bartels
c5536c1059 ignore my wip docker-compose files
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-26 09:47:05 +01:00
Felix Bartels
30548b8181 fix review commit
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-24 12:26:05 +01:00
Felix Bartels
aec3286818 comment non functional deploy for now
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-22 17:59:11 +01:00
Felix Bartels
e5785428c3 add specific tasks to travis for master branch
repair nightly webapp builds

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-22 17:53:24 +01:00
Felix Bartels
4771dc823c fix build with supported webapp
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-22 17:10:20 +01:00
Felix Bartels
91c8562d1a fix version tagging
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-22 16:14:04 +01:00
Felix Bartels
bdef62508e adapt makefile for utils image
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-22 16:14:04 +01:00
Felix Bartels
531184a598 add readme for kopano_utils
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-22 16:14:04 +01:00
Felix Bartels
51f11fb749 add dedicated docker container for some utils
fixes https://github.com/zokradonh/kopano-docker/issues/57

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-22 16:14:04 +01:00
Felix Bartels
a83b0471d3
Add simple ci through travis (#62)
add travis.yml
2018-12-22 12:13:32 +01:00
Felix Bartels
9d5c159db8
Merge pull request #61 from nupplaphil/search_volume
Adding search index to data container
2018-12-21 07:44:22 +01:00
Philipp
58f88fde38 Adding search index to data container 2018-12-20 21:38:24 +01:00
Felix Bartels
5175bd5f85 fix socket to dagent
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-18 11:58:54 +01:00
Felix Bartels
485298bb76 add quick-test to makefile
fix socker for ical and gateway
enable non-ssl gateway and remove ssl options from docker-compose
ssl for gateway could be implemented as part of https://github.com/zokradonh/kopano-docker/issues/16

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-18 11:09:07 +01:00
Felix Bartels
63e4acca3a
Fix LDAP_QUERY_FILTER_DOMAIN
Fixes #56
2018-12-16 19:56:37 +01:00
Felix Bartels
78d4c60f6e add additional webapp plugins to makefile
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-14 22:52:29 +01:00
Felix Bartels
3eefea73b1
Merge pull request #49 from nupplaphil/smime
Adding additional repositories to WebApp setup
2018-12-14 21:15:50 +01:00
Felix Bartels
db7603e764 fix versioning of z-push
add z-push version to setup.sh
remove leftover caddyfile

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-14 20:54:25 +01:00
Felix Bartels
d211cc224a typo
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-14 16:27:14 +01:00
Felix Bartels
bda4021ade
Merge pull request #51 from nupplaphil/add_editorconfig
Add editorconfig
2018-12-14 07:41:22 +01:00
Philipp Holzer
3021b7a6bb
Forgot last newline 2018-12-13 23:12:16 +01:00
Philipp Holzer
3552d9e03e
Add editorconfig 2018-12-13 23:09:32 +01:00
Philipp Holzer
93bf2e23b3
Fixing intents & sort alphabetical 2018-12-13 20:26:28 +01:00
Philipp Holzer
13fc397c16
Fixing intents & sort alphabetical 2018-12-13 20:26:13 +01:00
Philipp Holzer
c0fc59594f
Adding WhatsApp4DeskApp support 2018-12-13 20:25:35 +01:00
Philipp Holzer
a7e23ee53b
Adding MDM / FILE / Spell support during setup.sh 2018-12-13 20:25:06 +01:00
Philipp
73ad2ef079
Adding KOPANO_SMIME_VERSION 2018-12-13 20:24:01 +01:00
Philipp
c4ed16029d
Adding S/MIME support to webapp 2018-12-13 20:24:00 +01:00
Felix Bartels
cae5f2a267
Merge pull request #50 from fbartels/ldap
add ldap indices to builtin ldap
2018-12-12 12:56:32 +01:00
Felix Bartels
8bc2ae557b remove attributes already indexed from optimize-index.ldif
add some more images to build-all make target
let compose start in the background with make test

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-12 12:53:48 +01:00
Felix Bartels
de5e17078f use correct database for index
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-12 12:32:21 +01:00
Felix Bartels
2f2e850e02 add ldif for indices
solves https://github.com/zokradonh/kopano-docker/issues/17
2018-12-12 12:14:36 +01:00
Felix Bartels
faeaf75183 smaller cleanups
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-11 07:59:03 +01:00
Felix Bartels
1785ccf7a3
Merge pull request #43 from nupplaphil/kopano-docker-42
Simplifying setup.sh
2018-12-11 07:54:55 +01:00
Philipp Holzer
1d556156e9
Improving setup.sh
- Bugfixing $LDAP_BIND_DN
- Removing ADMIN-PWs for DB/LDAP in case of alternative server
- Warning message in case of not using the bundled DB/LDAP
2018-12-10 20:28:51 +01:00
Philipp Holzer
89450d8b34
Auto setup for bundled environment 2018-12-10 20:28:50 +01:00
Philipp Holzer
779af26b80
Adding timezone guess 2018-12-10 20:28:50 +01:00
Philipp Holzer
036a83f9a8
fix intent 2018-12-10 20:28:50 +01:00
Philipp Holzer
c062ff5c1f
Restore LDAP_BASE_DN question (in case it differs from the FQDN) 2018-12-10 20:28:49 +01:00
Philipp Holzer
05dc3cd62b
Simplifying setup.sh 2018-12-10 20:28:49 +01:00
Felix Bartels
017d2a1c54
typo 2018-12-09 16:06:17 +01:00
Felix Bartels
1d5550ffbb
Update README.md 2018-12-08 09:08:02 +00:00
Felix Bartels
78768db7d2
Merge pull request #46 from zokradonh/ldap
Ldap
2018-12-03 20:05:21 +00:00
Felix Bartels
ca3dfb232c hotfix https://github.com/zokradonh/kopano-docker/issues/45
should be replaced by the proper upstream image once https://github.com/osixia/docker-openldap/pull/271 has been merged

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-03 21:02:35 +01:00
Felix Bartels
7ba2c5ce0d bump version of ldap image
relies on https://github.com/osixia/docker-openldap/pull/271 being merged
fixes https://github.com/zokradonh/kopano-docker/issues/45

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-03 20:40:51 +01:00
Felix Bartels
55a8c7705f docker-compose down -v also removes volumes
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-03 18:45:29 +01:00
Felix Bartels
66f870a5da adapt make test to clear volumes
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-12-03 18:40:53 +01:00
Felix Bartels
c42b150861
Merge pull request #44 from nupplaphil/ldap_demo_setup
LDAP demo based on setup
2018-12-02 21:10:50 +00:00
Philipp Holzer
f986a43387
LDAP demo based on setup 2018-12-02 13:47:52 +01:00
Felix Bartels
7948612803
rework current front facing proxy (#40)
* replace previous caddy construct with kopano kweb
* add kweb to makefile
* greatly simplifies setup, if user wants to tweak config of kweb he could do so in git and make a local build. Fixes #22 
* ping kweb version
* update readme
* remove build argument from docker-compose for web and ldap-demo
* fix certificate handling in kweb. fixes #38
2018-12-01 04:36:11 +01:00
Felix Bartels
6c5af47de1 update hostname in start_service
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-29 20:25:11 +01:00
Felix Bartels
19d3d8a831 update example compose file with new names for containers 2018-11-29 20:19:02 +01:00
Felix Bartels
6a0635a232 switch back to using volumes instead of mounted paths
fixes #35

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-29 19:42:36 +01:00
Felix Bartels
111b9f2129 also update ldap in example compose file
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-29 08:09:02 +01:00
Felix Bartels
51dfaf2efc clarify demo usage of the current setup
rename ldap to ldap-demo
add section to readme with steps to take for production use

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-29 08:04:42 +01:00
Felix Bartels
842a936ebb
add explicit example for kopano-backup 2018-11-26 10:30:58 +01:00
Felix Bartels
4997d70539 clean up ldap demo data
fixes #23

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-25 20:33:31 +01:00
Felix Bartels
8b20e1151f
Update README.md
Fixes https://github.com/zokradonh/kopano-docker/issues/31
2018-11-23 19:37:00 +01:00
Felix Bartels
d73d62f491 fix search startup. master is now 8.7 only
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-21 17:06:24 +01:00
Felix Bartels
07ea7b92bf unsed kcconf_ env variables before starting up the individual services
fixes https://github.com/zokradonh/kopano-docker/issues/4

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-21 17:06:24 +01:00
Felix Bartels
58081c9d41 set a different workdir, that can be easily mounted over
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-19 13:13:15 +01:00
Felix Bartels
9573d4093c remove php from core image (not needed anymore in 8.7)
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-18 14:48:31 +01:00
Andre Zoledziowski
74982ddc4c
Solved debian frontend docker build warnings 2018-11-12 16:05:40 +01:00
Felix Bartels
7493674d9d
Merge pull request #21 from fbartels/dumb-init
add script for public folder creation and periodic user sync
2018-11-12 15:30:13 +01:00
Felix Bartels
bd9f9c1ef7 add script for public folder creation and periodic user sync
Fixes: https://github.com/zokradonh/kopano-docker/issues/15

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-11 21:42:02 +01:00
zokradonh
8ac5b4ea37 Invalid command ending (#20) 2018-11-11 16:01:14 +01:00
Felix Bartels
861ae56925
Have a dedicate container for z-push (#19)
* remove z-push from webapp image

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* remove z-push from webapp start script

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* add container for z-push

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* adapt version.sh for z-push

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* ci: committing changes for zpush

* tune version.sh for z-push
adapt makefile

Signed-off-by: Felix Bartels <felix@host-consultants.de>

* add z-push to setup script and docker-compose

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-11 15:00:53 +01:00
Felix Bartels
ea400ce405 set sync_gab_realtime by default to no
mentioned in #15

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-10 15:30:16 +01:00
Felix Bartels
d0f4c2a4ae issue migrated to https://github.com/zokradonh/kopano-docker/issues/18
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-10 09:48:36 +01:00
Felix Bartels
fa2f516081 issue has been migrated to https://github.com/zokradonh/kopano-docker/issues/17
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-10 09:47:18 +01:00
Felix Bartels
def2593962 isse has been migrated to https://github.com/zokradonh/kopano-docker/issues/16
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-10 09:46:24 +01:00
Felix Bartels
05ca425400 issue has been migrated to https://github.com/zokradonh/kopano-docker/issues/15
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-10 09:45:12 +01:00
Felix Bartels
edd6ad1057
Merge pull request #14 from fbartels/compose
Rework readme & docker-compose
2018-11-10 09:36:35 +01:00
Felix Bartels
4728072dd5 make docker-compose easier to use (also by introducing variables and a setup script)
update Dockerfiles/Makefile for use with kopano supported build
introduce a local ldap image with some demo users
include caddy for reverse proxying
add proper documentation and remove obsolete build and push scripts

Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-11-09 19:23:04 +01:00
Felix Bartels
f82bcfed03 fix build.sh
Signed-off-by: Felix Bartels <felix@host-consultants.de>
2018-10-24 10:31:27 +02:00
219 changed files with 14227 additions and 1191 deletions

99
.ci/docker-hub-helper.sh Executable file
View File

@ -0,0 +1,99 @@
#!/bin/bash
# bash .travis/docker-hub-helper.sh base
set -euo pipefail
IFS=$'\n\t'
# this is a kind of ugly hack to be able to source the env file
# this is sadly needed since postfix in https://github.com/tomav/docker-mailserver/ cannot deal with quoted values
tmpfile=$(mktemp /tmp/kopano-docker-env.XXXXXX)
cp ./.env "$tmpfile"
sed -i '/LDAP_QUERY_FILTER/s/^/#/g' "$tmpfile"
sed -i '/SASLAUTHD_LDAP_FILTER/s/^/#/g' "$tmpfile"
sed -i '/KCUNCOMMENT_LDAP_1/s/^/#/g' "$tmpfile"
sed -i '/KCCOMMENT_LDAP_1/s/^/#/g' "$tmpfile"
# shellcheck disable=SC1090
source "$tmpfile"
docker_repo=${docker_repo:-zokradonh}
docker_login=${docker_login:-""}
docker_pwd=${docker_pwd:-""}
if [ -z "$docker_login" ]; then
docker_login="$(<~/.docker-account-user)"
fi
if [ -z "$docker_pwd" ]; then
docker_pwd="$(<~/.docker-account-pwd)"
fi
image=${1:-""}
if [ -z "$image" ]; then
echo "ERROR: You must specify an image to modify."
exit 1
fi
# below code is based on https://github.com/moikot/golang-dep/blob/aab3ea8462a19407544f1ce9daa11c3f0924394c/.travis/push.sh
# code has since then moved to https://github.com/moikot/docker-tools.git
#
# Pushes README.md content to Docker Hub.
#
# $1 - The image name.
# $2 - The JWT.
#
# Examples:
#
# push_readme "foo/bar" "token"
#
push_readme() {
declare -r image="${1}"
declare -r token="${2}"
declare -r readme="${3}"
local code
code=$(jq -n --arg msg "$(<"${readme}")" \
'{"registry":"registry-1.docker.io","full_description": $msg }' | \
curl -s -o /dev/null -L -w "%{http_code}" \
https://hub.docker.com/v2/repositories/"${image}"/ \
-d @- -X PATCH \
-H "Content-Type: application/json" \
-H "Authorization: JWT ${token}")
if [[ "${code}" = "200" ]]; then
printf "Successfully pushed README to Docker Hub"
else
printf "Unable to push README to Docker Hub, response code: %s\n" "${code}"
exit 1
fi
local code
code=$(jq -n --arg msg "$(head -n 1 "${readme}" | cut -d' ' -f2-)" \
'{"registry":"registry-1.docker.io","description": $msg }' | \
curl -s -o /dev/null -L -w "%{http_code}" \
https://hub.docker.com/v2/repositories/"${image}"/ \
-d @- -X PATCH \
-H "Content-Type: application/json" \
-H "Authorization: JWT ${token}")
if [[ "${code}" = "200" ]]; then
printf "Successfully pushed description to Docker Hub"
else
printf "Unable to push description to Docker Hub, response code: %s\n" "${code}"
exit 1
fi
}
# Login into Docker repository
#echo "$docker_pwd" | docker login -u "$docker_login" --password-stdin
token=$(curl -s -X POST \
-H "Content-Type: application/json" \
-d '{"username": "'"$docker_login"'", "password": "'"$docker_pwd"'"}' \
https://hub.docker.com/v2/users/login/ | jq -r .token)
push_readme "${docker_repo}"/kopano_"${image}" "${token}" "${image}"/README.md
if [ -e "$tmpfile" ]; then
rm "$tmpfile"
fi

87
.ci/setup-tools.sh Executable file
View File

@ -0,0 +1,87 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
COMMANDER_VERSION=2.1.0
DOCKER_COMPOSE_VERSION=1.25.5
GOSS_VERSION=0.3.11
HADOLINT_VERSION=1.23.0
REG_VERSION=0.16.1
SHELLCHECK_VERSION=0.7.1
progname=$(basename "$0")
tempdir=$(mktemp -d "/tmp/$progname.XXXXXX")
function cleanup() {
rm -rf "$tempdir"
}
trap cleanup INT EXIT
cd "$tempdir"
if ! command -v hadolint > /dev/null; then
sudo curl -L "https://github.com/hadolint/hadolint/releases/download/v$HADOLINT_VERSION/hadolint-$(uname -s)-$(uname -m)" -o /usr/local/bin/hadolint
sudo chmod +rx /usr/local/bin/hadolint
fi
if ! command -v docker-compose > /dev/null; then
sudo curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +rx /usr/local/bin/docker-compose
fi
if ! command -v goss > /dev/null; then
sudo curl -L https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64 -o /usr/local/bin/goss
sudo chmod +rx /usr/local/bin/goss
fi
if ! command -v dcgoss > /dev/null; then
sudo curl -L https://raw.githubusercontent.com/fbartels/goss/dcgoss-v2/extras/dcgoss/dcgoss -o /usr/local/bin/dcgoss
sudo chmod +rx /usr/local/bin/dcgoss
fi
if ! command -v commander > /dev/null; then
sudo curl -L https://github.com/SimonBaeumer/commander/releases/download/v$COMMANDER_VERSION/commander-linux-amd64 -o /usr/local/bin/commander
sudo chmod +rx /usr/local/bin/commander
fi
if ! command -v dccommander > /dev/null; then
sudo curl -L https://raw.githubusercontent.com/fbartels/dccommander/master/dccommander -o /usr/local/bin/dccommander
sudo chmod +rx /usr/local/bin/dccommander
fi
if ! command -v reg > /dev/null; then
sudo curl -L https://github.com/genuinetools/reg/releases/download/v$REG_VERSION/reg-linux-amd64 -o /usr/local/bin/reg
sudo chmod +rx /usr/local/bin/reg
fi
if ! command -v expect > /dev/null; then
sudo apt update && sudo apt install -y expect
fi
if ! command -v pip > /dev/null; then
sudo apt install -y python-pip
fi
if ! command -v yamllint > /dev/null; then
sudo pip install --upgrade pip && sudo pip install yamllint
fi
if ! command -v npm > /dev/null; then
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt install -y nodejs
npm config set prefix ~
fi
if ! command -v eclint > /dev/null; then
npm install eclint -g
fi
if ! command -v shellcheck > /dev/null; then
wget "https://github.com/koalaman/shellcheck/releases/download/v$SHELLCHECK_VERSION/shellcheck-v$SHELLCHECK_VERSION.linux.x86_64.tar.xz"
tar -xf shellcheck-v*.linux.x86_64.tar.xz
sudo mv shellcheck-v*/shellcheck /usr/local/bin/
fi
if ! command -v jq > /dev/null; then
sudo apt install -y jq
fi

16
.ci/travis-buildkit.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
# update to latest docker for buildkit support
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
# get base images to pull, as it will otherwise fail in travis
# git ls-files | xargs awk -F' ' '/^FROM/ { print $2 }' | sort -n | uniq | xargs --max-lines=1 docker pull
docker pull docker/dockerfile:1.0-experimental
docker pull docker.io/docker/dockerfile-copy:v0.1.9

38
.editorconfig Normal file
View File

@ -0,0 +1,38 @@
# editorconfig tool configuration
# see http://editorconfig.org for docs
root = true
[*]
charset = utf-8
indent_style = tab
end_of_line = lf
trim_trailing_whitespaces = true
[{*.{yml,yaml,yml-off},.yamllint}]
indent_style = space
indent_size = 2
[*.{md,txt}]
indent_style = space
trim_trailing_whitespace = false
[Dockerfile*]
indent_style = space
indent_size = 4
[*.py]
indent_style = space
indent_size = 4
[*.ldif]
indent_style = space
[*.json]
indent_style = space
[LICENSE]
indent_style = space
[Vagrantfile]
indent_style = space

28
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,28 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem. Please don't post screenshots text blocks such as logfiles or general console output.
**Additional context**
Add any other context about the problem here. Please check the [troubleshooting section](https://github.com/zokradonh/kopano-docker#troubleshooting) of the readme for additional details.

View File

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

10
.github/ISSUE_TEMPLATE/question.md vendored Normal file
View File

@ -0,0 +1,10 @@
---
name: Question
about: Select this if you have a question
title: ''
labels: question
assignees: ''
---
# For general questions about Kopano please consider posting them on the [Kopano Forum](https://forum.kopano.io) instead.

7
.github/pull_request_template.md vendored Normal file
View File

@ -0,0 +1,7 @@
Fixes #
## Proposed Changes
-
-
-

24
.github/workflows/goss.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: Weekly Goss check
on:
schedule:
- cron: "5 8 * * 1"
#on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: install expect
run: sudo apt-get update && sudo apt-get install -y expect
- name: create .env
run: ./tests/test.exp
- name: install goss
run: sudo curl -L https://github.com/aelsabbahy/goss/releases/download/v0.3.9/goss-linux-amd64 -o /usr/local/bin/goss && sudo chmod +rx /usr/local/bin/goss
- name: install dcgoss
run: sudo curl -L https://raw.githubusercontent.com/aelsabbahy/goss/master/extras/dcgoss/dcgoss -o /usr/local/bin/dcgoss && sudo chmod +rx /usr/local/bin/dcgoss
- name: Run goss tests
run: make test-goss

29
.github/workflows/reviewdog.yml-off vendored Normal file
View File

@ -0,0 +1,29 @@
name: Linting checks via Reviewdog
on: [pull_request]
jobs:
reviewdog:
runs-on: ubuntu-latest
steps:
- name: Check out code.
uses: actions/checkout@v1
- name: misspell
uses: reviewdog/action-misspell@v1
with:
github_token: ${{ secrets.github_token }}
locale: "US"
- name: eclint
uses: fbartels/action-eclint@master
with:
github_token: ${{ secrets.github_token }}
- name: yamllint
uses: fbartels/action-yamllint@master
with:
github_token: ${{ secrets.github_token }}
- name: shellcheck
uses: fbartels/action-shellcheck@master
with:
github_token: ${{ secrets.github_token }}
- name: hadolint
uses: mgrachev/action-hadolint@v1.0.1
with:
github_token: ${{ secrets.github_token }}

21
.github/workflows/stale.yml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Mark stale issues and pull requests
on:
schedule:
- cron: "0 0 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days'
days-before-stale: 30
days-before-close: 5
stale-pr-message: 'This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'

14
.gitignore vendored
View File

@ -1,5 +1,13 @@
!.travis.yml
.env
.travis/config.yml
.vagrant
.vscode/settings.json
*.env
*.pem
**/.vscode
*.yml
docker-compose.yml
certs/*
apt_auth.conf
build.tags
data/*
dive.log
docker-compose.override.yml

View File

13
.hadolint.yaml Normal file
View File

@ -0,0 +1,13 @@
ignored:
# disable following sourced files
- SC1091
# disable check for versioned upstream image
- DL3006
# disable don't use :latest
- DL3007
# disable explicit version for apt install
- DL3008
# disable explicit version for apk install
- DL3018
trustedRegistries:
- docker.io

5
.markdownlint.json Normal file
View File

@ -0,0 +1,5 @@
{
"MD013": false,
"MD026": false,
"MD034": false
}

3
.pylintrc Normal file
View File

@ -0,0 +1,3 @@
[MASTER]
init-hook='import sys; sys.path.append("base")'
disable=C0114, # missing-module-docstring

45
.travis.yml-deactivated Normal file
View File

@ -0,0 +1,45 @@
sudo: required
dist: bionic
language: node_js
node_js:
- stable
services:
- docker
before_install:
- sudo rm /usr/local/bin/docker-compose # remove pre-installed docker-compose (too old)
- bash -x .ci/setup-tools.sh
- .ci/travis-buildkit.sh # upgrade docker for buildkit support
install:
- "./version.sh"
- make lint
- "./tests/test.exp"
- "./version.sh"
- commander test tests/commander.yaml
- make lint # rerun lint to see if output is different with .env in place
- echo "docker_repo=$docker_repo" >> .env
- echo "DOCKERREADME=yes" >> .env # add DOCKERREADME env var so that make publish also updates readme files on docker hub
- echo "KCCONF_SERVER_SURVEYCLIENT_INTERVAL=0" >> kopano_server.env
- echo "KOPANO_SURVEYCLIENT_ENABLED=false" >> kopano_konnect.env
- echo "KOPANO_SURVEYCLIENT_ENABLED=false" >> kopano_kwmserver.env
- travis_retry make build-all
script:
- make test-ci
- docker-compose down -v
- make test-startup-meet-demo
deploy:
# login to docker hub
- provider: script
skip-cleanup: true
script: echo "$docker_pwd" | docker login -u "$docker_login" --password-stdin
on:
branch: master
# push images
- provider: script
skip-cleanup: true
script: make publish
on:
branch: master
#cache: # uncomment to not load/upload trivy files each time
# directories:
# - $HOME/.cache/trivy

8
.trivyignore Normal file
View File

@ -0,0 +1,8 @@
# we're not using systemd
CVE-2017-1000082
# tar setuid issue
CVE-2005-2541
# libssh2 issue not relevant since not using ssh
CVE-2019-3855

7
.yamllint Normal file
View File

@ -0,0 +1,7 @@
extends: default
rules:
# 80 chars should be enough, but don't fail if a line is longer
line-length:
max: 80
level: warning

103
ARCHITECTURE.md Normal file
View File

@ -0,0 +1,103 @@
# Architecture Overview
Aka "How do the containers connect/relate/interact with each other?"
## web
- external entry point for users accessing Kopano
- reverse proxy for containers exposing a web interface
- can retrieve ssl certificate from Let's Encrypt
- redirects all requests to /webapp by default
- recommended to use as it makes web configuration easy and secure (manual configuration will be tedious and potentially less secure)
## ldap
- (optional) bundles OpenLDAP service
- kopano_server is using LDAP to manage users
## ldap-admin and password-self-service
- optional containers to manage users in ldap and let users change their password
## mail
- MTA stack with anti-spam and anti-virus
- connects against the ldap to verify users
## db
- (optional) bundles MariaDB for the Kopano database
## kopano_ssl
- helper container to generate ssl certificates for internal usage
- will create required files and then stop
## kopano_server
- main process of the Kopano deployment
- connects towards LDAP to get a list of users and verify user logins via bind
## kopano_webapp
- provides Kopano WebApp, so users can interact with their mailboxes via their browser
## kopano_zpush
- provides Z-Push, so users can sync their mailboxes to phones and tablets
## kopano_grapi
- groupware backend of the Kopano RestAPI
## kopano_kapi
- http endpoint of the Kopano RestAPI
- stores recent calls for the user in a key value stores (queried over Rest)
## kopano_kdav
- provides KDav, so users can sync their calendars and contacts via CalDAV and CardDAV
## kopano_dagent
- mail delivery part for kopano_server
- mta delivers mail to it, dagent delivers the mail into the desired inbox
## kopano_spooler
- mail sending part for kopano_server
- monitors outboxes of users, submits mails to the mta
## kopano_gateway
- provides Pop3 and IMAP access for users
## kopano_ical
- provides iCAL and CalDAV access for users (will be replaced with KDav in the future)
## kopano_monitor
- monitors mailbox usage and sends quota mails (by directly delivering a mail into the users inbox)
## kopano_search
- provides full text indexing for mailboxes
## kopano_konnect
- authentication component (OpenID Connect)
- required for apps interacting with the Kopano RestAPI (e.g. Kopano Meet)
## kopano_kwmserver
- WebRTC signalling server
## kopano_meet
- provides the Meet web application/frontend
## kopano_scheduler
- helper container to execute scheduled tasks within Kopano

129
CODE_OF_CONDUCT.md Normal file
View File

@ -0,0 +1,129 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
contributing@kopano.io.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.

27
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,27 @@
# Contributing
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
## General architecture of containers
To get an impression how the containers interact/relate with each other have a look at the [architecture](ARCHITECTURE.md) description.
## Helping others help you
When reporting issues or asking questions please make sure to use the appropriate templates and include information such as your current configuration and versions (see https://github.com/zokradonh/kopano-docker#troubleshooting for interesting commands for this). If you are having questions about scripts and commands please make sure to include the command you're executing and the full output of this command.
## Testing
This project includes a few automated tests that can be run to ensure that containers start up and are operational. Required tools for testing can be installed by executing `bash .ci/setup-tools.sh`.
The startup test can be executed by calling `make test-startup`. It spins up all containers and checks if they listen on their expected interfaces afterwards as well as execute some commands that should succeed on a successful deployment.
A more detailed test can be executed by calling `make test-goss`. This uses [Goss](https://github.com/aelsabbahy/goss) and its helper [dcgoss](https://github.com/aelsabbahy/goss/tree/master/extras/dcgoss) to validate the container configuration at runtime. These tests have not been implemented for all containers yet, but as an upside the same validation is used as part of the container health check. Contributions are welcome!
Testing the startup scripts of the containers is still a work in progress. When running `make test-commander` [Commander](https://github.com/SimonBaeumer/commander) will be used to test output of the `version.sh` script and some of the container startup scripts.
## Tricks
To speed up testing rebuilds you can override the git hash that is passed as a build argument.
Example: `make vcs_ref=invalid build-web` or `make vcs_ref=invalid build-all`

491
Makefile
View File

@ -1,70 +1,501 @@
# define some defaults https://tech.davis-hansson.com/p/make/
SHELL := bash
.ONESHELL:
.SHELLFLAGS := -eu -o pipefail -c
.DELETE_ON_ERROR:
MAKEFLAGS += --warn-undefined-variables
MAKEFLAGS += --no-builtin-rules
docker_repo := zokradonh
docker_login := `cat ~/.docker-account-user`
docker_pwd := `cat ~/.docker-account-pwd`
base_version = $(shell docker run --rm $(docker_repo)/kopano_base cat /kopano/buildversion)
base_download_version = $(shell ./version.sh core)
core_version = $(shell docker run --rm $(docker_repo)/kopano_core cat /kopano/buildversion | grep -o -P '(?<=-).*(?=_)')
core_download_version = $(shell ./version.sh core)
webapp_version = $(shell docker run --rm $(docker_repo)/kopano_webapp cat /kopano/buildversion | tail -n 1 | grep -o -P '(?<=-).*(?=\+)')
webapp_download_version = $(shell ./version.sh webapp)
base_download_version := $(shell ./version.sh core)
core_download_version := $(shell ./version.sh core)
kapps_download_version := $(shell ./version.sh kapps)
meet_download_version := $(shell ./version.sh meet)
webapp_download_version := $(shell ./version.sh webapp)
zpush_download_version := $(shell ./version.sh zpush)
vcs_ref := $(shell git rev-parse --short HEAD)
KOPANO_CORE_REPOSITORY_URL := file:/kopano/repo/core
KOPANO_KAPPS_REPOSITORY_URL := file:/kopano/repo/kapps
KOPANO_MEET_REPOSITORY_URL := file:/kopano/repo/meet
KOPANO_WEBAPP_FILES_REPOSITORY_URL := file:/kopano/repo/files
KOPANO_WEBAPP_MDM_REPOSITORY_URL := file:/kopano/repo/mdm
KOPANO_WEBAPP_REPOSITORY_URL := file:/kopano/repo/webapp
KOPANO_WEBAPP_SMIME_REPOSITORY_URL := file:/kopano/repo/smime
KOPANO_ZPUSH_REPOSITORY_URL := https://download.kopano.io/zhub/z-push:/final/Debian_10/
DOWNLOAD_COMMUNITY_PACKAGES := 1
KOPANO_UID := 999
KOPANO_GID := 999
DOCKERCOMPOSE_FILE := docker-compose.yml -f docker-compose.db.yml -f docker-compose.ldap.yml -f docker-compose.mail.yml
TAG_FILE := build.tags
-include .env
export
# convert lowercase componentname to uppercase
component ?= base
COMPONENT = $(shell echo $(component) | tr a-z A-Z)
build-all: build-base build-core build-webapp
.PHONY: default
default: help
.PHONY: help
help: ## Show this help
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: build-all
all: build-all
build-all:
make $(shell grep -o ^build-.*: Makefile | grep -Ev 'build-all|build-simple|build-builder|build-webapp-demo|build-webapp-plugins' | uniq | sed s/://g | xargs)
.PHONY: build
build: component ?= base
build:
docker build --build-arg KOPANO_$(COMPONENT)_VERSION=${$(component)_download_version} -t $(docker_repo)/kopano_$(component) $(component)/
build: ## Helper target to build a given image. Defaults to the "base" image.
ifdef TRAVIS
@echo "fetching previous build to warm up build cache (only on travis)"
docker pull $(docker_repo)/kopano_$(component):builder || true
endif
ifeq (,$(wildcard ./apt_auth.conf))
touch apt_auth.conf
endif
BUILDKIT_PROGRESS=plain DOCKER_BUILDKIT=1 docker build --rm \
--build-arg VCS_REF=$(vcs_ref) \
--build-arg docker_repo=${docker_repo} \
--build-arg KOPANO_CORE_VERSION=${core_download_version} \
--build-arg KOPANO_$(COMPONENT)_VERSION=${$(component)_download_version} \
--build-arg KOPANO_CORE_REPOSITORY_URL=$(KOPANO_CORE_REPOSITORY_URL) \
--build-arg KOPANO_KAPPS_REPOSITORY_URL=$(KOPANO_KAPPS_REPOSITORY_URL) \
--build-arg KOPANO_MEET_REPOSITORY_URL=$(KOPANO_MEET_REPOSITORY_URL) \
--build-arg KOPANO_WEBAPP_FILES_REPOSITORY_URL=$(KOPANO_WEBAPP_FILES_REPOSITORY_URL) \
--build-arg KOPANO_WEBAPP_MDM_REPOSITORY_URL=$(KOPANO_WEBAPP_MDM_REPOSITORY_URL) \
--build-arg KOPANO_WEBAPP_REPOSITORY_URL=$(KOPANO_WEBAPP_REPOSITORY_URL) \
--build-arg KOPANO_WEBAPP_SMIME_REPOSITORY_URL=$(KOPANO_WEBAPP_SMIME_REPOSITORY_URL) \
--build-arg KOPANO_ZPUSH_REPOSITORY_URL=$(KOPANO_ZPUSH_REPOSITORY_URL) \
--build-arg DOWNLOAD_COMMUNITY_PACKAGES=$(DOWNLOAD_COMMUNITY_PACKAGES) \
--build-arg ADDITIONAL_KOPANO_PACKAGES=$(ADDITIONAL_KOPANO_PACKAGES) \
--build-arg ADDITIONAL_KOPANO_WEBAPP_PLUGINS=$(ADDITIONAL_KOPANO_WEBAPP_PLUGINS) \
--build-arg KOPANO_UID=$(KOPANO_UID) \
--build-arg KOPANO_GID=$(KOPANO_GID) \
--cache-from $(docker_repo)/kopano_$(component):builder \
--cache-from $(docker_repo)/kopano_$(component):latest \
--secret id=repocred,src=apt_auth.conf --progress=plain \
-t $(docker_repo)/kopano_$(component) $(component)/
build-base:
.PHONY: build-simple
build-simple: component ?= ssl
build-simple: ## Helper target to build a simplified image (no Kopano repo integration).
docker build --rm \
--build-arg VCS_REF=$(vcs_ref) \
--build-arg docker_repo=$(docker_repo) \
--cache-from $(docker_repo)/kopano_$(component):latest \
-t $(docker_repo)/kopano_$(component) $(component)/
.PHONY: build-builder
build-builder: component ?= kdav
build-builder: ## Helper target for images with a build stage.
ifdef TRAVIS
@echo "fetching previous build to warm up build cache (only on travis)"
docker pull $(docker_repo)/kopano_$(component):builder || true
endif
BUILDKIT_PROGRESS=plain DOCKER_BUILDKIT=1 docker build --rm \
--target builder \
--build-arg VCS_REF=$(vcf_ref) \
--build-arg docker_repo=${docker_repo} \
--build-arg KOPANO_CORE_VERSION=${core_download_version} \
--build-arg KOPANO_$(COMPONENT)_VERSION=${$(component)_download_version} \
--build-arg KOPANO_CORE_REPOSITORY_URL=$(KOPANO_CORE_REPOSITORY_URL) \
--build-arg KOPANO_MEET_REPOSITORY_URL=$(KOPANO_MEET_REPOSITORY_URL) \
--build-arg KOPANO_WEBAPP_REPOSITORY_URL=$(KOPANO_WEBAPP_REPOSITORY_URL) \
--build-arg KOPANO_WEBAPP_FILES_REPOSITORY_URL=$(KOPANO_WEBAPP_FILES_REPOSITORY_URL) \
--build-arg KOPANO_WEBAPP_MDM_REPOSITORY_URL=$(KOPANO_WEBAPP_MDM_REPOSITORY_URL) \
--build-arg KOPANO_WEBAPP_SMIME_REPOSITORY_URL=$(KOPANO_WEBAPP_SMIME_REPOSITORY_URL) \
--build-arg KOPANO_ZPUSH_REPOSITORY_URL=$(KOPANO_ZPUSH_REPOSITORY_URL) \
--build-arg DOWNLOAD_COMMUNITY_PACKAGES=$(DOWNLOAD_COMMUNITY_PACKAGES) \
--cache-from $(docker_repo)/kopano_$(component):builder \
-t $(docker_repo)/kopano_$(component):builder $(component)/
build-base: ## Build new base image.
docker pull debian:buster
component=base make build
build-core:
build-core: build-base
component=core make build
build-webapp:
build-core-dagent: build-core
docker build --rm \
-f core/Dockerfile.dagent \
--build-arg docker_repo=$(docker_repo) \
-t $(docker_repo)/kopano_dagent core/
build-helper:
component=build make build-simple
build-kapps: build-base
component=kapps make build
build-konnect:
component=konnect make build-simple
build-kwmbridge:
component=kwmbridge make build-simple
build-kwmserver:
component=kwmserver make build-simple
build-ldap:
component=ldap make build-simple
build-ldap-demo: build-ldap
component=ldap_demo make build-simple
build-meet: build-base
component=meet make build
build-php: build-base
component=php make build
build-playground:
component=playground make build-builder
component=playground make build-simple
build-python: build-base
component=python make build
build-kdav: build-php
docker pull composer:1.9
component=kdav make build-builder
component=kdav make build
build-scheduler:
docker pull docker:19.03
component=scheduler make build-simple
build-ssl:
docker pull alpine:3.11
component=ssl make build-simple
build-utils: build-core
component=utils make build
build-web:
component=web make build-simple
build-webapp: build-php
component=webapp make build
tag: component ?= base
tag:
build-webapp-demo: build-webapp ## Replaces the actual kopano_webapp container with one that has login hints for demo.kopano.com.
docker build --rm \
--build-arg docker_repo=$(docker_repo) \
-f webapp/Dockerfile.demo \
-t $(docker_repo)/kopano_webapp webapp/
build-webapp-plugins: ## Example for a custom image to install Kopano WebApp plugins
docker build --rm \
--build-arg docker_repo=$(docker_repo) \
-f webapp/Dockerfile.plugins \
-t $(docker_repo)/kopano_webapp webapp/
build-zpush: build-php
component=zpush make build
tag-all: build-all ## Helper target to create tags for all images.
make $(shell grep -o ^tag-.*: Makefile | grep -Ev 'tag-all|tag-container' | uniq | sed s/://g | xargs)
tag-container: component ?= base
tag-container: ## Helper target to tag a given image. Defaults to the base image.
@echo 'create tag $($(component)_version)'
docker tag $(docker_repo)/kopano_$(component) $(docker_repo)/kopano_$(component):${$(component)_version}
@version=$($(component)_version); while [[ $$version == *.* ]]; do \
version=$${version%.*} ; \
docker tag $(docker_repo)/kopano_$(component) $(docker_repo)/kopano_$(component):$$version ; \
done
@echo $(docker_repo)/kopano_$(component):${$(component)_version} >> $(TAG_FILE)
@echo 'create tag latest'
docker tag $(docker_repo)/kopano_$(component) $(docker_repo)/kopano_$(component):latest
git commit -m 'ci: committing changes for $(component)' -- $(component) || true
git tag $(component)/${$(component)_version} || true
tag-base:
component=base make tag
$(eval base_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_base))
component=base make tag-container
tag-core:
component=core make tag
$(eval core_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_core | cut -d+ -f1))
component=core make tag-container
tag-dagent:
$(eval dagent_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_dagent | cut -d+ -f1))
component=dagent make tag-container
tag-kapps:
$(eval kapps_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_kapps | cut -d+ -f1))
component=kapps make tag-container
tag-konnect:
$(eval konnect_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_konnect))
component=konnect make tag-container
tag-kwmbridge:
$(eval kwmbridge_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_kwmbridge))
component=kwmbridge make tag-container
tag-kwmserver:
$(eval kwmserver_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_kwmserver))
component=kwmserver make tag-container
tag-ldap:
$(eval ldap_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_ldap))
component=ldap make tag-container
$(eval ldap_demo_version := $(ldap_version))
component=ldap_demo make tag-container
tag-meet:
$(eval meet_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_meet | cut -d+ -f1))
component=meet make tag-container
tag-php:
$(eval php_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_php | cut -d- -f1))
component=php make tag-container
tag-python:
$(eval python_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_python | cut -d- -f1))
component=python make tag-container
tag-scheduler:
$(eval scheduler_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_scheduler))
component=scheduler make tag-container
tag-ssl:
$(eval ssl_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_ssl))
component=ssl make tag-container
tag-utils:
$(eval utils_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_utils | cut -d- -f1))
component=utils make tag-container
tag-web:
$(eval web_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_web))
component=web make tag-container
tag-webapp:
component=webapp make tag
$(eval webapp_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_webapp | cut -d+ -f1))
component=webapp make tag-container
git-commit:
git add -A && git commit -m "ci: commit changes before tagging"
tag-zpush:
$(eval zpush_version := \
$(shell docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' $(docker_repo)/kopano_zpush | cut -d+ -f1))
component=zpush make tag-container
# Docker publish
repo-login:
docker login -u $(docker_login) -p $(docker_pwd)
publish: git-commit repo-login publish-base publish-core publish-webapp
git push
git push origin --tags
.PHONY: publish
publish:
make $(shell grep -o ^publish-.*: Makefile | grep -Ev 'publish-container' | uniq | sed s/://g | xargs)
publish-container: component ?= base
publish-container:
publish-container: ## Helper target to push a given image to a registry. Defaults to the base image.
@echo 'publish latest to $(docker_repo)/kopano_$(component)'
docker push $(docker_repo)/kopano_$(component):${$(component)_version}
@version=$($(component)_version); while [[ $$version == *.* ]]; do \
version=$${version%.*} ; \
docker push $(docker_repo)/kopano_$(component):$$version ; \
done
ifdef PUBLISHLATEST
docker push $(docker_repo)/kopano_$(component):latest
endif
#ifdef DOCKERREADME
# bash .ci/docker-hub-helper.sh $(component)
#endif
publish-base: build-base tag-base
publish-base: tag-base
component=base make publish-container
publish-core: build-core tag-core
publish-core: tag-core
component=core make publish-container
publish-webapp: build-webapp tag-webapp
publish-dagent: tag-dagent
component=dagent make publish-container
publish-helper:
docker push $(docker_repo)/kopano_build:latest
publish-kapps: tag-kapps
component=kapps make publish-container
publish-konnect: tag-konnect
component=konnect make publish-container
publish-kwmbridge: tag-kwmbridge
component=kwmbridge make publish-container
publish-kwmserver: tag-kwmserver
component=kwmserver make publish-container
publish-ldap: tag-ldap
component=ldap make publish-container
publish-ldap-demo: tag-ldap
component=ldap_demo make publish-container
publish-meet: tag-meet
component=meet make publish-container
publish-php: tag-php
component=php make publish-container
publish-playground:
docker push $(docker_repo)/kopano_playground:latest
docker push $(docker_repo)/kopano_playground:builder
publish-python: tag-python
component=python make publish-container
publish-kdav: #tag-kdav
docker push $(docker_repo)/kopano_kdav:latest
docker push $(docker_repo)/kopano_kdav:builder
publish-scheduler: tag-scheduler
component=scheduler make publish-container
publish-ssl: tag-ssl
component=ssl make publish-container
publish-utils: tag-utils
component=utils make publish-container
publish-web: tag-web
component=web make publish-container
publish-webapp: tag-webapp
component=webapp make publish-container
publish-zpush: tag-zpush
component=zpush make publish-container
lint:
git ls-files | xargs eclint check
grep -rIl '^#![[:blank:]]*/bin/\(bash\|sh\|zsh\)' \
--exclude-dir=.git --exclude=*.sw? \
| xargs shellcheck -x
git ls-files --exclude='*.yml' --ignored | xargs --max-lines=1 yamllint
# List files which name starts with 'Dockerfile'
# eg. Dockerfile, Dockerfile.build, etc.
git ls-files --exclude='Dockerfile*' --ignored | xargs --max-lines=1 hadolint
.PHONY: clean
clean:
docker ps --filter name=kopano_test* -aq | xargs docker rm -f || true
docker-compose -f $(DOCKERCOMPOSE_FILE) down -v --remove-orphans || true
.PHONY: clean-all-images
clean-all-images:
docker rmi $$(docker images --format '{{.Repository}}:{{.Tag}}' | grep '${docker_repo}/kopano_') | grep -v '<none>'
.PHONY: clean-all-containers
clean-all-containers:
docker ps -a | awk '{ print $$1,$$2 }' | grep '$(docker_repo)/kopano_' | awk '{print $$1 }' | xargs -I {} docker rm {}
.PHONY: test
test: ## Build and start new containers for testing (also deletes existing data volumes).
docker-compose -f $(DOCKERCOMPOSE_FILE) down -v --remove-orphans || true
make build-all
docker-compose -f $(DOCKERCOMPOSE_FILE) build
docker-compose -f $(DOCKERCOMPOSE_FILE) up -d
docker-compose -f $(DOCKERCOMPOSE_FILE) ps
test-update-env: ## Recreate containers based on updated .env.
docker-compose -f $(DOCKERCOMPOSE_FILE) up -d
.PHONY: test-ci
test-ci: test-startup
.PHONY: test-startup
test-startup: clean ## Test if all containers start up
docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml build
docker-compose -f $(DOCKERCOMPOSE_FILE) up -d
docker-compose -f $(DOCKERCOMPOSE_FILE) ps
docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml run test || \
(docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml ps; \
docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml logs -t --tail=50; \
docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml stop; \
docker ps --filter name=kopano_test* -aq | xargs docker rm -f; \
exit 1)
docker-compose -f $(DOCKERCOMPOSE_FILE) -f tests/test-container.yml stop 2>/dev/null
docker ps --filter name=kopano_test* -aq | xargs docker rm -f
.PHONY: test-startup-meet-demo
test-startup-meet-demo: ## Test if the Meet demo setup starts up
docker-compose -f examples/meet/docker-compose.yml -f examples/meet/tests/test-container.yml build
docker-compose -f examples/meet/docker-compose.yml up -d
docker-compose -f examples/meet/docker-compose.yml ps
docker-compose -f examples/meet/docker-compose.yml -f examples/meet/tests/test-container.yml run test || \
(docker-compose -f examples/meet/docker-compose.yml -f examples/meet/tests/test-container.yml ps; \
docker-compose -f examples/meet/docker-compose.yml -f examples/meet/tests/test-container.yml logs -t --tail=20; \
docker-compose -f examples/meet/docker-compose.yml -f examples/meet/tests/test-container.yml stop; \
docker ps --filter name=kopano_test* -aq | xargs docker rm -f; \
exit 1)
docker-compose -f examples/meet/docker-compose.yml -f examples/meet/tests/test-container.yml stop 2>/dev/null
docker ps --filter name=kopano_test* -aq | xargs docker rm -f
.PHONY: test-startup-individual
test-startup-individual:
docker run -it --rm -e DEBUG=true -v /etc/machine-id:/etc/machine-id -v /etc/machine-id:/var/lib/dbus/machine-id kopano/kopano_konnect
# TODO this needs goss added to travis and dcgoss pulled from my own git repo
.PHONY: test-goss
test-goss: ## Test configuration of containers with goss
GOSS_FILES_PATH=core/goss/server dcgoss run kopano_server
GOSS_FILES_PATH=core/goss/dagent dcgoss run kopano_dagent
GOSS_FILES_PATH=core/goss/gateway dcgoss run kopano_gateway
GOSS_FILES_PATH=core/goss/ical dcgoss run kopano_ical
GOSS_FILES_PATH=core/goss/grapi dcgoss run kopano_grapi
GOSS_FILES_PATH=core/goss/kapi dcgoss run kopano_kapi
GOSS_FILES_PATH=core/goss/monitor dcgoss run kopano_monitor
GOSS_FILES_PATH=core/goss/search dcgoss run kopano_search
GOSS_FILES_PATH=core/goss/spooler dcgoss run kopano_spooler
GOSS_FILES_PATH=meet dcgoss run kopano_meet
GOSS_FILES_PATH=scheduler dcgoss run kopano_scheduler
GOSS_FILES_PATH=webapp dcgoss run kopano_webapp
test-commander: ## Test scripts with commander
commander test tests/commander.yaml
COMMANDER_OPTS="--concurrent 1" COMMANDER_FILES_PATH=core/commander/server dccommander run kopano_server
COMMANDER_OPTS="--concurrent 1" COMMANDER_FILES_PATH=core/commander/spooler dccommander run kopano_spooler
COMMANDER_OPTS="--concurrent 1" COMMANDER_FILES_PATH=core/commander/grapi dccommander run kopano_grapi
COMMANDER_OPTS="--concurrent 1" COMMANDER_FILES_PATH=webapp dccommander run kopano_webapp
COMMANDER_OPTS="--concurrent 1" COMMANDER_FILES_PATH=zpush dccommander run kopano_zpush
COMMANDER_OPTS="--concurrent 1" COMMANDER_FILES_PATH=konnect dccommander run kopano_konnect
COMMANDER_OPTS="--concurrent 1" COMMANDER_FILES_PATH=scheduler dccommander run kopano_scheduler
# this test will fail if you are not on a whitelisted ip
commander test tests/commander-supported.yaml || true
test-security: ## Scan containers with Trivy for known security risks (not part of CI workflow for now).
cat $(TAG_FILE) | xargs -I % sh -c 'trivy --exit-code 0 --severity HIGH --quiet --auto-refresh %'
cat $(TAG_FILE) | xargs -I % sh -c 'trivy --exit-code 1 --severity CRITICAL --quiet --auto-refresh %'
rm $(TAG_FILE)
test-quick: ## Similar to test target, but does not delete existing data volumes and does not rebuild images.
docker-compose -f $(DOCKERCOMPOSE_FILE) stop || true
docker-compose -f $(DOCKERCOMPOSE_FILE) up -d
docker-compose -f $(DOCKERCOMPOSE_FILE) ps
test-stop:
docker-compose -f $(DOCKERCOMPOSE_FILE) stop || true

443
README.md
View File

@ -1,321 +1,196 @@
# Kopano Docker Image
Unofficial kopano docker images for all kopano services.
Use kopano_core image for server/spooler/dagent/search/monitor/ical/gateway services.
Use kopano_webapp for web service.
# (unofficial) Kopano Docker Images
Building
=======
You may use `build.sh` script but you can also invoke `docker build` directly to build community or supported kopano components.
Currently there are the following components implemented by this project:
- core (server/spooler/dagent/search/monitor/ical/gateway services)
- webapp (apache server for kopano webapp and z-push)
[![Build Status](https://travis-ci.com/zokradonh/kopano-docker.svg?branch=master)](https://travis-ci.com/zokradonh/kopano-docker)
### Building community Kopano
Example:
This repository contains an easy to replicate recipe to spin up a [Kopano](https://kopano.com/) demo environment, which can (through modification of `.env` and possibly `docker-compose.yml`/`docker-compose.override.yml`) also be used for production environments.
`docker build https://github.com/zokradonh/kopano-docker.git#:core`
## How to get started?
Or use the build.sh script:
- make sure that you are running at least Docker 17.06.0 and [Docker Compose](https://docs.docker.com/compose/install/) 1.19.0.
- clone this repository to your local disk
- run `setup.sh`:
- this script will ask you a few questions about your environment
- If you are just interested in the demo environment you can accept the default values by pressing `Enter` on each question
- now run `docker-compose up` and you will see how the remaining Docker images are pulled and then everything is started
- after startup has succeeded you can access the Kopano WebApp by going to `https://kopano.demo/webapp`
- there are already some users created in the demo LDAP
- these users all have a password that is identical to the username, e.g. the password for `user1` user `user1`
- to build own containers at least Docker 19.03 is required
- this is due to the usage of build-time secrets
`build.sh -c core`
If you want to get an impression how the containers interact/relate with each other have a look at the [architecture](ARCHITECTURE.md) description.
### Building supported Kopano
If you have an active Kopano subscription you need specify the following build time arguments:
- KOPANO_CORE_REPOSITORY_URL to `https://serial:<YOURSERIAL>@download.kopano.io/supported/core:/final/Debian_9.0`
- RELEASE_KEY_DOWNLOAD to 1
- DOWNLOAD_COMMUNITY_PACKAGES to 0
**Note:** There have been reports about the LDAP demo not starting up on MacOS. It is recommended to use a Linux OS if you want to use the bundled LDAP image.
Example:
The `docker-compose.yml` file by default pulls Docker containers from for example https://hub.docker.com/r/zokradonh/kopano_core/ and https://hub.docker.com/r/zokradonh/kopano_webapp/. These images are based on the [Kopano nightly builds](https://download.kopano.io/community/) and will contain the latest version available from the time the image was built.
`docker build --build-arg KOPANO_CORE_REPOSITORY_URL=https://serial:ABC123456789@download.kopano.io/supported/core:/final/Debian_9.0 --build-arg RELEASE_KEY_DOWNLOAD=1 --build-arg DOWNLOAD_COMMUNITY_PACKAGES=0 https://github.com/zokradonh/kopano-docker.git#:core`
## Troubleshooting
Or use the build.sh script:
If you are running into a problem please include the following issues in the description of your report:
`build.sh -c core -s ABC123456789 -b final`
- the error message produced when running `docker-compose up`
- or the output of `docker-compose ps`
- for failed containers the output of `docker-compose logs $containername`
- the contents of your `.env`
- either the output of `docker-compose config` (only useful when `docker-compose up` succeeds) or your `docker-compose.yml`
- the output of `docker -v` and `docker-compose -v`
Replace `ABC123456789` with your serial.
Please make sure to remove sensitive data (for example your real hostname or passwords for accounts) when posting these information publicly.
If you have problems or questions about Kopano in general then either get in contact with the [Kopano support](https://kopano.com/support-info/) (if you have a valid subscription) or start a topic on the [Kopano forum](https://forum.kopano.io/).
## Updating
The used `docker-compose.yml` is part of the git versioning. Which mean all changes in this repository will also be applied to your local data once you pull in the latest version. If you need to configure additional env variables, this can now be done in the additional env files (more details further below, for example for `kopano_server` this file is called `kopano_server.env`). If you only want to run a subset of containers it is recommended to create a copy of `docker-compose.yml` and specify your copy when running. e.g. like `docker-compose -f my-setup.yml up -d`.
## Is this project also interesting for me when I already have a (non-Docker) Kopano environment?
Yes, indeed. You could for example use this to easily try out newer Kopano WebApp or Z-Push releases, without touching your production environment. Through the `zokradonh/kopano_core` image you could even try out newer version of e.g. `kopano-gateway` without jumping into a dependency mess in your production environment.
And last but not least this project also offers a `zokradonh/kopano_utils` image to easily run tools such as `kopano-backup`, `kopano-migration-pst`, `kopano-migration-imap` and all the other utilities that are bundles with Kopano. See [below](#some-more-commands-for-those-unfamiliar-with-docker-compose) to see how to run `zokradonh/kopano_utils`.
### Additional configuration / Need to adjust any values after the initial run of `setup.sh`?
If you want to modify some of the values from the `setup.sh` run you can simply edit `.env` in your favorite editor. Repeated runs of `setup.sh` will neither modify `docker-compose.yml` nor `.env`. In the ´.env´ file you will also find some given defaults like LDAP query filters and the local ports for the reverse proxy.
Additionally a dedicated env file is created for each container (at least where that would make sense). The env file has the container name as part of the file name. For example for the `kopano_server` container the filename is named `kopano_server.env`. These additional env files are auto created when running `setup.sh`.
Any additional configuration should be done through environment variables and not done in the actual container. The images working with configuration files (e.g. `kopano_core`, `kopano_webapp`, `kopano_meet`) have a mechanism built in to translate env variables into configuration files. For services that can directly work with env variables (e.g. `kopano_konnect`, `kopano_kwmserver`) these can be specified directly. Please check the individual `README.md` files for further instructions.
The compose file itself is part of the git repository and should not be edited directly. Instead a `docker-compose.override.yml` file (will be ignored by git) can be created to override and extend the default one. See https://docs.docker.com/compose/extends/ for more information.
#### Why is my compose override file ignored?
This project uses the `COMPOSE_FILE` environment variable to allow users to override the ports exposed by each container (for example when using a different front facing proxy). When using a `docker-compose.override.yml` file make sure this is included in this variable in the `.env` file. For example like this:
```bash
COMPOSE_FILE=docker-compose.yml:docker-compose.portmapping.yml:docker-compose.override.yml
```
#### I've pulled in the latest version, but now I cannot reach Kopano over the network any longer!
This project switched to specifying `COMPOSE_FILE` in `.env` to allow users to easily disable individual ports exposed. Please rerun `setup.sh` to add this variable to your `.env` file or add it manually.
### How to use a newer version than the one available from the Docker Hub?
In this repository you can also find a Makefile that automates the process of building newer images.
You can easily rebuild all images based on the currently available Kopano version by running `make build-all`. To just rebuild a certain image you can also run `make build-core` or `make build-webapp`. Please check the `Makefile` to see other possible targets. (depending on your environment you may also be able to autocomplete with the `Tab` key)
To be able to easily go back to a previous version you can also "tag" you Docker images by running e.g. `make tag-core`.
### Recurring tasks and maintenance tasks within Kopano
There are certain tasks within Kopano that either need to be executed once (like creating the public store when starting a new environment for the first time) or on a regular base (like syncing the internal user list with and external LDAP tree). For convenience this project includes a `scheduler` container that will take care of this and that can be dynamically configured through env variables.
Please check the `README.md` of the scheduler image for further instructions.
Instead of using the internal scheduler one can also just use an existing scheduler (cron on the docker host for example) to execute these tasks.
### How to use the project with the official and supported Kopano releases?
This project also makes it possible to build Docker images based on the official Kopano releases. For this the following section needs to be modified in `.env`:
```bash
# Docker Repository to push to/pull from
docker_repo=zokradonh
COMPOSE_PROJECT_NAME=kopano
COMPOSE_FILE=docker-compose.yml:docker-compose.ports.yml:docker-compose.db.yml:docker-compose.ldap.yml:docker-compose.mail.yml
# Modify below to build a different version, than the Kopano nightly release
# credentials for repositories are handled through a file called apt_auth.conf (which will be created through setup.sh or Makefile)
#KOPANO_CORE_REPOSITORY_URL=https://download.kopano.io/supported/core:/8.7/Debian_10/
#KOPANO_MEET_REPOSITORY_URL=https://download.kopano.io/supported/meet:/final/Debian_10/
#KOPANO_WEBAPP_REPOSITORY_URL=https://download.kopano.io/supported/webapp:/final/Debian_10/
#KOPANO_WEBAPP_FILES_REPOSITORY_URL=https://download.kopano.io/supported/files:/final/Debian_10/
#KOPANO_WEBAPP_MDM_REPOSITORY_URL=https://download.kopano.io/supported/mdm:/final/Debian_10/
#KOPANO_WEBAPP_SMIME_REPOSITORY_URL=https://download.kopano.io/supported/smime:/final/Debian_10/
#KOPANO_ZPUSH_REPOSITORY_URL=https://download.kopano.io/zhub/z-push:/final/Debian_10/
#DOWNLOAD_COMMUNITY_PACKAGES=0
```
The credentials for the Kopano package repositories can either be defined through the url itself, e.g. like `https://serial:REPLACE-ME@download.kopano.io/supported/core:/final/Debian_10/` or through an `apt_auth.conf` file. Using `apt_auth.conf` is preferred, since it does not "leak" credentials into the final image.
With the above lines uncommented and credentials in place running `make build-all` will rebuild the images based on the latest available Kopano release (don't forget to `make tag-core` and `make tag-webapp` your images after building them).
If you are running a private Docker Registry then you have to change `docker_repo` to reference your internal registry. Afterward you can run for example `make publish-core` to push the image to your registry.
---
***WARNING***
The built image now includes your serial. Do not push this image to any public registry like `hub.docker.com`.
When storing the credentials in the url the built image will include your subscription key! Do not push this image to any public registry like e.g. https://hub.docker.com!
---
### When building my own containers, how can I make sure my build works as expected?
Example
=======
Please check the [contributing information](CONTRIBUTING.md).
docker-compose.yml
```YAML
version: '3'
### What if I want to use a different front facing proxy than the one in docker-compose? Or just some part of the compose file?
services:
While using kweb is recommended, this is of course possible.
kserver:
image: zokradonh/kopano_core:${CORE_VERSION}
hostname: kserver
container_name: kopano_server
links:
- db
depends_on:
- "kssl"
environment:
- SERVICE_TO_START=server
- TZ=Europe/Berlin
- KCCONF_SERVER_COREDUMP_ENABLED=no
- KCCONF_SERVER_LOG_LEVEL=4
- KCCONF_SERVER_MYSQL_HOST=db
- KCCONF_SERVER_MYSQL_PORT=3306
- KCCONF_SERVER_MYSQL_DATABASE=kopano
- KCCONF_SERVER_MYSQL_USER=root
- KCCONF_SERVER_MYSQL_PASSWORD=YOUR_MYSQL_ROOT_PASSWORD #change here
- KCCONF_SERVER_SERVER_SSL_KEY_FILE=/kopano/ssl/kserver.pem
- KCCONF_SERVER_SERVER_SSL_CA_FILE=/kopano/ssl/ca.pem
- KCCONF_SERVER_SSLKEYS_PATH=/kopano/ssl/clients
- KCCONF_SERVER_PROXY_HEADER=* # delete line if webapp is not behind reverse proxy
- KCCONF_SERVER_SYSTEM_EMAIL_ADDRESS=hostmaster@domain.tld #change here
- KCCONF_SERVER_DISABLED_FEATURES=pop3
- KCCONF_SERVER_SEARCH_SOCKET=http://ksearch:2380/
- KCCONF_LDAP_LDAP_URI=ldaps://ldapserver:ldapport #change here
- KCCONF_LDAP_LDAP_BIND_USER=cn=SOME_STANDARD_USER,OU=MyUsers,DC=domain,DC=tld #change here
- KCCONF_LDAP_LDAP_BIND_PASSWD=PASSWORD_OF_STANDARD_USER #change here
- KCCONF_LDAP_LDAP_SEARCH_BASE=OU=MyUsers,dc=domain,dc=tld #change here
- KCCOMMENT_LDAP_1=!include /usr/share/kopano/ldap.openldap.cfg #delete if you want openldap
- KCUNCOMMENT_LDAP_1=!include /usr/share/kopano/ldap.active-directory.cfg #delete if you want openldap
networks:
- kopanonet
volumes:
- data:/kopano/data
- sslcerts:/kopano/ssl
Please check the individual web containers (kDAV, WebApp and Z-Push for individual instructions).
kdagent:
image: zokradonh/kopano_core:${CORE_VERSION}
container_name: kopano_dagent
links:
- kserver
volumes:
- sslcerts:/kopano/ssl
environment:
- SERVICE_TO_START=dagent
- TZ=Europe/Berlin
- KCCONF_DAGENT_LOG_LEVEL=6
- KCCONF_DAGENT_SERVER_SOCKET=https://kserver:237/
- KCCONF_DAGENT_SSLKEY_FILE=/kopano/ssl/kdagent.pem
networks:
- kopanonet
### How can I prevent e.g. `kopano-gateway` to be reachable from the network?
kgateway:
image: zokradonh/kopano_core:${CORE_VERSION}
container_name: kopano_gateway
links:
- kserver
volumes:
- ./gatewaycerts/:/kopano/certs/
environment:
- SERVICE_TO_START=gateway
- TZ=Europe/Berlin
- KCCONF_GATEWAY_SERVER_SOCKET=http://kserver:236/
- KCCONF_GATEWAY_SSL_PRIVATE_KEY_FILE=/kopano/certs/yourcert.key # change here
- KCCONF_GATEWAY_SSL_CERTIFICATE_FILE=/kopano/certs/yourcert.pem # change here
networks:
- kopanonet
The exposed ports of each container are defined in `docker-compose.ports.yml`. If you do not want to expose some of the containers to the network, it is recommended to copy this file to `docker-compose.override.yml`and just remove all entries that you do not want to have exposed.
kical:
image: zokradonh/kopano_core:${CORE_VERSION}
container_name: kopano_ical
links:
- kserver
environment:
- SERVICE_TO_START=ical
- TZ=Europe/Berlin
- KCCONF_ICAL_SERVER_SOCKET=http://kserver:236/
networks:
- kopanonet
### I want to use these Docker images outside of an evaluation environment. What do I need to adjust to make this possible?
kmonitor:
image: zokradonh/kopano_core:${CORE_VERSION}
container_name: kopano_monitor
links:
- kserver
volumes:
- sslcerts:/kopano/ssl
environment:
- SERVICE_TO_START=monitor
- TZ=Europe/Berlin
- KCCONF_MONITOR_SERVER_SOCKET=https://kserver:237/
- KCCONF_MONITOR_SSLKEY_FILE=/kopano/ssl/kmonitor.pem
networks:
- kopanonet
To get a quick impression of Kopano this git repository bundles a locally build LDAP image with some example users. When using the docker-compose.yml in a production environment make sure to:
ksearch:
image: zokradonh/kopano_core:${CORE_VERSION}
container_name: kopano_search
links:
- kserver
volumes:
- sslcerts:/kopano/ssl
environment:
- SERVICE_TO_START=search
- TZ=Europe/Berlin
- KCCONF_SEARCH_SERVER_BIND_NAME=http://ksearch:2380
- KCCONF_SEARCH_SERVER_SOCKET=https://kserver:237/
- KCCONF_SEARCH_SSLKEY_FILE=/kopano/ssl/ksearch.pem
networks:
- kopanonet
- switch to the non-demo ldap tree or completely remove the local LDAP from the compose file
- adapt LDAP queries in .env to match you actual LDAP server and users
- all additional configuration of the Kopano components should be specified in the compose file/the env file/an override and **not within the running container**
- make sure that there is a unique machine-id for your deployment
- the default setup mounts the file from the host, if your host is running multiple installations of Kopano make sure to generate a unique value for each installation.
kspooler:
image: zokradonh/kopano_core:${CORE_VERSION}
container_name: kopano_spooler
links:
- kserver
volumes:
- sslcerts:/kopano/ssl
environment:
- SERVICE_TO_START=spooler
- TZ=Europe/Berlin
- KCCONF_SPOOLER_SERVER_SOCKET=https://kserver:237/
- KCCONF_SPOOLER_LOG_LEVEL=4
- KCCONF_SPOOLER_SMTP_SERVER=kmta
- KCCONF_SPOOLER_SSLKEY_FILE=/kopano/ssl/kspooler.pem
networks:
- kopanonet
#### Can I combine these Docker images with my existing environment?
kwebapp:
image: zokradonh/kopano_webapp:${WEBAPP_VERSION}
hostname: kwebapp
container_name: kopano_webapp
links:
- kserver
#ports:
# - "8236:80"
# - "8237:443"
volumes:
- syncstates:/var/lib/z-push/
- sslcerts:/kopano/ssl
environment:
- TZ=Europe/Berlin
- KCCONF_SERVERHOSTNAME=kserver
- KCCONF_SERVERPORT=237
networks:
- web
- kopanonet
Yes, that is certainly a possibility. Within the `examples/` directory you can find some ready to run examples that can be run in the following way:
kssl:
image: zokradonh/kopano_ssl
container_name: kopano_ssl
volumes:
- sslcerts:/kopano/ssl
- `docker-compose -f examples/webapp.yml up -d`
kmta:
image: tvial/docker-mailserver:latest
hostname: myhost #change here
domainname: domain.tld #change here
#dns: 127.0.0.1
container_name: kopano_mta
#links:
# - adtunnel
ports:
- "25:25"
# - "143:143"
# - "587:587"
# - "993:993"
volumes:
- tmpmaildata:/var/mail
- tmpmailstate:/var/mail-state
- ./mtaconfig/:/tmp/docker-mailserver/ # create this dir
environment:
- TZ=Europe/Berlin
- ENABLE_SPAMASSASSIN=1
- ENABLE_CLAMAV=1
- ENABLE_FAIL2BAN=1
- ENABLE_POSTGREY=1
- TLS_LEVEL=intermediate
- POSTGREY_DELAY=10
- ONE_DIR=1
- DMS_DEBUG=0
- ENABLE_LDAP=1
- LDAP_SERVER_HOST=ldaps://ldapserver:ldapport #change here
- LDAP_SEARCH_BASE=OU=MyUsers,DC=domain,DC=tld #change here
- LDAP_BIND_DN=cn=SOME_STANDARD_USER,OU=MyUsers,DC=domain,DC=tld #change here
- LDAP_BIND_PW=PASSWORD_OF_SOME_STANDARD_USER #change here
- LDAP_QUERY_FILTER_USER=(&(objectClass=user)(|(mail=%s)(otherMailbox=%s)))
- LDAP_QUERY_FILTER_GROUP=(&(objectclass=group)(mail=%s))
- LDAP_QUERY_FILTER_ALIAS=(&(objectClass=user)(otherMailbox=%s))
- LDAP_QUERY_FILTER_DOMAIN=(&(|(mail=*@%s)(otherMailbox=*@%s)(mailGroupMember=*@%s))(kopanoAccount=1)(|(objectClass=user)(objectclass=group)))
- ENABLE_SASLAUTHD=1
- SASLAUTHD_LDAP_SERVER=ldaps://ldapserver:ldapport #change here
- SASLAUTHD_LDAP_BIND_DN=cn=SOME_STANDARD_USER,OU=MyUsers,DC=domain,DC=tld #change here
- SASLAUTHD_LDAP_PASSWORD=PASSWORD_OF_SOME_STANDARD_USER #change here
- SASLAUTHD_LDAP_SEARCH_BASE=OU=MyUsers,DC=domain,DC=tld #change here
- SASLAUTHD_LDAP_FILTER=(&(sAMAccountName=%U)(objectClass=person))
- SASLAUTHD_MECHANISMS=ldap
- POSTMASTER_ADDRESS=postmaster@domain.tld #change here
- SMTP_ONLY=1
- PERMIT_DOCKER=network
- ENABLE_POSTFIX_VIRTUAL_TRANSPORT=1
- POSTFIX_DAGENT=lmtp:kdagent:2003
- REPORT_RECIPIENT=1
networks:
- kopanonet
cap_add:
- NET_ADMIN
- SYS_PTRACE
### Some more commands for those unfamiliar with docker-compose
db:
image: mariadb
restart: always
container_name: kopano_db
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=YOUR_MYSQL_ROOT_PASSWORD #change here
- MYSQL_PASSWORD=YOUR_PASSWORD #change here
- MYSQL_DATABASE=kopano
- MYSQL_USER=kopano
networks:
- kopanonet
- Start ``docker-compose.yml`` file in the background: `docker-compose up -d`
- Get a status overview of the running containers: `docker-compose ps`
- Stop compose running in the background: `docker-compose stop`
- Destroy local containers and network interfaces: `docker-compose down`
- Destroy volumes as well (will completely reset the containers, **deletes all data**): `docker-compose down -v`
- Run commands in a running container: `docker-compose exec kopano_server kopano-admin -l`
- Get logs of a in the background running container: `docker-compose logs -f kopano_server`
- Run a `kopano-backup`: `docker run --rm -it -v /var/run/kopano/:/var/run/kopano -v $(pwd):/kopano/path zokradonh/kopano_utils kopano-backup`
- Same command but getting volumes from the existing `kopano_server` container: `docker run --rm -it --volumes-from kopano_server -v /root/kopano-backup:/kopano/path zokradonh/kopano_utils kopano-backup -h`
- Get a shell in a new container to (for example) run `kopano-migration-pst`: `docker run --rm -it -v /var/run/kopano/:/var/run/kopano -v $(pwd):/kopano/path zokradonh/kopano_utils` (to directly run kopano-migration-pst just append it to the command)
volumes:
db:
data:
syncstates:
sslcerts:
tmpmaildata:
tmpmailstate:
### Try this project without installing Docker locally
networks:
web: # this requires an external docker container that is a http reverse proxy (e.g. haproxy)
external:
name: haproxy_webrproxynet
kopanonet:
driver: bridge
This project includes a configuration file for [Vagrant](https://www.vagrantup.com/) to easily try kopano-docker locally. All that is required is Vagrant itself and Virtualbox.
Steps to start kopano-docker in Vagrant:
```bash
# run setup.sh
$ ./setup.sh
# provision virtual machine
$ vagrant up
# alternatively "vagrant up --provider hyperv" when running on Windows
# in case you want to connect into the machine
$ vagrant ssh
```
Requires haproxy network for http reverse proxy.
Change all lines which are commented especially those with #change here
After the machine has started it will be reachable from the local system through the IP `10.16.73.20`, please make sure that your chosen hostname resolves to this IP. The project files are mounted to `/vagrant` in the machine. To interact with the containers just change into this directory first.
This is just a quick example docker-compose.yml made in some minutes to provide a better start.
## Third party docker images
Requires `.env` file next to docker-compose.yml with content like this
```INI
CORE_VERSION=8.6.80.1055-0plus156.1
WEBAPP_VERSION=3.4.17.1565plus895.1
```
The example `docker-compose.yml` uses the following components for the MTA (mail delivery, including anti-spam & anti-virus) and openLDAP. Please consult their documentation for further configuration advice.
Requires `ldap-groups.cf` in ./mtaconfig directory next to docker-compose.yml
```INI
bind = yes
bind_dn = cn=admin,dc=domain,dc=com
bind_pw = admin
query_filter = (&(mailGroupMember=%s)(mailEnabled=TRUE))
result_attribute = mail
search_base = ou=people,dc=domain,dc=com
server_host = mail.domain.com
start_tls = no
version = 3
leaf_result_attribute = mail
special_result_attribute = member
```
Now group members of Active Directory groups can be found by postfix.
- https://github.com/tomav/docker-mailserver/
- https://github.com/osixia/docker-openldap
- https://github.com/osixia/docker-phpLDAPadmin
Furthermore you can use this directory for opendkim - see kmta's image for details.
## Further reading
The following (blog) articles have been written about this project:
- https://kopano.com/blog/building-docker-containers-for-kopano/
- https://kopano.com/blog/using-docker-to-spin-up-a-kopano-environment/

33
Vagrantfile vendored Normal file
View File

@ -0,0 +1,33 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
if !Vagrant.has_plugin?("vagrant-docker-compose")
print " WARN: Missing plugin 'vagrant-docker-compose'.\n"
print " Use 'vagrant plugin install vagrant-docker-compose' to install.\n"
end
config.vm.box = "hashicorp/bionic64"
config.vm.provider "virtualbox" do |v|
v.memory = 4096
v.cpus = 2
end
config.vm.network "private_network", ip: "10.16.73.20"
config.vm.provision :docker
config.vm.provision :docker_compose
config.vm.provision :shell, :path => "./.ci/setup-tools.sh"
config.vm.provision "app",
type: "shell",
keep_color: true,
privileged: false,
run: "always",
inline: <<-SCRIPT
cd /vagrant
docker-compose up --detach
SCRIPT
end

View File

@ -1,17 +1,36 @@
FROM debian:stretch
FROM debian:buster
ARG ADDITIONAL_KOPANO_PACKAGES=""
ARG DOWNLOAD_COMMUNITY_PACKAGES=1
ARG KOPANO_CORE_REPOSITORY_URL="file:/kopano/repo/core"
ARG KOPANO_CORE_VERSION=newest
ARG KOPANO_REPOSITORY_FLAGS=""
# Both UID and GID should not be set to values above 999
ARG KOPANO_UID=999
ARG KOPANO_GID=999
ENV \
AUTOCONFIGURE=true \
BASE_VERSION=2.2.0 \
DEBIAN_FRONTEND=noninteractive \
DEBUG=""
LABEL maintainer=az@zok.xyz \
version="2.0"
org.label-schema.name="Kopano base container" \
org.label-schema.description="Base image for containers running the Kopano groupware stack" \
org.label-schema.url="https://kopano.io" \
org.label-schema.vcs-url="https://github.com/zokradonh/kopano-docker" \
org.label-schema.version=$BASE_VERSION \
org.label-schema.schema-version="1.0"
RUN mkdir -p /kopano/repo /kopano/data /kopano/helper
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN mkdir -p /kopano/repo /kopano/data /kopano/helper /kopano/path
WORKDIR /kopano/repo
ARG DEBIAN_FRONTEND=noninteractive
# install basics
# TODO require python3 or python3-minimal?
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install --no-install-recommends -y \
apt-transport-https \
apt-utils \
@ -19,29 +38,54 @@ RUN apt-get update && \
curl \
dumb-init \
gpg \
gpg-agent \
jq \
locales \
moreutils \
python3 \
python3-minimal \
&& \
rm -rf /var/cache/apt /var/lib/apt/lists
rm -rf /var/cache/apt /var/lib/apt/lists/*
# Create kopano user and group
RUN groupadd --system --gid ${KOPANO_GID} kopano
RUN useradd --system --shell /usr/sbin/nologin --home /var/lib/kopano --gid ${KOPANO_GID} --uid ${KOPANO_UID} kopano
ENV DOCKERIZE_VERSION v0.11.6
RUN curl -sfL https://github.com/powerman/dockerize/releases/download/"$DOCKERIZE_VERSION"/dockerize-"$(uname -s)"-"$(uname -m)" \
| install /dev/stdin /usr/local/bin/dockerize && \
dockerize --version
ENV GOSS_VERSION v0.3.11
RUN curl -L https://github.com/aelsabbahy/goss/releases/download/$GOSS_VERSION/goss-linux-amd64 -o /usr/local/bin/goss && \
chmod +rx /usr/local/bin/goss && \
goss --version
# if additional locales are required this should be adjusted here
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
sed -i -e 's/# de_DE.UTF-8 UTF-8/de_DE.UTF-8 UTF-8/' /etc/locale.gen && \
sed -i -e 's/# nl_NL.UTF-8 UTF-8/nl_NL.UTF-8 UTF-8/' /etc/locale.gen && \
dpkg-reconfigure --frontend=noninteractive locales && \
update-locale LANG=en_US.UTF-8
ARG ADDITIONAL_KOPANO_PACKAGES=""
ARG DOWNLOAD_COMMUNITY_PACKAGES=1
ARG KOPANO_CORE_REPOSITORY_URL="file:/kopano/repo/core"
ARG KOPANO_CORE_VERSION=newest
ARG KOPANO_REPOSITORY_FLAGS="trusted=yes"
ARG KOPANO_WEBAPP_REPOSITORY_URL="file:/kopano/repo/webapp"
ARG KOPANO_WEBAPP_VERSION=newest
ARG RELEASE_KEY_DOWNLOAD=0
# get common utilities
COPY create-kopano-repo.sh /kopano/helper/
RUN date +%s > /kopano/buildversion
COPY kcconf.py Release.key defaultconfigs/ /kopano/
RUN apt-key add /kopano/Release.key
SHELL [ "/bin/bash", "-c"]
ONBUILD ARG DOWNLOAD_COMMUNITY_PACKAGES=1
ONBUILD ARG DOWNLOAD_DISTRIBUTION="Debian_10"
ONBUILD ARG DOWNLOAD_CHANNEL="community"
ONBUILD ARG DOWNLOAD_BRANCH=""
ONBUILD WORKDIR /kopano/repo
ONBUILD RUN \
# community download and package as apt source repository
. /kopano/helper/create-kopano-repo.sh && \
if [ ${DOWNLOAD_COMMUNITY_PACKAGES} -eq 1 ]; then \
dl_and_package_community "core" "$DOWNLOAD_DISTRIBUTION" "$DOWNLOAD_CHANNEL" "$DOWNLOAD_BRANCH"; \
dl_and_package_community "kapps" "$DOWNLOAD_DISTRIBUTION" "$DOWNLOAD_CHANNEL" "$DOWNLOAD_BRANCH"; \
fi
ARG VCS_REF
LABEL org.label-schema.vcs-ref=$VCS_REF

5
base/README.md Normal file
View File

@ -0,0 +1,5 @@
# Kopano base image
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_base.svg)](https://microbadger.com/images/zokradonh/kopano_base "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_base.svg)](https://microbadger.com/images/zokradonh/kopano_base "Microbadger version")
Common base for Kopano images. Predefines arguments and prepares fetching of Kopano packages and building of a local repository (when using nightly downloads).

51
base/Release.key Normal file
View File

@ -0,0 +1,51 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFcjak8BEACl/9+3+hgGmkIgn/G8dzfo4BY8gRtLdQkFPw/dhvZWGznvFkdY
GbSdIbcFNp8uMKva8P75rIq5XSYAU8o21gjoGuVSi55MB/JNnR22whpXHnx3Os2i
pkoFZEWqGoW/7CWAk6QVOpVK+0UXEaXTkuEKVsB+hRL9wRQNpcWN8M894/I5egGB
b1gPD9OFMTlHEVjLYFLUwGeMCSpcTU4kHu93g7S/s2xVng31xlZ2FqUgUT2GWTrR
YfPuNib0srIZXwsqmVMJdu4qx3FoIJeAd3KH11fbb2oZEmwGKYfULoATGQ6s9/nG
wVR2aJPPgZJv2YIpoE4CqKixj8ll6yc6DWzp2dOOj/4JJvpdpeO3Vu3dMy+8qBsR
VlsCRKAFJLkmnliaUxtGM3oH3URb8LSnLXWPrvDB3sEq4o5mRxooqcwzi5FQ8bvG
jzoqdw4NWIuH24Y7cC80X7o28qmN+DxySkeOtMQ9hVxYhK+bab3kw9Q9KCIT70r6
YsCPX2+5RSBDpWI4bmP/3xMD2EUsdZBZYx79Qccai9+Syhw+GgIC/Yj9tdK8++5D
XJWxTZLhYBAfoI3RsOmx38Yg9Z8fFF2l43jgveFORrv0EMcWBrJTtvLEXBPdCjBi
AYBhAsuku/Kc6/zXrbWOYnmtxiYqjiqsyOXFdXat9Vw163rup2UoGjw8sQARAQAB
tCpLb3Bhbm8gRGV2ZWxvcG1lbnQgPGRldmVsb3BtZW50QGtvcGFuby5pbz6JAlYE
EwEKAEACGwMHCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgBYhBN83ibzrIZneCNdD
pVyyfhNY4vKnBQJginN3BQkLSDyoAAoJEFyyfhNY4vKn3r0P/jgOS9vhQKR9a633
D/Ydmbc9vGNb8802SCbVdH5IhHWeVzthrJ2tHwtYoCknpfAu+K1F2OZ0upFcTvxn
qJbGnvd9UGq37o7boWic2RdLywOm5iru3YqFZXAfvtIMpGsfk7rc+ZH5SnQiRxrJ
WO8b3dM8tW+rpvUKaG7UBc613Uqki8L98cUdhZrnvEl3AaaU7OjZmdu4X6+sayWG
/bvlWcvtmJF3rNtDtZCtxf4iBgWxTKa8RkVV4XErhWtqn3vigxIspErCX0t6JY+v
RCWSjBU1abeysVmW9+p4g+hxRxwQ+u2FNrsKdjMeh0nWa1517NSKuGDMT52JoPpI
nukY0UxjvJ+0NuzM+J+0NpzG1as5eL0VU88v3bOmVyzvK9Bcrqrxxy3o5bmGVUUv
P+7uo0Mmt5RO48Pv2bc+NN7RTO5lG8MqyHSBjqoRRRJnv7YIuH4Rao8GuvoVWlAW
I2y31ed29TSsUtYbBODgtyPgydrpaj+REUj97LDXt4J1a7vvsm79GN3QQUjFP9NK
Rc+uSjkUj5HR4cgonn7ABVfTSRHQ/Y5x/DbZIY8D8aGXewErfUYLk0ekN4yoOyth
i4V5nx1BhQ+vSigqkL18ZBy+esf4nLu78PpXp2+H3C3+oV1/ahyFdjFD6BqkcR7d
/MmZlaWM9tKS84biyRFUuwb+y55auQINBFcjak8BEADNzyS331yQ24nQFMRb5TzT
ZBp/NnPtXrrdLDS5UdhwZMVMWJrQuweyl2NUlePq9J8/FarGktJnKALYzvSyAbyf
v9M9Nlm8pbFJPJUkEkt93zEGFmJGAhpSnBEOXIziugtD9lZnIQ1YN861PsojGYuC
J2Pl/HMi4mQEB9zcJ9SzqxjCS2DVD0S1hIjMrxrW3kTO8roSledHV59AkK0M6WxO
IunN6Wg29ys7VwYnqg1hXCrFP2jtqQHeD9zOmW9LnZ/UDTNfipXJVqfb04+OQLUa
LbD2HdzCLQcoIjwmOr3NZkbbXW0Luklzu6PRimLJ4mucz1ksAfFJqJAhF/0TjJiD
ZRn/7rwpR+m4bba8MIMmiRf6e+WlpVgKTYL26BwuCSpyHjIxutoXTBGZ2fT1by5R
/6Sl2cgQXGKJnNHWCla3sHVFvQmVMBenFFMjGel9l2bvl6I6Nyu5kxtD0rDynHMl
9OI2OklGzOLSlhioQnWabtoyu9glmEU+ofyNBe0BJmFJxH9jqvOwW2aMHW4NEMR1
pP7LNgLbgQ6Q1Q1WehK70TiCuH4d0WVVQ+dl/OrQSWWmqo8EDy590UJTk2uLH5mr
eamO0aVuw7GkwAoXoMowzGJjHP+bBWrDudfiLwZBpIHg2Ogct5ZxKpgr9Tx0hwix
qfTj4eO0m76j070/hvgRnQARAQABiQIlBBgBAgAPBQJXI2pPAhsMBQkJZgGAAAoJ
EFyyfhNY4vKnRC8P/jy75oYazCRhOjuNI7fPr2a546bjx4TCNMZPy3qnWg9qMwBx
8zNsx9cAg3dK4aQLN4vacPRZypVt4gKoGT2yalyVq+mE3roSAykjW+56efO6JGIP
/y7HyQb3F5tzbMJb55M1D0zeQJJLvCut2U0M9T8s9zii2N0MybUWgSEx/IHmTxO9
MEZoRBPjJkfRBnhpJ9jSiPthEutk2E+xMtti82RqWn5antUxdvZ+AXrn9VXxM1kU
VZy0OJZL4tPf4w3S+yGYjOte7BEhDus+8PA+srfdroSSA+891fGDojo2nFzC4a4M
vIPqutxy6Mu+WksRVA4w3E8WINuwEEpmsU/sWvSmJjaNu7EuZmTiF/gPapo8r6b1
XX3vtPE6UETsvnGn2IKjsAzHcdx5KYpGpXT75g46yRqvwk4b0wsVDA2/rXCTp4N9
yvINmZ0IcDqBG1RYwRdKjSN4TX+vPtu4ciDZTvTcgf7A2u/M/bc5MxZscjex6pno
/vS6N8yV71sGaKpQJOJNNU4NvdgnajWMJ9IVchwGWJFGuY89oSzW+D9MZcYKhJKg
U7N7JgDYUknY1xJpwT+XFjWBGbBjQAEQPQPcGerTCjRG9ijCsrytl2uRMGbFXueL
YmCVCErITLjX9gvcxPH38wxMkO6MQnrvNSV8dBGwhY2E0nJfBT/amTwXoNjm
=TAfQ
-----END PGP PUBLIC KEY BLOCK-----

View File

@ -1,18 +1,23 @@
#!/bin/bash
set -eu
[ "$DEBUG" ] && set -x
function urldecode { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
function version_from_filename {
echo "$1" | sed -r 's#[a-z]+-([0-9_.+]+)-.*#\1#'
basename "$1" | awk -F"-" '{print $2}'
}
function h5ai_query {
component="$1"
filename=$(curl -s -S -L -d "action=get&items%5Bhref%5D=%2Fcommunity%2F$component%3A%2F&items%5Bwhat%5D=1" -H \
"Accept: application/json" https://download.kopano.io/community/ | jq '.items[].href' | \
grep 'Debian_9.0-all\|Debian_9.0-amd64' | sed 's#"##g' | sed "s#/community/$component:/##")
component=${1:-core}
distribution=${2:-Debian_10}
channel=${3:-community} # could either be community, supported or limited
branch=${4:-""} # could either be empty, "master/tarballs/", "pre-final/tarballs/" or "final/tarballs/"
filename=$(curl -s -XPOST "https://download.kopano.io/$channel/?action=get&items\[href\]=/$channel/$component:/$branch&items\[what\]=1" | \
jq -r '.items[].href' | \
grep "$distribution-all\|$distribution-amd64" | sed "s#/$channel/$component:/##" | sed "s#/$channel/$component%3A/##")
if [ -z "${filename// }" ]; then
echo "unknown component"
@ -26,22 +31,31 @@ function h5ai_query {
function dl_and_package_community {
# take component as first argument and fallback to core if none given
component=${1:-core}
distribution=${2:-Debian_10}
channel=${3:-community}
branch=${4:-""}
if [ -d "$component" ]; then
echo "Packages have been downloaded in a previous stage. Skipping..."
return
fi
# query community server by h5ai API
filename=$(h5ai_query "$component")
filename=$(h5ai_query "$component" "$distribution" "$channel" "$branch")
filename2=$(basename "$filename")
# download & extract packages
curl -s -S -L -o "$filename" https://download.kopano.io/community/"$component":/"${filename}"
tar xf "$filename"
curl -s -S -L -o "$filename2" https://download.kopano.io/"$channel"/"$component":/"${filename}"
tar xf "$filename2"
# save buildversion
currentVersion=$(version_from_filename "$filename")
echo "$component-$currentVersion" >> /kopano/buildversion
#currentVersion=$(version_from_filename "$filename")
#echo "$component-$currentVersion" >> /kopano/buildversion
# save disk space
rm "$filename"
rm "$filename2"
mv "${filename%.tar.gz}" "$component"
mv "${filename2%.tar.gz}" "$component"
# prepare directory to be apt source
cd "$component"

View File

@ -0,0 +1,5 @@
#!/usr/bin/env python3
import kcconf
# Override configs from environment variables
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/tmp/kopano/"))

View File

@ -4,12 +4,13 @@ via environment variables"""
import re
import os
import os.path
import sys
def configkopano(configs):
""" Changes configuration files according to configs typically returned from parseenvironmentvariables(..)"""
for filename, config in configs.items():
if not os.path.exists(filename):
return
continue
# read configuration file
with open(filename) as f:
contents = f.read()
@ -34,9 +35,13 @@ def configkopano(configs):
contents = re.sub(r"^\s*#?\s*{}\s*=.*".format(key), r"{} = {}".format(key, newvalue), contents, 0, re.MULTILINE)
# save new configuration
try:
with open(filename, "w") as f:
f.write(contents)
f.close()
except (OSError, PermissionError):
print("Can't open {}, ignoring file changes".format(filename))
def parseenvironmentvariables(prependingpath):
""" Parse all environment variables starting with KCCONF_, KCCOMMENT_ and KCUNCOMMENT_ and

20
base/test.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
DEBUG=true
WORK_DIR=$(mktemp -d)
component=${1:-core}
function cleanup {
rm -rf "$WORK_DIR"
echo "Deleted temp working directory $WORK_DIR"
}
trap cleanup EXIT
cd "$WORK_DIR"
# shellcheck source=base/create-kopano-repo.sh
. "$DIR"/create-kopano-repo.sh
dl_and_package_community "$component"

137
build.sh
View File

@ -1,137 +0,0 @@
#!/bin/bash
set -eu
branch="master"
buildcontext_base="https://github.com/zokradonh/kopano-docker.git#:"
customBuildArgs=()
serial=""
component=""
nocache=""
. ./common/common.sh
function _usage()
{
echo "Usage: build.sh -c core|webapp [-s serial] [-b master|final|pre-final] [-p buildcontext] [[-a buildarg] ...] [-i]"
echo "Example: build.sh -c core -s ABC123456789DEF -b final"
echo "-c The Kopano component to be built."
echo "-s Provide serial if you want to build from supported repository."
echo "-i Do not use cache on docker build."
echo "-b If no branch is specified, 'master' will be built by default."
echo "-p If no buildcontext is specified, it will be built from git repository. Normally, you do not need to specify this."
echo "-a You can specify custom build args via e.g. -a ADDITIONAL_KOPANO_PACKAGES=kopano-migration-imap"
}
while getopts ":s:c:b:p:a:i" opt; do
case $opt in
s)
serial=$OPTARG
;;
c)
component=${OPTARG,,}
;;
b)
branch=${OPTARG,,}
;;
p)
buildcontext_base=$OPTARG
;;
a)
customBuildArgs[${#customBuildArgs[*]}]=$OPTARG
;;
i)
nocache="--no-cache"
;;
\?)
_usage
exit 1
;;
:)
echo "Option -$OPTARG requires an argument."
exit 1
;;
esac
done
case "$component" in
core)
mainpackage="kopano-server"
;;
webapp)
mainpackage="kopano-webapp"
;;
*)
_usage
exit 1
esac
customBuildString=""
# prepare custom build args
if [[ ${customBuildArgs[@]:+${customBuildArgs[@]}} ]];
then
for buildArg in "${customBuildArgs[@]}"
do
customBuildString="$customBuildString --build-arg $buildArg"
done
fi
if [ ! -z "$serial" ]
then
# start build of supported kopano
# get current version to brand and tag the image correctly
currentVersion=$(curl -s -S -L "https://serial:$serial@download.kopano.io/supported/$component:/$branch/Debian_9.0/Packages.gz" |\
gzip -d | grep -A 8 "^Package: $mainpackage$" | awk '/Version/ { print $2 }')
# webapp also needs core repository
if [ "$component" == "webapp" ]
then
customBuildString="$customBuildString --build-arg KOPANO_CORE_REPOSITORY_URL=https://serial:$serial@download.kopano.io/supported/core:/$branch/Debian_9.0"
fi
echo "Start building supported kopano $component image version ($currentVersion)..."
set -x
# build it
if docker build --pull \
--build-arg "KOPANO_${component^^}_REPOSITORY_URL=https://serial:$serial@download.kopano.io/supported/$component:/$branch/Debian_9.0" \
--build-arg RELEASE_KEY_DOWNLOAD=1 \
--build-arg "DOWNLOAD_COMMUNITY_PACKAGES=0" \
--build-arg "KOPANO_${component^^}_VERSION=$currentVersion" \
-t "zokradonh/kopano_$component:${currentVersion//+/plus}" \
-t "zokradonh/kopano_$component:latest-$branch" \
$nocache \
$customBuildString \
"${buildcontext_base}${component}"
then
set +x
echo "Please note that this image does include your serial. If you publish this image then your serial is exposed to public."
fi
else
# start build of community kopano
if ! hash jq
then
echo "Please install jq in order to run this build script."
exit 1
fi
# query community server by h5ai API
filename=$(h5ai_query "$component")
currentVersion=$(version_from_filename "$filename")
echo "Start building community kopano $component image version ($currentVersion)..."
set -x
# build it
docker build --pull \
-t "zokradonh/kopano_$component:${currentVersion//+/plus}" \
-t "zokradonh/kopano_$component:latest-$branch" \
-t "zokradonh/kopano_$component:latest" \
--build-arg "KOPANO_${component^^}_VERSION=$currentVersion" \
$nocache \
$customBuildString \
"${buildcontext_base}${component}"
set +x
fi

36
build/Dockerfile Normal file
View File

@ -0,0 +1,36 @@
FROM koalaman/shellcheck-alpine:v0.7.1 as shellcheck
FROM docker:19.03
ENV \
COMMANDER_VERSION=2.1.0 \
COMPOSE_VERSION=1.19.0 \
GOSS_VERSION=0.3.11 \
HADOLINT_VERSION=1.17.6 \
REG_VERSION=0.16.1 \
TRIVY_VERSION=0.1.1
LABEL maintainer=az@zok.xyz \
org.label-schema.name="Kopano Container Builder" \
org.label-schema.description="Helper Container to help building and testing containers" \
org.label-schema.url="https://kopano.io" \
org.label-schema.vcs-url="https://github.com/zokradonh/kopano-docker/build/" \
org.label-schema.version=1.0.0 \
org.label-schema.schema-version="1.0"
RUN apk add --no-cache bash curl coreutils git grep expect make nano npm jq py-pip
#RUN apk add --no-cache shellcheck --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
COPY --from=shellcheck /bin/shellcheck /bin/shellcheck
RUN curl -fSL "https://github.com/genuinetools/reg/releases/download/v$REG_VERSION/reg-linux-amd64" -o "/usr/local/bin/reg" && \
curl -fSL "https://github.com/hadolint/hadolint/releases/download/v$HADOLINT_VERSION/hadolint-$(uname -s)-$(uname -m)" -o /usr/local/bin/hadolint && \
curl -fSL "https://github.com/docker/compose/releases/download/$COMPOSE_VERSION/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && \
curl -fSL "https://github.com/aelsabbahy/goss/releases/download/v$GOSS_VERSION/goss-linux-amd64" -o /usr/local/bin/goss && \
curl -L "https://raw.githubusercontent.com/fbartels/goss/dcgoss-v2/extras/dcgoss/dcgoss" -o /usr/local/bin/dcgoss && \
curl -fSL "https://github.com/SimonBaeumer/commander/releases/download/v$COMMANDER_VERSION/commander-linux-amd64" -o /usr/local/bin/commander && \
curl -fSL "https://raw.githubusercontent.com/fbartels/dccommander/master/dccommander" -o /usr/local/bin/dccommander && \
pip install --no-cache-dir yamllint==1.19.0 && \
npm config set unsafe-perm true && \
npm install -g eclint@2.8.1 && \
chmod a+x /usr/local/bin/*
WORKDIR /kopano-docker
CMD ["bash"]

70
build/README.md Normal file
View File

@ -0,0 +1,70 @@
# Minimal build environment
Helper container for systems where build requirements (bash, curl, docker-compose, jq, make) are not available (for example on Synology)
Run the following command to enter the "build environment" (command may need to be run with `sudo` to work with the `docker` command):
```bash
$ ./run.sh
This script may need to be run as root to be able to use docker/docker-compose through it.
bash-4.4$
```
(the first time it will take a moment before the bash prompt is displayed, since the container is built locally first)
Afterwards you can execute the `setup.sh` script, modify `.env` to your liking and run any make commands:
```bash
bash-4.4# ./setup.sh
Creating an .env file for you
Which tag do you want to use for Kopano Core components? [latest]:
Which tag do you want to use for Kopano WebApp? [latest]:
Which tag do you want to use for Z-Push? [latest]:
Name of the Organisation for LDAP [Kopano Demo]:
FQDN to be used (for reverse proxy) [kopano.demo]:
Email address to use for Lets Encrypt. Use 'self_signed' as your email to create self signed certificates [self_signed]:
Name of the BASE DN for LDAP [dc=kopano,dc=demo]:
LDAP server to be used (defaults to the bundled OpenLDAP) [ldap://ldap:389]:
Timezone to be used [Europe/Berlin.]:
E-Mail Address displayed for the 'postmaster' [postmaster@kopano.demo]:
Name/Address of Database server (defaults to the bundled one) [db]:
Available options:
1 ) de-at
2 ) de-ch
3 ) de-de
4 ) en
5 ) en-gb
6 ) es
7 ) fr
8 ) it
9 ) nl
10 ) pl-pl
Check language spell support (again to uncheck, ENTER when done):
Available options:
1 ) contactfax
2 ) desktopnotifications
3 ) filepreviewer
4 ) files
5 ) filesbackend-smb
6 ) filesbackend-owncloud
7 ) folderwidgets
8 ) gmaps
9 ) intranet
10 ) mattermost
11 ) mdm
12 ) pimfolder
13 ) quickitems
14 ) smime
15 ) titlecounter
16 ) webappmanual
17 ) zdeveloper
Check for additional plugins (again to uncheck, ENTER when done):
Integrate WhatsApp into DeskApp yes/no [no]:
bash-4.4# make build-all
docker build -t zokradonh/kopano_ssl ssl/
Sending build context to Docker daemon 4.608kB
[...]
```
This container also includes ´docker-compose´ for systems that can not be easily updated (again Synology). You can freely choose to use ´docker-compose up -d´ from inside or outside of this container.

16
build/run.sh Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
if [ ! "$(id -u)" -eq 0 ]; then
echo "This script may need to be run as root to be able to use docker/docker-compose through it."
fi
cd "$(dirname "$0")" || exit
docker pull zokradonh/kopano_build:latest || true
docker build --cache-from zokradonh/kopano_build:latest .
docker run \
--rm -it \
-u "$(id -u)":"$(id -g)" \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "$(pwd)"/..:/kopano-docker/ \
"$(docker build --cache-from zokradonh/kopano_build:latest -q .)" "$@"

View File

@ -1,49 +1,88 @@
FROM zokradonh/kopano_base
# syntax = docker/dockerfile:1.0-experimental
ARG docker_repo=zokradonh
FROM ${docker_repo}/kopano_base
ARG ADDITIONAL_KOPANO_PACKAGES=""
ARG DOWNLOAD_COMMUNITY_PACKAGES=1
ARG KOPANO_REPOSITORY_FLAGS="trusted=yes"
ARG DEBIAN_FRONTEND=noninteractive
ARG KOPANO_CORE_REPOSITORY_URL="file:/kopano/repo/core"
ARG KOPANO_CORE_VERSION=newest
ARG KOPANO_REPOSITORY_FLAGS="trusted=yes"
ARG RELEASE_KEY_DOWNLOAD=0
ARG KOPANO_KAPPS_REPOSITORY_URL="file:/kopano/repo/kapps"
ARG KOPANO_KAPPS_VERSION=newest
# install Kopano WebApp and refresh ca-certificates
RUN \
# community download and package as apt source repository
. /kopano/helper/create-kopano-repo.sh && \
if [ ${DOWNLOAD_COMMUNITY_PACKAGES} -eq 1 ]; then \
dl_and_package_community "core"; \
fi; \
ENV \
ADDITIONAL_KOPANO_PACKAGES=$ADDITIONAL_KOPANO_PACKAGES \
DOWNLOAD_BRANCH="" \
DOWNLOAD_CHANNEL="community" \
DOWNLOAD_COMMUNITY_PACKAGES=$DOWNLOAD_COMMUNITY_PACKAGES \
DOWNLOAD_DISTRIBUTION="Debian_10" \
GRAPI_BACKEND="kopano" \
KCCONF_GRAPI_LDAP_BASEDN="" \
KCCONF_GRAPI_LDAP_BINDDN="" \
KCCONF_GRAPI_LDAP_BINDPW_FILE="" \
KCCONF_GRAPI_LDAP_URI="" \
KOPANO_CONFIG_PATH=/tmp/kopano \
KOPANO_CORE_REPOSITORY_URL=$KOPANO_CORE_REPOSITORY_URL \
KOPANO_CORE_VERSION=$KOPANO_CORE_VERSION \
KOPANO_REPOSITORY_FLAGS=$KOPANO_REPOSITORY_FLAGS \
LANG=en_US.UTF-8 \
SERVICE_TO_START=server
LABEL maintainer=az@zok.xyz \
org.label-schema.name="Kopano Groupware Core container" \
org.label-schema.description="Container for running applications out of Kopano Groupware Core" \
org.label-schema.url="https://kopano.io" \
org.label-schema.vcs-url="https://github.com/zokradonh/kopano-docker" \
org.label-schema.version=$KOPANO_CORE_VERSION \
org.label-schema.schema-version="1.0"
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# install Kopano Core and refresh ca-certificates
# hadolint currently does not understand the extended buildkit syntax https://github.com/hadolint/hadolint/issues/347
# hadolint ignore=DL3015
RUN --mount=type=secret,id=repocred,target=/etc/apt/auth.conf.d/kopano.conf \
# apt key for this repo has already been installed in base
echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_CORE_REPOSITORY_URL} ./" > /etc/apt/sources.list.d/kopano.list; \
# save kopano version if supported kopano
if [ ! -f /kopano/buildversion ]; then \
echo "core-${KOPANO_CORE_VERSION}" > /kopano/buildversion; \
fi; \
# install apt key if supported kopano
if [ ${RELEASE_KEY_DOWNLOAD} -eq 1 ]; then \
curl -s -S -o - "${KOPANO_CORE_REPOSITORY_URL}/Release.key" | apt-key add -; \
fi; \
echo "deb [${KOPANO_REPOSITORY_FLAGS}] ${KOPANO_KAPPS_REPOSITORY_URL} ./" >> /etc/apt/sources.list.d/kopano.list; \
# install
apt-get update && \
set -x && \
apt-get install --no-install-recommends -y \
kopano-server-packages \
apt-get -o Debug::pkgProblemResolver=true install --no-install-recommends -y \
kopano-server-packages kopano-spamd \
${ADDITIONAL_KOPANO_PACKAGES} \
php7.0-cli && \
&& \
coreversion=$(dpkg-query --showformat='${Version}' --show kopano-server) && \
if dpkg --compare-versions "$coreversion" "gt" "8.7.0"; then \
# For grapi also install recommended packages
apt-get -o Debug::pkgProblemResolver=true install -y \
kopano-grapi kopano-kapid; \
fi && \
if dpkg --compare-versions "$coreversion" "gt" "8.7.84"; then \
apt-get -o Debug::pkgProblemResolver=true install --no-install-recommends -y \
python3-grapi.backend.ldap; \
fi && \
set +x && \
rm -rf /var/cache/apt /var/lib/apt/lists && \
cp /usr/share/doc/kopano/example-config/*.cfg /etc/kopano/ && \
cp /usr/share/doc/kopano/example-config/*.cfg.gz /etc/kopano/ && \
gzip -d -f /etc/kopano/*.gz
touch /etc/kopano/admin.cfg && \
# with 9.0 config files are once again in /etc/kopano
(cp /usr/share/doc/kopano/example-config/*.cfg /etc/kopano/ || true) && \
(cp /usr/share/doc/kopano/example-config/*.cfg.gz /etc/kopano/ || true) && \
(gzip -d -f /etc/kopano/*.gz || true)
ENV KOPANO_LOCALE="de_DE.UTF-8"
ENV KOPANO_USERSCRIPT_LOCALE="de_DE.UTF-8"
ENV LANG=en_US.UTF-8
COPY defaultconfigs/ start-service.sh healthcheck.sh /kopano/
COPY bin/ /usr/local/bin/
COPY goss/ /kopano/goss
ENV SERVICE_TO_START=server
COPY kcconf.py defaultconfigs/ start-service.sh /kopano/
WORKDIR /kopano/path
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD [ "/kopano/start-service.sh" ]
HEALTHCHECK --interval=1m --timeout=10s \
CMD /kopano/healthcheck.sh
ARG VCS_REF
LABEL org.label-schema.vcs-ref=$VCS_REF

6
core/Dockerfile.dagent Normal file
View File

@ -0,0 +1,6 @@
ARG docker_repo=zokradonh
FROM ${docker_repo}/kopano_core
ENV \
EXE=/usr/sbin/kopano-dagent \
SERVICE_TO_START=dagent

View File

@ -1,24 +1,50 @@
E-Mail attachment directory is by default in `/kopano/data/attachments/` so bind `/kopano/data` as volume.
# Kopano Core image
You can reconfigure by setting environment variable `KCCONF_SERVER_ATTACHMENT_PATH`.
[![](https://images.microbadger.com/badges/image/zokradonh/kopano_core.svg)](https://microbadger.com/images/zokradonh/kopano_core "Microbadger size/labels") [![](https://images.microbadger.com/badges/version/zokradonh/kopano_core.svg)](https://microbadger.com/images/zokradonh/kopano_core "Microbadger version")
You can change all server.cfg settings you like prefixed with `KCCONF_SERVER_`
So specify `KCCONF_SERVER_MYSQL_HOST` for `mysql_host` setting in `server.cfg`.
Or specify `KCCONF_LDAP_LDAP_SEARCH_BASE` to set `ldap_search_base` in `ldap.cfg`.
Image for components out of the "Kopano Core" repository. Is used to start containers for e.g. `kopano-server` and `kopano-gateway`.
You may override default settings with `KCCONF_*` options or comment specific options in/out with `KCCOMMENT_filenameWithoutExtension_anystring=searchline`
E-Mail attachment directory is by default in `/kopano/data/attachments/` it is recommended to bind `/kopano/data` as volume.
Attachment location can be configured by setting the environment variable `KCCONF_SERVER_ATTACHMENT_PATH`.
All configuration can be adjusted dynamically through environment variables.
```bash
KCCONF_SERVER_MYSQL_HOST=127.0.0.1
^ ^ ^ ^
| | | |
General prefix |
| | |
Name of the relevant configuration file (server.cfg in this case)
| |
Name of the configuration option in the configuration file
|
Value of the configuration option
```
Examples:
- specify `KCCONF_SERVER_MYSQL_HOST` for `mysql_host` setting in `server.cfg`
- specify `KCCONF_LDAP_LDAP_SEARCH_BASE` to set `ldap_search_base` in `ldap.cfg`
Additionally it is possible to comment specific options in/out with `KCCOMMENT_filenameWithoutExtension_anystring=searchline`
e.g. `KCCOMMENT_LDAP_1=!include /usr/share/kopano/ldap.openldap.cfg`
For coredumps on crashes kopano-server requires the fs.suid_dumpable sysctl to contain the value 2, not 0.
For core dumps on crashes kopano-server requires the `fs.suid_dumpable sysctl` to contain the value 2, not 0.
The docker image kopano_ssl will create certificates for all containers. Those certificates are selfsigned and only for internal Kopano component communication.
kopano_webapp port 80 is meant to be published through a https reverse proxy. MAPI connection for Outlook is also handled over port 80.
Maybe you need to execute `kopano-cli --list-users` once after initial install in the kopano_server container.
See: https://documentation.kopano.io/kopanocore_administrator_manual/configure_kc_components.html#testing-ldap-configuration
It is recommended to sync the user list before the first login of a user. With the bundled ´docker-compose.yml´ the ´kopano_scheduler´ container will take care of this. Alternatively `kopano-admin --sync` could be run once after initial install in the kopano_server container.
Example:
`docker-compose exec kserver kopano-cli --list-users` (This may last very long without any console output.)
`docker-compose exec kopano_server kopano-admin -l`
Depending on the overall performance of the system and the amount of user the first execution of this command will take a moment before it produces any output. This is since this command kicks off the mailbox creation for the users.
See https://documentation.kopano.io/kopanocore_administrator_manual/configure_kc_components.html#testing-ldap-configuration for more information.
## Ports & Proxying
- kopano-server is configured to listen on the ports 236 (plain) and 237 (https)
- kopano-ical is configured to listen on the port 8080, but the web container is also configured to proxy access to http(s)://FQDN/caldav to kopano-ical
- kopano-gateway is configured to listen on IMAP traffic on port 143. Pop3 is deactivated by default but would be listening on port 110. Pop3s and IMAPs are currently not configured. (see https://github.com/zokradonh/kopano-docker/issues/16 for more details).

3
core/bin/kopano-autorespond Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
/usr/sbin/kopano-autorespond -C "$KOPANO_CONFIG_PATH/autorespond.cfg" "$@"

8
core/bin/kopano-cli Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
if [ ! -f /usr/sbin/kopano-cli ]; then
echo "kopano-cli has been removed from Kopano Groupware Core 10 and upwards. Please use kopano-admin instead."
exit 1
fi
/usr/sbin/kopano-cli --config "$KOPANO_CONFIG_PATH/admin.cfg" "$@"

83
core/bin/show-folders.py Executable file
View File

@ -0,0 +1,83 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
try:
import kopano
except ImportError:
import zarafa as kopano
from MAPI.Util import *
import binascii
def opt_args():
parser = kopano.parser('skpcf')
parser.add_option("--user", dest="user", action="store", help="Username")
parser.add_option("--public", dest="public", action="store_true", help="Show public folders")
parser.add_option("--delete", dest="delete", action="store", help="Delete folder based on entryid")
parser.add_option("--extend", dest="extend", action="store_true", help="show more values")
return parser.parse_args()
def printprop(typename, item):
if typename == 'PT_MV_BINARY':
listItem = []
for i in item:
listItem.append(str(binascii.hexlify(i)).upper())
return listItem
if typename == 'PT_OBJECT':
return None
if typename == 'PT_BINARY':
return str(binascii.hexlify(item)).upper()
if typename == 'PT_UNICODE':
try:
return item.encode('utf-8').decode()
except:
return item
else:
return item
def printmapiprops(folder):
props = []
for prop in folder.props():
if hex(prop.proptag) == "0x10130102L":
props.append([prop.id_, prop.idname, hex(prop.proptag), prop.typename, printprop(prop.typename, prop.value), prop.value])
else:
props.append([prop.id_, prop.idname, hex(prop.proptag), prop.typename, printprop(prop.typename, prop.value)])
return props
def main():
options, args = opt_args()
if not options.user and not options.public:
print('Please use\n' \
'%s --user <username> or\n' \
'%s --public' % (sys.argv[0], sys.argv[0]))
sys.exit(1)
if options.user:
user = kopano.server(options).user(options.user)
store = user.store
name = user.name
if options.public:
name = 'Public'
store = kopano.server(options).public_store
if not options.delete:
print('Store:', name.encode('utf-8').decode())
print('{:50} {:50} {:50}'.format('Folder name', 'Parent folder', 'Entryid'))
for folder in store.root.folders():
print('{:50} {:50} {:50}'.format(folder.name.encode('utf8').decode(), folder.parent.name.encode('utf8').decode(), folder.entryid))
if options.extend:
props = printmapiprops(folder)
f = open('%s-%s.prop' % (folder.name, folder.entryid), 'w')
for prop in props:
f.write('{0:5} {1:37} {2:8} {3:10} {4:1}\n'.format(prop[0], prop[1], prop[2], prop[3], prop[4]))
f.close()
else:
print('Not in yet')
if __name__ == "__main__":
main()

View File

@ -0,0 +1,17 @@
tests:
start-service script:
command: bash -c "shopt -s expand_aliases; alias exec='echo'; . /kopano/start-service.sh && env"
exit-code: 0
stdout:
contains:
- enable_experimental_endpoints=true
config:
env:
KCCONF_GRAPI_ENABLE_EXPERIMENTAL_ENDPOINTS: true
config:
env:
DEBUG: ${DEBUG}
GRAPI_BACKEND: ${GRAPI_BACKEND}
LANG: ${LANG}
SERVICE_TO_START: ${SERVICE_TO_START}
PATH: ${PATH}

View File

@ -0,0 +1,124 @@
tests:
start-service script:
command: bash -c "shopt -s expand_aliases; alias exec='echo'; . /kopano/start-service.sh"
exit-code: 0
stdout:
not-contains:
- "Reading package lists..."
start-service script (installing new package):
command: bash -c "shopt -s expand_aliases; alias exec='echo'; . /kopano/start-service.sh"
exit-code: 0
stdout:
contains:
- "Setting up nano"
config:
env:
ADDITIONAL_KOPANO_PACKAGES: "nano"
start-service script (installing existing package):
command: bash -c "shopt -s expand_aliases; alias exec='echo'; . /kopano/start-service.sh"
exit-code: 0
stdout:
contains:
- "INFO: kopano-server is already installed"
config:
env:
ADDITIONAL_KOPANO_PACKAGES: "kopano-server"
generate configuration for kopano-server:
command: bash -c "shopt -s expand_aliases; alias exec='echo'; . /kopano/start-service.sh" && cat /tmp/kopano/server.cfg
exit-code: 0
stdout:
contains:
- server_listen_tls = 0.0.0.0:237
- server_ssl_key_file = /kopano/ssl/kopano_server.pem
not-contains:
- #server_listen_tls = *:237
generate ldap configuration openLDAP (default):
command: bash -c "shopt -s expand_aliases; alias exec='echo'; . /kopano/start-service.sh" && cat /tmp/kopano/ldap.cfg
exit-code: 0
stdout:
contains:
- "!include /usr/share/kopano/ldap.openldap.cfg"
- "#!include /usr/share/kopano/ldap.active-directory.cfg"
not-contains:
- "#!include /usr/share/kopano/ldap.openldap.cfg"
generate ldap configuration for ADS:
command: bash -c "shopt -s expand_aliases; alias exec='echo'; . /kopano/start-service.sh" && cat /tmp/kopano/ldap.cfg
exit-code: 0
stdout:
contains:
- "#!include /usr/share/kopano/ldap.openldap.cfg"
- "!include /usr/share/kopano/ldap.active-directory.cfg"
not-contains:
- "#!include /usr/share/kopano/ldap.active-directory.cfg"
config:
env:
KCCOMMENT_LDAP_1: "!include /usr/share/kopano/ldap.openldap.cfg"
KCUNCOMMENT_LDAP_1: "!include /usr/share/kopano/ldap.active-directory.cfg"
start-service script default locale:
command: bash -c "shopt -s expand_aliases; alias exec='echo'; . /kopano/start-service.sh && locale -a"
exit-code: 0
stdout:
contains:
- C
- C.UTF-8
- de_DE.utf8
- en_US.utf8
- nl_NL.utf8
- POSIX
start-service script no dockerize:
command: bash -c "shopt -s expand_aliases; alias exec='echo'; . /kopano/start-service.sh"
exit-code: 0
stdout:
not-contains:
- dockerize
config:
env:
DISABLE_CHECKS: "true"
start-service script no config updates:
command: bash -c "shopt -s expand_aliases; alias exec='echo'; . /kopano/start-service.sh"; grep log_level /etc/kopano/server.cfg
exit-code: 0
stdout:
not-contains:
- log_level = 0x0000006
config:
env:
KCCONF_SERVER_LOG_LEVEL: "0x0000006"
DISABLE_CONFIG_CHANGES: "true"
# TODO this needs an extension to dcommander to pass tests/test-container.yml as an additional file
#start-service script write protected server.cfg:
# command: chattr +i /etc/kopano/server.cfg; bash -c "shopt -s expand_aliases; alias exec='echo'; . /kopano/start-service.sh"; chattr +i /etc/kopano/server.cfg
# exit-code: 0
# stderr:
# contains:
# - Can't open
# - ignoring file changes
config:
env:
DEBUG: ${DEBUG}
GRAPI_BACKEND: ${GRAPI_BACKEND}
KCCOMMENT_LDAP_1: ${KCCOMMENT_LDAP_1}
KCCONF_LDAP_LDAP_BIND_PASSWD: ${KCCONF_LDAP_LDAP_BIND_PASSWD}
KCCONF_LDAP_LDAP_BIND_USER: ${KCCONF_LDAP_LDAP_BIND_USER}
KCCONF_LDAP_LDAP_SEARCH_BASE: ${KCCONF_LDAP_LDAP_SEARCH_BASE}
KCCONF_LDAP_LDAP_URI: ${KCCONF_LDAP_LDAP_URI}
KCCONF_SERVER_COREDUMP_ENABLED: ${KCCONF_SERVER_COREDUMP_ENABLED}
KCCONF_SERVER_ENABLE_SSO: ${KCCONF_SERVER_ENABLE_SSO}
KCCONF_SERVER_HIDE_EVERYONE: ${KCCONF_SERVER_HIDE_EVERYONE}
KCCONF_SERVER_KCOIDC_INSECURE_SKIP_VERIFY: ${KCCONF_SERVER_KCOIDC_INSECURE_SKIP_VERIFY}
KCCONF_SERVER_KCOIDC_ISSUER_IDENTIFIER: ${KCCONF_SERVER_KCOIDC_ISSUER_IDENTIFIER}
KCCONF_SERVER_LOG_LEVEL: ${KCCONF_SERVER_LOG_LEVEL0
KCCONF_SERVER_MYSQL_DATABASE: ${KCCONF_SERVER_MYSQL_DATABASE}
KCCONF_SERVER_MYSQL_HOST: ${KCCONF_SERVER_MYSQL_HOST}
KCCONF_SERVER_MYSQL_PASSWORD: ${KCCONF_SERVER_MYSQL_PASSWORD}
KCCONF_SERVER_MYSQL_PORT: ${KCCONF_SERVER_MYSQL_PORT}
KCCONF_SERVER_MYSQL_USER: ${KCCONF_SERVER_MYSQL_USER}
KCCONF_SERVER_PROXY_HEADER: ${KCCONF_SERVER_PROXY_HEADER}
KCCONF_SERVER_SERVER_NAME: ${KCCONF_SERVER_SERVER_NAME}
KCCONF_SERVER_SERVER_SSL_CA_FILE: ${KCCONF_SERVER_SERVER_SSL_CA_FILE}
KCCONF_SERVER_SERVER_SSL_KEY_FILE: ${KCCONF_SERVER_SERVER_SSL_KEY_FILE}
KCCONF_SERVER_SSLKEYS_PATH: ${KCCONF_SERVER_SSLKEYS_PATH}
KCCONF_SERVER_SYSTEM_EMAIL_ADDRESS: ${KCCONF_SERVER_SYSTEM_EMAIL_ADDRESS}
KCUNCOMMENT_LDAP_1: ${KCUNCOMMENT_LDAP_1}
LANG: ${LANG}
SERVICE_TO_START: ${SERVICE_TO_START}
PATH: ${PATH}

View File

@ -0,0 +1,12 @@
tests:
test sending mail:
command: apt update && apt install -y swaks netbase && dockerize -wait tcp://"$KCCONF_SPOOLER_SMTP_SERVER":25 -timeout 1080s && swaks --to user1@kopano.demo --server $KCCONF_SPOOLER_SMTP_SERVER
exit-code: 0
stdout:
contains:
- "250 2.0.0 Ok: queued as"
config:
env:
PATH: ${PATH}
KCCONF_SPOOLER_SMTP_SERVER: ${KCCONF_SPOOLER_SMTP_SERVER}

11
core/defaultconfigs/dagent.py Normal file → Executable file
View File

@ -1,15 +1,14 @@
import os
#!/usr/bin/env python3
import kcconf
# Component specific configurations
kcconf.configkopano({
r"/etc/kopano/dagent.cfg":
r"/tmp/kopano/dagent.cfg":
{
'log_file': "-",
'log_level': "4",
'tmp_path': "/tmp/dagent/"
# Certain configuration can be pre-defined at startup:
#'lmtp_listen': "0.0.0.0:2003",
}
})
# Override configs from environment variables
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/etc/kopano/"))
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/tmp/kopano/"))

14
core/defaultconfigs/gateway.py Normal file → Executable file
View File

@ -1,18 +1,14 @@
import os
#!/usr/bin/env python3
import kcconf
# Component specific configurations
kcconf.configkopano({
r"/etc/kopano/gateway.cfg":
r"/tmp/kopano/gateway.cfg":
{
'log_file': "-",
'log_level': "4",
'tmp_path': "/tmp/gateway/",
'pop3_listen': "",
'imap_listen': "",
'imaps_listen': "*:993"
# Certain configuration can be pre-defined at startup:
#'imap_listen': "0.0.0.0:143",
}
})
# Override configs from environment variables
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/etc/kopano/"))
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/tmp/kopano/"))

5
core/defaultconfigs/grapi.py Executable file
View File

@ -0,0 +1,5 @@
#!/usr/bin/env python3
import kcconf
# Override configs from environment variables
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/tmp/kopano/"))

10
core/defaultconfigs/ical.py Normal file → Executable file
View File

@ -1,14 +1,14 @@
import os
#!/usr/bin/env python3
import kcconf
# Component specific configurations
kcconf.configkopano({
r"/etc/kopano/ical.cfg":
r"/tmp/kopano/ical.cfg":
{
'log_file': "-",
'log_level': "4"
# Certain configuration can be pre-defined at startup:
#'ical_listen': "0.0.0.0:8080",
}
})
# Override configs from environment variables
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/etc/kopano/"))
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/tmp/kopano/"))

14
core/defaultconfigs/kapi.py Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env python3
import kcconf
# Component specific configurations
kcconf.configkopano({
r"/tmp/kopano/kapid.cfg":
{
# Certain configuration can be pre-defined at startup:
#'listen': "0.0.0.0:8039",
}
})
# Override configs from environment variables
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/tmp/kopano/"))

10
core/defaultconfigs/monitor.py Normal file → Executable file
View File

@ -1,14 +1,14 @@
import os
#!/usr/bin/env python3
import kcconf
# Component specific configurations
kcconf.configkopano({
r"/etc/kopano/monitor.cfg":
r"/tmp/kopano/monitor.cfg":
{
'log_file': "-",
'log_level': "4"
# Certain configuration can be pre-defined at startup:
#'log_level': "4"
}
})
# Override configs from environment variables
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/etc/kopano/"))
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/tmp/kopano/"))

10
core/defaultconfigs/search.py Normal file → Executable file
View File

@ -1,14 +1,14 @@
import os
#!/usr/bin/env python3
import kcconf
# Component specific configurations
kcconf.configkopano({
r"/etc/kopano/search.cfg":
r"/tmp/kopano/search.cfg":
{
'log_file': "-",
'log_level': "4"
# Certain configuration can be pre-defined at startup:
#'index_path': "/kopano/data/search/"
}
})
# Override configs from environment variables
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/etc/kopano/"))
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/tmp/kopano/"))

14
core/defaultconfigs/server.py Normal file → Executable file
View File

@ -1,18 +1,14 @@
import os
#!/usr/bin/env python3
import kcconf
# Component specific configurations
kcconf.configkopano({
r"/etc/kopano/server.cfg":
r"/tmp/kopano/server.cfg":
{
'log_file': "-",
'log_level': "3",
'attachment_path': "/kopano/data/attachments/",
'user_plugin': "ldap",
'server_listen': "",
'server_listen_tls': "*:237"
# Certain configuration can be pre-defined at startup:
#'server_listen': "0.0.0.0:236",
}
})
# Override configs from environment variables
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/etc/kopano/"))
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/tmp/kopano/"))

15
core/defaultconfigs/spamd.py Executable file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env python3
import os
import kcconf
# Component specific configurations
kcconf.configkopano({
r"/tmp/kopano/spamd.cfg":
{
# Certain configuration can be pre-defined at startup:
#'log_level': "3"
}
})
# Override configs from environment variables
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/tmp/kopano/"))

11
core/defaultconfigs/spooler.py Normal file → Executable file
View File

@ -1,15 +1,14 @@
import os
#!/usr/bin/env python3
import kcconf
# Component specific configurations
kcconf.configkopano({
r"/etc/kopano/spooler.cfg":
r"/tmp/kopano/spooler.cfg":
{
'log_file': "-",
'log_level': "4",
'tmp_path': "/tmp/spooler/"
# Certain configuration can be pre-defined at startup:
#'log_level': "4",
}
})
# Override configs from environment variables
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/etc/kopano/"))
kcconf.configkopano(kcconf.parseenvironmentvariables(r"/tmp/kopano/"))

View File

@ -0,0 +1,6 @@
port:
tcp:2003:
listening: true
process:
kopano-dagent:
running: true

View File

@ -0,0 +1,6 @@
port:
tcp:2003:
listening: true
process:
kopano-dagent:
running: true

View File

@ -0,0 +1,3 @@
process:
kopano-gateway:
running: true

View File

@ -0,0 +1,3 @@
process:
kopano-gateway:
running: true

20
core/goss/grapi/goss.yaml Normal file
View File

@ -0,0 +1,20 @@
file:
/var/lib/kopano-grapi:
exists: true
mode: "0755"
size: 4096
owner: kapi
group: kopano
filetype: directory
/var/run/kopano/grapi:
exists: true
mode: "0755"
owner: kapi
group: kopano
filetype: directory
mount:
/var/lib/kopano-grapi:
exists: true
opts:
- rw
- relatime

View File

@ -0,0 +1,7 @@
file:
/var/run/kopano/grapi:
exists: true
mode: "0755"
owner: kapi
group: kopano
filetype: directory

3
core/goss/ical/goss.yaml Normal file
View File

@ -0,0 +1,3 @@
process:
kopano-ical:
running: true

View File

@ -0,0 +1,3 @@
process:
kopano-ical:
running: true

3
core/goss/kapi/goss.yaml Normal file
View File

@ -0,0 +1,3 @@
process:
kapid:
running: true

View File

@ -0,0 +1,3 @@
process:
kapid:
running: true

View File

@ -0,0 +1,3 @@
process:
kopano-monitor:
running: true

View File

@ -0,0 +1,3 @@
process:
kopano-monitor:
running: true

View File

@ -0,0 +1,9 @@
file:
/var/run/kopano/search.sock:
exists: true
mode: "0700"
size: 0
owner: kopano
group: kopano
filetype: socket
contains: []

View File

@ -0,0 +1,9 @@
file:
/var/run/kopano/search.sock:
exists: true
mode: "0700"
size: 0
owner: kopano
group: kopano
filetype: socket
contains: []

View File

@ -0,0 +1,33 @@
file:
# TODO how to make path dynamic?
/kopano/data/attachments/:
exists: true
mode: "0755"
owner: kopano
group: kopano
filetype: directory
/run/kopano/prio.sock:
exists: true
mode: "0660"
owner: kopano
group: kopano
filetype: socket
/run/kopano/server.sock:
exists: true
mode: "0666"
owner: kopano
group: kopano
filetype: socket
process:
kopano-server:
running: true
http:
# TODO what if plain http is deactivated? (or uses a different port?)
http://localhost:236:
status: 405
timeout: 5000
# TODO what if ssl is deactivated? (or uses a different port?)
https://localhost:237:
status: 405
allow-insecure: true
timeout: 5000

View File

@ -0,0 +1,4 @@
http:
http://localhost:236:
status: 405
timeout: 5000

View File

@ -0,0 +1,3 @@
process:
kopano-spamd:
running: true

View File

@ -0,0 +1,3 @@
process:
kopano-spamd:
running: true

View File

@ -0,0 +1,3 @@
process:
kopano-spooler:
running: true

View File

@ -0,0 +1,3 @@
process:
kopano-spooler:
running: true

14
core/healthcheck.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
set -e
case "$SERVICE_TO_START" in
server|dagent|gateway|ical|grapi|kapi|monitor|search|spooler)
goss -g /kopano/goss/"$SERVICE_TO_START"/goss.yaml validate --format json_oneline
;;
*)
echo "This service still needs a proper check"
;;
esac
exit 0

View File

@ -1,54 +1,294 @@
#!/bin/bash
set -eu # unset variables are errors & non-zero return values exit the whole script
[ "$DEBUG" ] && set -x
if [ ! -e /kopano/$SERVICE_TO_START.py ]
then
ADDITIONAL_KOPANO_PACKAGES=${ADDITIONAL_KOPANO_PACKAGES:-""}
AUTOCONFIGURE=${AUTOCONFIGURE:-true} # when set to false will disable all automatic configuration actions
KCCONF_SERVER_MYSQL_SOCKET=${KCCONF_SERVER_MYSQL_SOCKET:-""}
DISABLE_CHECKS=${DISABLE_CHECKS:-false}
DISABLE_CONFIG_CHANGES=${DISABLE_CONFIG_CHANGES:-false}
KCCONF_DAGENT_SERVER_SOCKET=${KCCONF_DAGENT_SERVER_SOCKET:-"file:///var/run/kopano/server.sock"}
KCCONF_GATEWAY_SERVER_SOCKET=${KCCONF_GATEWAY_SERVER_SOCKET:-"tcp://kopano_server:236"}
KCCONF_ICAL_SERVER_SOCKET=${KCCONF_ICAL_SERVER_SOCKET:-"tcp://kopano_server:236"}
KCCONF_MONITOR_SERVER_SOCKET=${KCCONF_MONITOR_SERVER_SOCKET:-"file:///var/run/kopano/server.sock"}
KCCONF_SEARCH_SERVER_SOCKET=${KCCONF_SEARCH_SERVER_SOCKET:-"file:///var/run/kopano/server.sock"}
KCCONF_SPOOLER_SERVER_SOCKET=${KCCONF_SPOOLER_SERVER_SOCKET:-"file:///var/run/kopano/server.sock"}
KOPANO_CON=${KOPANO_CON:-"file:///var/run/kopano/server.sock"}
KCCONF_SPOOLER_SMTP_SERVER=${KCCONF_SPOOLER_SMTP_SERVER:-mail}
KCCONF_SPOOLER_SMTP_PORT=${KCCONF_SPOOLER_SMTP_PORT:-25}
KOPANO_CONFIG_PATH=${KOPANO_CONFIG_PATH:-/tmp/kopano}
if [ "${AUTOCONFIGURE}" == true ]; then
# copy configuration files to /tmp/kopano (default value of $KOPANO_CONFIG_PATH) to prevent modification of mounted config files
mkdir -p /tmp/kopano
cp /etc/kopano/*.cfg /tmp/kopano
if [ ! -e /kopano/"$SERVICE_TO_START".py ]; then
echo "Invalid service specified: $SERVICE_TO_START" | ts
exit 1
fi
mkdir -p /kopano/data/attachments /tmp/$SERVICE_TO_START /var/run/kopano
# Hint: this is not compatible with a read-only container.
# The general recommendation is to already build a container that has all required packages installed.
ADDITIONAL_KOPANO_PACKAGES=$(echo "$ADDITIONAL_KOPANO_PACKAGES" | tr -d '"')
if mkdir -p "/var/lib/apt/lists/" 2&> /dev/null; then
[ -n "${ADDITIONAL_KOPANO_PACKAGES// }" ] && apt update
[ -n "${ADDITIONAL_KOPANO_PACKAGES// }" ] && for installpkg in $ADDITIONAL_KOPANO_PACKAGES; do
# shellcheck disable=SC2016 disable=SC2086
if [ "$(dpkg-query -W -f='${Status}' $installpkg 2>/dev/null | grep -c 'ok installed')" -eq 0 ]; then
DEBIAN_FRONTEND=noninteractive apt --assume-yes --no-upgrade install "$installpkg"
else
echo "INFO: $installpkg is already installed"
fi
done
else
echo "Notice: Container is run read-only, skipping package installation."
echo "If you want to have additional packages installed in the container either:"
echo "- build your own image with the packages already included"
echo "- switch the container to 'read_only: false'"
fi
mkdir -p /tmp/"$SERVICE_TO_START" /var/run/kopano
# TODO is this still required now that we won't modify configuration mounted to /etc/kopano?
if [ "${DISABLE_CONFIG_CHANGES}" == false ]; then
echo "Configure core service '$SERVICE_TO_START'" | ts
/usr/bin/python3 /kopano/$SERVICE_TO_START.py
/kopano/"$SERVICE_TO_START".py
fi
echo "Set ownership" | ts
chown -R kopano:kopano /run /tmp
chown kopano:kopano /kopano/data/ /kopano/data/attachments
# ensure removed pid-file on unclean shutdowns and mounted volumes
rm -f /var/run/kopano/"$SERVICE_TO_START".pid
fi
echo "Clean old pid files and sockets" | ts
rm -f /var/run/kopano/*
coreversion=$(dpkg-query --showformat='${Version}' --show kopano-server)
echo "Using Kopano Groupware Core: $coreversion"
# allow helper commands given by "docker-compose run"
if [ $# -gt 0 ]
then
if [ $# -gt 0 ]; then
exec "$@"
exit
fi
# services need to be aware of the machine-id
if [ "${AUTOCONFIGURE}" == true ] && [ "$DISABLE_CHECKS" == false ]; then
dockerize \
-wait file:///etc/machine-id \
-wait file:///var/lib/dbus/machine-id
fi
# put specified socket into KOPANO_CON variable to ease checks further down
case "$SERVICE_TO_START" in
dagent)
EXE="${EXE:-$(command -v kopano-dagent)}"
KOPANO_CON="$KCCONF_DAGENT_SERVER_SOCKET"
;;
gateway)
EXE="${EXE:-$(command -v kopano-gateway)}"
KOPANO_CON="$KCCONF_GATEWAY_SERVER_SOCKET"
;;
grapi)
EXE="${EXE:-$(command -v kopano-grapi)}"
;;
ical)
EXE="${EXE:-$(command -v kopano-ical)}"
KOPANO_CON="$KCCONF_ICAL_SERVER_SOCKET"
;;
kapi)
EXE="${EXE:-$(command -v kopano-kapid)}"
;;
monitor)
EXE="${EXE:-$(command -v kopano-monitor)}"
KOPANO_CON="$KCCONF_MONITOR_SERVER_SOCKET"
;;
search)
EXE="${EXE:-$(command -v kopano-search)}"
KOPANO_CON="$KCCONF_SEARCH_SERVER_SOCKET"
;;
server)
EXE="${EXE:-$(command -v kopano-server)}"
;;
spamd)
EXE="${EXE:-$(command -v kopano-spamd)}"
;;
spooler)
EXE="${EXE:-$(command -v kopano-spooler)}"
KOPANO_CON="$KCCONF_SPOOLER_SERVER_SOCKET"
;;
esac
if [[ "$KOPANO_CON" =~ ^http.* ]]; then
KOPANO_CON=$(sed 's/.*\/\//tcp:\/\//' <<< "$KOPANO_CON")
fi
# start regular service
case "$SERVICE_TO_START" in
server)
exec /usr/sbin/kopano-server -F
if [ "${AUTOCONFIGURE}" == true ]; then
echo "Set ownership" | ts
mkdir -p /kopano/data/attachments
chown kopano:kopano /kopano/data/ /kopano/data/attachments
if [[ "$DISABLE_CHECKS" == false ]]; then
# determine db connection mode (unix vs. network socket)
if [ -n "$KCCONF_SERVER_MYSQL_SOCKET" ]; then
DB_CON="file://$KCCONF_SERVER_MYSQL_SOCKET"
else
DB_CON="tcp://$KCCONF_SERVER_MYSQL_HOST:$KCCONF_SERVER_MYSQL_PORT"
fi
dockerize \
-wait file://"$KCCONF_SERVER_SERVER_SSL_CA_FILE" \
-wait file://"$KCCONF_SERVER_SERVER_SSL_KEY_FILE" \
-wait "$DB_CON" \
-timeout 360s
fi
# pre populate database
if dpkg --compare-versions "$coreversion" "gt" "8.7.84"; then
kopano-dbadm -c "$KOPANO_CONFIG_PATH/server.cfg" populate
fi
fi
# cleaning up env variables
unset "${!KCCONF_@}"
exec "$EXE" -F
;;
dagent)
exec /usr/sbin/kopano-dagent -l
if [ "${AUTOCONFIGURE}" == true ] && [ "$DISABLE_CHECKS" == false ]; then
dockerize \
-wait "$KOPANO_CON" \
-timeout 360s
fi
# cleaning up env variables
unset "${!KCCONF_@}"
exec "$EXE" -l
;;
gateway)
exec /usr/sbin/kopano-gateway -F
if [ "${AUTOCONFIGURE}" == true ] && [ "$DISABLE_CHECKS" == false ]; then
dockerize \
-wait "$KOPANO_CON" \
-timeout 360s
fi
# cleaning up env variables
unset "${!KCCONF_@}"
exec "$EXE" -F
;;
ical)
exec /usr/sbin/kopano-ical -F
if [ "${AUTOCONFIGURE}" == true ] && [ "$DISABLE_CHECKS" == false ]; then
dockerize \
-wait "$KOPANO_CON" \
-timeout 360s
fi
# cleaning up env variables
unset "${!KCCONF_@}"
exec "$EXE" -F
;;
grapi)
if [ "${AUTOCONFIGURE}" == true ]; then
LC_CTYPE=en_US.UTF-8
export socket_path=/var/run/kopano/grapi
export pid_file="$socket_path/grapi.pid"
mkdir -p "$socket_path" /var/lib/kopano-grapi
chown -R kapi:kopano "$socket_path"
chown kapi:kopano /var/lib/kopano-grapi
# TODO there could be a case where multiple backends are desired
case $GRAPI_BACKEND in
ldap)
[ -n "$KCCONF_GRAPI_LDAP_URI" ] && export LDAP_URI="${KCCONF_GRAPI_LDAP_URI}"
[ -n "$KCCONF_GRAPI_LDAP_BASEDN" ] && export LDAP_BASEDN="${KCCONF_GRAPI_LDAP_BASEDN}"
[ -n "$KCCONF_GRAPI_LDAP_BINDDN" ] && export LDAP_BINDDN="${KCCONF_GRAPI_LDAP_BINDDN}"
if [ -n "$KCCONF_GRAPI_LDAP_BINDPW_FILE" ]; then
bindpw="$(cat "${KCCONF_GRAPI_LDAP_BINDPW_FILE}")"
export LDAP_BINDPW="${bindpw}"
fi
;;
esac
sed s/\ *=\ */=/g "$KOPANO_CONFIG_PATH/grapi.cfg" > /tmp/grapi-env
# shellcheck disable=SC2046
export $(grep -v '^#' /tmp/grapi-env | xargs -d '\n')
fi
# cleaning up env variables
unset "${!KCCONF_@}"
# the backend option is only available in more recent versions of grapi
grapiversion=$(dpkg-query --showformat='${Version}' --show kopano-grapi)
echo "Using Kopano Grapi: $grapiversion"
if dpkg --compare-versions "$grapiversion" "gt" "10.0.0"; then
exec "$EXE" serve --backend="$GRAPI_BACKEND"
else
exec "$EXE" serve
fi
;;
kapi)
if [ "${AUTOCONFIGURE}" == true ]; then
mkdir -p /kopano/data/kapi-kvs
if [ "$KCCONF_KAPID_INSECURE" = "yes" ]; then
dockerize \
-skip-tls-verify \
-wait "$KCCONF_KAPID_OIDC_ISSUER_IDENTIFIER"/.well-known/openid-configuration \
-timeout 360s
else
dockerize \
-wait "$KCCONF_KAPID_OIDC_ISSUER_IDENTIFIER"/.well-known/openid-configuration \
-timeout 360s
fi
LC_CTYPE=en_US.UTF-8
sed s/\ *=\ */=/g "$KOPANO_CONFIG_PATH/kapid.cfg" > /tmp/kapid-env
# shellcheck disable=SC2046
export $(grep -v '^#' /tmp/kapid-env | xargs -d '\n')
"$EXE" setup
fi
# cleaning up env variables
unset "${!KCCONF_@}"
kapiversion=$(dpkg-query --showformat='${Version}' --show kopano-kapid)
echo "Using Kopano Kapi: $kapiversion"
exec "$EXE" serve --log-timestamp=false
;;
monitor)
exec /usr/sbin/kopano-monitor -F
if [ "${AUTOCONFIGURE}" == true ] && [ "$DISABLE_CHECKS" == false ]; then
dockerize \
-wait "$KOPANO_CON" \
-timeout 360s
fi
# cleaning up env variables
unset "${!KCCONF_@}"
exec "$EXE" -F
;;
search)
exec /usr/bin/python /usr/sbin/kopano-search -F
if [ "${AUTOCONFIGURE}" == true ] && [ "$DISABLE_CHECKS" == false ]; then
dockerize \
-wait "$KOPANO_CON" \
-timeout 360s
# give kopano-server a moment to settler before starting search
sleep 5
fi
# cleaning up env variables
unset "${!KCCONF_@}"
# with commit 702bb3fccb3 search does not need -F any longer
searchversion=$(dpkg-query --showformat='${Version}' --show kopano-search)
if dpkg --compare-versions "$searchversion" "gt" "8.7.82.165"; then
exec "$EXE" --config "$KOPANO_CONFIG_PATH/search.cfg"
else
exec /usr/bin/python3 "$EXE" --config "$KOPANO_CONFIG_PATH/search.cfg" -F
fi
;;
spamd)
if [ "${AUTOCONFIGURE}" == true ] && [ "$DISABLE_CHECKS" == false ]; then
dockerize \
-wait "$KOPANO_CON" \
-timeout 360s
fi
# cleaning up env variables
unset "${!KCCONF_@}"
exec "$EXE" --config "$KOPANO_CONFIG_PATH/spamd.cfg" -F
;;
spooler)
exec /usr/sbin/kopano-spooler -F
if [ "${AUTOCONFIGURE}" == true ] && [ "$DISABLE_CHECKS" == false ]; then
dockerize \
-wait "$KOPANO_CON" \
-wait tcp://"$KCCONF_SPOOLER_SMTP_SERVER":"$KCCONF_SPOOLER_SMTP_PORT" \
-timeout 1080s
fi
# cleaning up env variables
unset "${!KCCONF_@}"
exec "$EXE" -F
;;
*)
echo "Failed to start: Unknown service name: '$SERVICE_TO_START'" | ts

5
database/README.md Normal file
View File

@ -0,0 +1,5 @@
# Database helpers
## create-multiple-databases.sh
Script to create additional databases during the initial container startup. Based on https://github.com/mrts/docker-postgresql-multiple-databases.

View File

@ -0,0 +1,20 @@
#!/bin/bash
set -eu
mysql=${mysql:?}
function create_user_and_database() {
local database=$1
echo " Creating database '$database'"
echo "CREATE DATABASE IF NOT EXISTS ${database};" | "${mysql[@]}"
echo "GRANT ALL PRIVILEGES ON ${database}.* TO '${MYSQL_USER}';" | "${mysql[@]}"
}
if [ -n "$MYSQL_ADDITIONAL_DATABASES" ]; then
echo "Multiple database creation requested: $MYSQL_ADDITIONAL_DATABASES"
for db in $(echo "$MYSQL_ADDITIONAL_DATABASES" | tr ',' ' '); do
create_user_and_database "$db"
done
echo "Additional databases created"
fi

30
docker-compose.db.yml Normal file
View File

@ -0,0 +1,30 @@
version: "3.5"
services:
db:
image: mariadb:10.3.10-bionic
restart: unless-stopped
container_name: ${COMPOSE_PROJECT_NAME}_db
volumes:
- mysql:/var/lib/mysql
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_USER=${MYSQL_USER}
env_file:
- db.env
healthcheck:
test: ["CMD-SHELL", 'mysql --database=$$MYSQL_DATABASE --password=$$MYSQL_ROOT_PASSWORD --execute="SELECT count(table_name) > 0 FROM information_schema.tables;" --skip-column-names -B']
interval: 30s
timeout: 10s
retries: 4
networks:
- kopano-net
kopano_server:
depends_on:
- db
volumes:
mysql:

View File

@ -0,0 +1,31 @@
version: "3.5"
services:
kopano_kwmserver:
environment:
- enable_mcu_api=yes
- pipeline_forced_regexp=@conference/.*
#- pipeline_forced_regexp=@group/.*
kopano_kwmbridge:
image: ${docker_repo:-zokradonh}/kopano_kwmbridge:${KWMBRIDGE_VERSION:-latest}
read_only: true
restart: unless-stopped
depends_on:
- kopano_kwmserver
environment:
- INSECURE=${INSECURE}
- oidc_issuer_identifier=https://${FQDN}
- kwm_server_urls=http://kwmserver:8778
#- kwm_server_urls=https://${FQDNCLEANED}:8443
- use_nat_1to1_ips=${PUBLICIP}
- use_nat_1to1_candidate_type=host
- ice_udp_port_range=65435:65535
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanossl:/kopano/ssl
ports:
- 65435:65535/udp
tmpfs:
- /tmp

View File

@ -0,0 +1,29 @@
version: "3.5"
services:
web:
ports:
- "8443:8443" # this port should be firewalled off so that only known instances of kwmbridge can connect tot it
kopano_kwmserver:
environment:
- enable_mcu_api=yes
kopano_kwmbridge:
image: ${docker_repo:-zokradonh}/kopano_kwmbridge:${KWMBRIDGE_VERSION:-latest}
read_only: true
restart: unless-stopped
depends_on:
- kopano_kwmserver
environment:
- INSECURE=${INSECURE}
- oidc_issuer_identifier=https://${FQDN}
- kwm_server_urls=https://${FQDNCLEANED}:8443
env_file:
- kopano_kwmbridge.env
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanossl:/kopano/ssl
network_mode: "host"
tmpfs:
- /tmp

45
docker-compose.ldap.yml Normal file
View File

@ -0,0 +1,45 @@
version: "3.5"
services:
ldap:
image: ${docker_repo:-zokradonh}/${LDAP_CONTAINER:-kopano_ldap_demo}:${LDAP_VERSION:-latest}
restart: unless-stopped
container_name: ${COMPOSE_PROJECT_NAME}_ldap
ports:
- ${LDAPPORT:-389}:389
environment:
- LDAP_ADMIN_PASSWORD=${LDAP_ADMIN_PASSWORD}
- LDAP_BASE_DN=${LDAP_BASE_DN}
- LDAP_DOMAIN=${LDAP_DOMAIN}
- LDAP_LOG_LEVEL=0
- LDAP_ORGANISATION=${LDAP_ORGANISATION}
- LDAP_READONLY_USER_PASSWORD=${LDAP_READONLY_USER_PASSWORD}
- LDAP_READONLY_USER=true
env_file:
- ldap.env
command: "--copy-service"
volumes:
- ldap:/var/lib/ldap
- slapd:/etc/ldap/slapd.d
networks:
- ldap-net
mail:
depends_on:
- ldap
networks:
- ldap-net
kopano_server:
depends_on:
- ldap
networks:
- ldap-net
volumes:
ldap:
slapd:
networks:
ldap-net:
driver: bridge

71
docker-compose.mail.yml Normal file
View File

@ -0,0 +1,71 @@
version: "3.5"
services:
mail:
image: mailserver/docker-mailserver:10
restart: unless-stopped
hostname: mail # hostname and domainname may need to be commented on some platforms (e.g. ChromeOS)
domainname: ${LDAP_DOMAIN}
container_name: ${COMPOSE_PROJECT_NAME}_mail
ports:
- "${SMTPPORT:-25}:25"
- "${SMTPSPORT:-465}:465"
- "${MSAPORT:-587}:587"
volumes:
- maildata:/var/mail
- mailstate:/var/mail-state
- maillogs:/var/log/mail
- mtaconfig:/tmp/docker-mailserver/
environment:
- DMS_DEBUG=0
- ENABLE_CLAMAV=1
- ENABLE_FAIL2BAN=1
- ENABLE_LDAP=1
- ENABLE_POSTFIX_VIRTUAL_TRANSPORT=1
- ENABLE_POSTGREY=1
- ENABLE_SASLAUTHD=1
- ENABLE_SPAMASSASSIN=1
- LDAP_BIND_DN=${LDAP_BIND_DN}
- LDAP_BIND_PW=${LDAP_BIND_PW}
- LDAP_QUERY_FILTER_ALIAS=${LDAP_QUERY_FILTER_ALIAS}
- LDAP_QUERY_FILTER_DOMAIN=${LDAP_QUERY_FILTER_DOMAIN}
- LDAP_QUERY_FILTER_GROUP=${LDAP_QUERY_FILTER_GROUP}
- LDAP_QUERY_FILTER_USER=${LDAP_QUERY_FILTER_USER}
- LDAP_SEARCH_BASE=${LDAP_SEARCH_BASE}
- LDAP_SERVER_HOST=${LDAP_SERVER}
- ONE_DIR=1
- PERMIT_DOCKER=connected-networks
- POSTFIX_DAGENT=lmtp:kopano_dagent:2003
- PFLOGSUMM_TRIGGER=logrotate
- POSTMASTER_ADDRESS=${POSTMASTER_ADDRESS}
- SASLAUTHD_LDAP_BIND_DN=${LDAP_BIND_DN}
- SASLAUTHD_LDAP_FILTER=${SASLAUTHD_LDAP_FILTER}
- SASLAUTHD_LDAP_PASSWORD=${LDAP_BIND_PW}
- SASLAUTHD_LDAP_SEARCH_BASE=${LDAP_SEARCH_BASE}
- SASLAUTHD_LDAP_SERVER=${LDAP_HOST}
- SASLAUTHD_MECHANISMS=rimap
- SASLAUTHD_MECH_OPTIONS=kopano_gateway
- SMTP_ONLY=1
- SPAMASSASSIN_SPAM_TO_INBOX=1
- SSL_TYPE=self-signed
- TZ=${TZ}
env_file:
- mail.env
networks:
- kopano-net
# dns: 1.1.1.1 # using Google DNS can lead to lookup errors uncomment this option and
# set to the ip of a trusted dns service (Cloudflare is given as an example).
# See https://github.com/zokradonh/kopano-docker/issues/52 for more information.
cap_add:
- NET_ADMIN
- SYS_PTRACE
kopano_spooler:
depends_on:
- mail
volumes:
maildata:
mailstate:
maillogs:
mtaconfig:

22
docker-compose.ports.yml Normal file
View File

@ -0,0 +1,22 @@
version: "3.5"
services:
web:
ports:
- "${CADDY:-2015}:2015"
- "${HTTP:-80}:80"
- "${HTTPS:-443}:443"
kopano_server:
ports:
- ${KOPANOPORT:-236}:236
- ${KOPANOSPORT:-237}:237
kopano_gateway:
ports:
- "${POP3PORT:-110}:110"
- "${IMAPPORT:-143}:143"
kopano_ical:
ports:
- "${ICALPORT:-8080}:8080"

534
docker-compose.yml Normal file
View File

@ -0,0 +1,534 @@
version: "3.5"
services:
web:
image: ${docker_repo:-zokradonh}/kopano_web:${KWEB_VERSION:-latest}
read_only: true
restart: unless-stopped
environment:
- DEFAULTREDIRECT=${DEFAULTREDIRECT:-/webapp}
- EMAIL=${EMAIL:-off}
- FQDN=${FQDN}
- TLS_MODE=tls_auto
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- web:/.kweb
networks:
web-net:
aliases:
- ${FQDNCLEANED:-domain.invalid}
kopano_ssl:
image: ${docker_repo:-zokradonh}/kopano_ssl:${SSL_VERSION:-latest}
read_only: true
environment:
- FQDN=${FQDN}
- PKI_COUNTRY=NL
env_file:
- kopano_ssl.env
volumes:
- kopanossl:/kopano/ssl
tmpfs:
- /kopano/easypki/
kopano_server:
image: ${docker_repo:-zokradonh}/kopano_core:${CORE_VERSION:-latest}
read_only: true # in case additional packages need to be installed this option should be set to false
restart: unless-stopped
hostname: kopano_server
container_name: ${COMPOSE_PROJECT_NAME}_server
depends_on:
- kopano_konnect
- kopano_ssl
environment:
- ADDITIONAL_KOPANO_PACKAGES=${ADDITIONAL_KOPANO_PACKAGES}
- KCCOMMENT_LDAP_1=${KCCOMMENT_LDAP_1}
- KCCONF_ADMIN_DEFAULT_STORE_LOCALE=${MAILBOXLANG:-en_US.UTF-8} # Hint: if additional locales are required these should be added in base/Dockerfile
- KCCONF_LDAP_LDAP_BIND_PASSWD=${LDAP_BIND_PW}
- KCCONF_LDAP_LDAP_BIND_USER=${LDAP_BIND_DN}
- KCCONF_LDAP_LDAP_SEARCH_BASE=${LDAP_SEARCH_BASE}
- KCCONF_LDAP_LDAP_URI=${LDAP_SERVER}
- KCCONF_SERVER_ATTACHMENT_PATH=/kopano/data/attachments
- KCCONF_SERVER_COREDUMP_ENABLED=no
- KCCONF_SERVER_ENABLE_SSO=yes
- KCCONF_SERVER_KCOIDC_INSECURE_SKIP_VERIFY=${INSECURE}
- KCCONF_SERVER_KCOIDC_ISSUER_IDENTIFIER=https://${FQDN}
- KCCONF_SERVER_LOG_LEVEL=3
- KCCONF_SERVER_LOG_TIMESTAMP=0
- KCCONF_SERVER_MYSQL_DATABASE=${MYSQL_DATABASE}
- KCCONF_SERVER_MYSQL_HOST=${MYSQL_HOST}
- KCCONF_SERVER_MYSQL_PASSWORD=${MYSQL_PASSWORD}
- KCCONF_SERVER_MYSQL_PORT=3306
- KCCONF_SERVER_MYSQL_USER=${MYSQL_USER}
- KCCONF_SERVER_PROXY_HEADER=* # delete line if webapp is not behind reverse proxy
- KCCONF_SERVER_SERVER_LISTEN_TLS=0.0.0.0:237
- KCCONF_SERVER_SERVER_LISTEN=0.0.0.0:236
- KCCONF_SERVER_SERVER_NAME=Kopano
- KCCONF_SERVER_SERVER_SSL_CA_FILE=/kopano/ssl/ca.pem
- KCCONF_SERVER_SERVER_SSL_KEY_FILE=/kopano/ssl/kopano_server.pem
- KCCONF_SERVER_SOFTDELETE_LIFETIME=0
- KCCONF_SERVER_SSLKEYS_PATH=/kopano/ssl/clients
- KCCONF_SERVER_SYNC_GAB_REALTIME=no
- KCCONF_SERVER_SYSTEM_EMAIL_ADDRESS=${POSTMASTER_ADDRESS}
- KCCONF_SERVER_USER_PLUGIN_CONFIG=/tmp/kopano/ldap.cfg
- KCCONF_SERVER_USER_PLUGIN=ldap
- KCUNCOMMENT_LDAP_1=${KCUNCOMMENT_LDAP_1}
- SERVICE_TO_START=server
- TZ=${TZ}
env_file:
- kopano_server.env
networks:
- kopano-net
- web-net
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanodata:/kopano/data
- kopanosocket:/run/kopano
- kopanossl:/kopano/ssl
tmpfs:
- /tmp/
kopano_webapp:
image: ${docker_repo:-zokradonh}/kopano_webapp:${WEBAPP_VERSION:-latest}
read_only: true # in case additional packages need to be installed this option should be set to false
restart: unless-stopped
hostname: kopano_webapp
depends_on:
- kopano_server
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanosocket:/run/kopano
- kopanossl:/kopano/ssl
- kopanowebapp:/var/lib/kopano-webapp/
environment:
- ADDITIONAL_KOPANO_WEBAPP_PLUGINS=${ADDITIONAL_KOPANO_WEBAPP_PLUGINS}
- KCCONF_WEBAPP_OIDC_CLIENT_ID=webapp
- KCCONF_WEBAPP_OIDC_ISS=https://${FQDN}
- KCCONF_WEBAPP_CLIENT_TIMEOUT=0 # needed to set to 0 to work around an oidc bug KW-3398
- TZ=${TZ}
env_file:
- kopano_webapp.env
networks:
- kopano-net
- web-net
tmpfs:
- /run/php/
- /run/sessions/
- /tmp/
- /var/lib/kopano-webapp/plugin_files
- /var/log/
kopano_zpush:
image: ${docker_repo:-zokradonh}/kopano_zpush:${ZPUSH_VERSION:-latest}
read_only: true
restart: unless-stopped
hostname: kopano_zpush
container_name: ${COMPOSE_PROJECT_NAME}_zpush
depends_on:
- kopano_server
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanosocket:/run/kopano
- kopanossl:/kopano/ssl
- zpushstates:/var/lib/z-push/
environment:
- TZ=${TZ}
# Shared folders automatically assigned to all users in the format: [{"name":"<folder name>","id":"<kopano folder id>","type":"<type>","flags":"<flags>"},...]
# For more information on the parameters see the z-push-admin help for the addshared-action.
- ZPUSH_ADDITIONAL_FOLDERS=[]
env_file:
- kopano_zpush.env
networks:
- kopano-net
- web-net
tmpfs:
- /tmp/
- /run/sessions/
- /run/php/
- /var/log/
kopano_grapi:
image: ${docker_repo:-zokradonh}/kopano_core:${CORE_VERSION:-latest}
read_only: true
restart: unless-stopped
container_name: ${COMPOSE_PROJECT_NAME}_grapi
depends_on:
- kopano_server
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanograpi:/var/lib/kopano-grapi
- kopanosocket:/run/kopano
environment:
- KCCONF_GRAPI_ENABLE_EXPERIMENTAL_ENDPOINTS=no # needs to be set to yes for grapi versions prior to 10.3 to use calendar
- KCCONF_GRAPI_INSECURE=${INSECURE}
- KCCONF_GRAPI_PERSISTENCY_PATH=/var/lib/kopano-grapi
- SERVICE_TO_START=grapi
- TZ=${TZ}
env_file:
- kopano_grapi.env
networks:
- kopano-net
- web-net
tmpfs:
- /tmp/
kopano_kapi:
image: ${docker_repo:-zokradonh}/kopano_core:${CORE_VERSION:-latest}
read_only: true
restart: unless-stopped
container_name: ${COMPOSE_PROJECT_NAME}_kapi
depends_on:
- kopano_grapi
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanodata:/kopano/data
- kopanosocket:/run/kopano
- kopanossl:/kopano/ssl
environment:
- DEFAULT_PLUGIN_PUBS_SECRET_KEY_FILE=/kopano/ssl/kapid-pubs-secret.key
- KCCONF_KAPID_INSECURE=${INSECURE}
- KCCONF_KAPID_LISTEN=0.0.0.0:8039
- KCCONF_KAPID_LOG_LEVEL=DEBUG
- KCCONF_KAPID_LOG_LEVEL=info
- KCCONF_KAPID_OIDC_ISSUER_IDENTIFIER=https://${FQDN}
- KCCONF_KAPID_PLUGIN_GRAPI_SOCKET_PATH=/var/run/kopano/grapi
- KCCONF_KAPID_PLUGIN_KVS_DB_DATASOURCE=/kopano/data/kapi-kvs/kvs.db
- SERVICE_TO_START=kapi
- TZ=${TZ}
env_file:
- kopano_kapi.env
networks:
- kopano-net
- web-net
tmpfs:
- /tmp
kopano_kapps:
image: ${docker_repo:-zokradonh}/kopano_kapps:${KAPPS_VERSION:-latest}
read_only: true
restart: unless-stopped
environment:
- SERVICE_TO_START=kapps
env_file:
- kopano_kapps.env
depends_on:
- kopano_kapi
- kopano_konnect
- web
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
networks:
- web-net
tmpfs:
- /tmp
kopano_kdav:
image: ${docker_repo:-zokradonh}/kopano_kdav:${KDAV_VERSION:-latest}
read_only: true
restart: unless-stopped
hostname: kopano_kdav
container_name: ${COMPOSE_PROJECT_NAME}_kdav
depends_on:
- kopano_server
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kdavstates:/var/lib/kopano/kdav
- kopanosocket:/run/kopano
- kopanossl:/kopano/ssl
environment:
- TZ=${TZ}
networks:
- kopano-net
- web-net
tmpfs:
- /run/php/
- /run/sessions/
- /tmp
- /var/log/kdav/
kopano_dagent:
image: ${docker_repo:-zokradonh}/kopano_core:${CORE_VERSION:-latest}
read_only: true
restart: unless-stopped
depends_on:
- kopano_server
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanosocket:/run/kopano
- kopanossl:/kopano/ssl
environment:
- KCCONF_AUTORESPOND_SENDDB=/tmp/autorespond.db
- KCCONF_DAGENT_AUTORESPONDER=/usr/local/bin/kopano-autorespond
- KCCONF_DAGENT_LMTP_LISTEN=0.0.0.0:2003
- KCCONF_DAGENT_LOG_LEVEL=3
- KCCONF_DAGENT_LOG_TIMESTAMP=0
- KCCONF_DAGENT_SSLKEY_FILE=/kopano/ssl/kopano_dagent.pem
- SERVICE_TO_START=dagent
- TZ=${TZ}
env_file:
- kopano_dagent.env
networks:
- kopano-net
tmpfs:
- /tmp
kopano_spooler:
image: ${docker_repo:-zokradonh}/kopano_core:${CORE_VERSION:-latest}
read_only: true
restart: unless-stopped
hostname: spooler # hostname and domainname may need to be commented on some platforms (e.g. ChromeOS)
domainname: ${LDAP_DOMAIN}
depends_on:
- kopano_server
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanosocket:/run/kopano
- kopanossl:/kopano/ssl
environment:
- KCCONF_SPOOLER_LOG_LEVEL=3
- KCCONF_SPOOLER_LOG_TIMESTAMP=0
- KCCONF_SPOOLER_SMTP_SERVER=mail
- KCCONF_SPOOLER_SMTP_PORT=25
- KCCONF_SPOOLER_SSLKEY_FILE=/kopano/ssl/kopano_spooler.pem
- SERVICE_TO_START=spooler
- TZ=${TZ}
env_file:
- kopano_spooler.env
networks:
- kopano-net
tmpfs:
- /tmp
kopano_gateway:
image: ${docker_repo:-zokradonh}/kopano_core:${CORE_VERSION:-latest}
read_only: true
restart: unless-stopped
depends_on:
- kopano_server
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanosocket:/run/kopano
- kopanossl:/kopano/ssl
environment:
- KCCONF_GATEWAY_IMAP_LISTEN=0.0.0.0:143
- KCCONF_GATEWAY_LOG_LEVEL=3
- KCCONF_GATEWAY_LOG_TIMESTAMP=0
- KCCONF_GATEWAY_SERVER_SOCKET=http://kopano_server:236/
- SERVICE_TO_START=gateway
- TZ=${TZ}
env_file:
- kopano_gateway.env
networks:
- kopano-net
tmpfs:
- /tmp
kopano_ical:
image: ${docker_repo:-zokradonh}/kopano_core:${CORE_VERSION:-latest}
read_only: true
restart: unless-stopped
depends_on:
- kopano_server
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanosocket:/run/kopano
- kopanossl:/kopano/ssl
environment:
- KCCONF_ICAL_ICAL_LISTEN=0.0.0.0:8080
- KCCONF_ICAL_LOG_LEVEL=3
- KCCONF_ICAL_LOG_TIMESTAMP=0
- KCCONF_ICAL_SERVER_SOCKET=http://kopano_server:236/
- SERVICE_TO_START=ical
- TZ=${TZ}
env_file:
- kopano_ical.env
networks:
- kopano-net
- web-net
tmpfs:
- /tmp
kopano_monitor:
image: ${docker_repo:-zokradonh}/kopano_core:${CORE_VERSION:-latest}
read_only: true
restart: unless-stopped
depends_on:
- kopano_server
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanosocket:/run/kopano
- kopanossl:/kopano/ssl
environment:
- SERVICE_TO_START=monitor
- KCCONF_MONITOR_LOG_LEVEL=3
- KCCONF_MONITOR_LOG_TIMESTAMP=0
- TZ=${TZ}
env_file:
- kopano_monitor.env
networks:
- kopano-net
tmpfs:
- /tmp
kopano_search:
image: ${docker_repo:-zokradonh}/kopano_core:${CORE_VERSION:-latest}
read_only: true
restart: unless-stopped
container_name: ${COMPOSE_PROJECT_NAME}_search
depends_on:
- kopano_server
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanodata:/kopano/data
- kopanosocket:/run/kopano
- kopanossl:/kopano/ssl
environment:
- SERVICE_TO_START=search
- KCCONF_SEARCH_LOG_LEVEL=3
- KCCONF_SEARCH_LOG_TIMESTAMP=0
- KCCONF_SEARCH_INDEX_PATH=/kopano/data/search/
- TZ=${TZ}
env_file:
- kopano_search.env
networks:
- kopano-net
tmpfs:
- /tmp
kopano_konnect:
image: ${docker_repo:-zokradonh}/kopano_konnect:${KONNECT_VERSION:-latest}
read_only: true
restart: unless-stopped
depends_on:
- kopano_ssl
- web
# to be useful Konnect also needs a running kopano_server, but this dependency cannot be added here since this would be a circular dependency
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanosocket:/run/kopano
- kopanossl:/kopano/ssl
environment:
- allow_client_guests=yes
- allow_dynamic_client_registration=yes
- eckey=/kopano/ssl/meet-kwmserver.pem
- ecparam=/kopano/ssl/ecparam.pem
- encryption_secret_key=/kopano/ssl/konnectd-encryption.key
- FQDN=${FQDN}
- identifier_registration_conf=/kopano/ssl/konnectd-identifier-registration.yaml
- identifier_scopes_conf=/etc/kopano/konnectd-identifier-scopes.yaml
- signing_private_key=/kopano/ssl/konnectd-tokens-signing-key.pem
- validation_keys_path=/kopano/ssl/konnectkeys
env_file:
- kopano_konnect.env
networks:
- kopano-net
- web-net
tmpfs:
- /tmp
kopano_kwmserver:
image: ${docker_repo:-zokradonh}/kopano_kwmserver:${KWM_VERSION:-latest}
read_only: true
restart: unless-stopped
command: wrapper.sh
depends_on:
- kopano_kapi
- kopano_konnect
environment:
- enable_guest_api=yes
- INSECURE=${INSECURE}
- oidc_issuer_identifier=https://${FQDN}
- public_guest_access_regexp=^group/public/.*
- registration_conf=/kopano/ssl/konnectd-identifier-registration.yaml
- turn_service_credentials_password=${TURN_PASSWORD:-}
- turn_service_credentials_user=${TURN_USER:-}
env_file:
- kopano_kwmserver.env
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanossl:/kopano/ssl
networks:
- web-net
tmpfs:
- /tmp
kopano_meet:
image: ${docker_repo:-zokradonh}/kopano_meet:${MEET_VERSION:-latest}
read_only: true
restart: unless-stopped
environment:
- KCCONF_MEET_disableFullGAB=false
- KCCONF_MEET_guests_enabled=true
- KCCONF_MEET_minimumVersion=20200121 # can be used force updates of Meet
- KCCONF_MEET_oidc_useImplicitFlow=true # workaround for guest login with meet https://stash.kopano.io/projects/KWM/repos/meet/pull-requests/102/overview
env_file:
- kopano_meet.env
depends_on:
- kopano_kapi
- kopano_konnect
- kopano_kwmserver
- web
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
networks:
- web-net
tmpfs:
- /tmp
kopano_scheduler:
image: ${docker_repo:-zokradonh}/kopano_scheduler:${SCHEDULER_VERSION:-latest}
read_only: true
restart: "no"
container_name: ${COMPOSE_PROJECT_NAME}_scheduler
networks:
- kopano-net
- web-net
depends_on:
- kopano_server
- kopano_zpush
environment:
- CRON_KOPANOUSERS=10 * * * * docker exec kopano_server kopano-admin --sync
- CRON_ZPUSHGAB=0 22 * * * docker exec kopano_zpush z-push-gabsync -a sync
- CRONDELAYED_KBACKUP=30 1 * * * docker run --rm -it --volumes-from kopano_server -v /root/kopano-backup:/kopano/path ${docker_repo:-zokradonh}/kopano_utils:${CORE_VERSION:-latest} kopano-backup -h
- CRONDELAYED_SOFTDELETE=30 2 * * * docker exec kopano_server kopano-admin --purge-softdelete 30
- TZ=${TZ}
env_file:
- kopano_scheduler.env
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
tmpfs:
- /tmp
volumes:
kdavstates:
kopanodata:
kopanograpi:
kopanolicenses:
kopanosocket:
kopanossl:
kopanowebapp:
web:
zpushstates:
networks:
kopano-net:
driver: bridge
web-net:

View File

@ -1,242 +0,0 @@
version: '3'
services:
kserver:
image: zokradonh/kopano_core:${CORE_VERSION}
hostname: kserver
container_name: kopano_server
links:
- db
depends_on:
- "kssl"
environment:
- SERVICE_TO_START=server
- TZ=Europe/Berlin
- KCCONF_SERVER_COREDUMP_ENABLED=no
- KCCONF_SERVER_LOG_LEVEL=4
- KCCONF_SERVER_MYSQL_HOST=db
- KCCONF_SERVER_MYSQL_PORT=3306
- KCCONF_SERVER_MYSQL_DATABASE=kopano
- KCCONF_SERVER_MYSQL_USER=root
- KCCONF_SERVER_MYSQL_PASSWORD=YOUR_MYSQL_ROOT_PASSWORD #change here
- KCCONF_SERVER_SERVER_SSL_KEY_FILE=/kopano/ssl/kserver.pem
- KCCONF_SERVER_SERVER_SSL_CA_FILE=/kopano/ssl/ca.pem
- KCCONF_SERVER_SSLKEYS_PATH=/kopano/ssl/clients
- KCCONF_SERVER_PROXY_HEADER=* # delete line if webapp is not behind reverse proxy
- KCCONF_SERVER_SYSTEM_EMAIL_ADDRESS=hostmaster@domain.tld #change here
- KCCONF_SERVER_DISABLED_FEATURES=pop3
- KCCONF_SERVER_SEARCH_SOCKET=http://ksearch:2380/
- KCCONF_LDAP_LDAP_URI=ldaps://ldapserver:ldapport #change here
- KCCONF_LDAP_LDAP_BIND_USER=cn=SOME_STANDARD_USER,OU=MyUsers,DC=domain,DC=tld #change here
- KCCONF_LDAP_LDAP_BIND_PASSWD=PASSWORD_OF_STANDARD_USER #change here
- KCCONF_LDAP_LDAP_SEARCH_BASE=OU=MyUsers,dc=domain,dc=tld #change here
- KCCOMMENT_LDAP_1=!include /usr/share/kopano/ldap.openldap.cfg #delete if you want openldap
- KCUNCOMMENT_LDAP_1=!include /usr/share/kopano/ldap.active-directory.cfg #delete if you want openldap
networks:
- kopanonet
volumes:
- data:/kopano/data
- sslcerts:/kopano/ssl
kdagent:
image: zokradonh/kopano_core:${CORE_VERSION}
container_name: kopano_dagent
links:
- kserver
volumes:
- sslcerts:/kopano/ssl
environment:
- SERVICE_TO_START=dagent
- TZ=Europe/Berlin
- KCCONF_DAGENT_LOG_LEVEL=6
- KCCONF_DAGENT_SERVER_SOCKET=https://kserver:237/
- KCCONF_DAGENT_SSLKEY_FILE=/kopano/ssl/kdagent.pem
networks:
- kopanonet
kgateway:
image: zokradonh/kopano_core:${CORE_VERSION}
container_name: kopano_gateway
links:
- kserver
volumes:
- ./gatewaycerts/:/kopano/certs/
environment:
- SERVICE_TO_START=gateway
- TZ=Europe/Berlin
- KCCONF_GATEWAY_SERVER_SOCKET=http://kserver:236/
- KCCONF_GATEWAY_SSL_PRIVATE_KEY_FILE=/kopano/certs/yourcert.key # change here
- KCCONF_GATEWAY_SSL_CERTIFICATE_FILE=/kopano/certs/yourcert.pem # change here
networks:
- kopanonet
kical:
image: zokradonh/kopano_core:${CORE_VERSION}
container_name: kopano_ical
links:
- kserver
environment:
- SERVICE_TO_START=ical
- TZ=Europe/Berlin
- KCCONF_ICAL_SERVER_SOCKET=http://kserver:236/
networks:
- kopanonet
kmonitor:
image: zokradonh/kopano_core:${CORE_VERSION}
container_name: kopano_monitor
links:
- kserver
volumes:
- sslcerts:/kopano/ssl
environment:
- SERVICE_TO_START=monitor
- TZ=Europe/Berlin
- KCCONF_MONITOR_SERVER_SOCKET=https://kserver:237/
- KCCONF_MONITOR_SSLKEY_FILE=/kopano/ssl/kmonitor.pem
networks:
- kopanonet
ksearch:
image: zokradonh/kopano_core:${CORE_VERSION}
container_name: kopano_search
links:
- kserver
volumes:
- sslcerts:/kopano/ssl
environment:
- SERVICE_TO_START=search
- TZ=Europe/Berlin
- KCCONF_SEARCH_SERVER_BIND_NAME=http://ksearch:2380
- KCCONF_SEARCH_SERVER_SOCKET=https://kserver:237/
- KCCONF_SEARCH_SSLKEY_FILE=/kopano/ssl/ksearch.pem
networks:
- kopanonet
kspooler:
image: zokradonh/kopano_core:${CORE_VERSION}
container_name: kopano_spooler
links:
- kserver
volumes:
- sslcerts:/kopano/ssl
environment:
- SERVICE_TO_START=spooler
- TZ=Europe/Berlin
- KCCONF_SPOOLER_SERVER_SOCKET=https://kserver:237/
- KCCONF_SPOOLER_LOG_LEVEL=4
- KCCONF_SPOOLER_SMTP_SERVER=kmta
- KCCONF_SPOOLER_SSLKEY_FILE=/kopano/ssl/kspooler.pem
networks:
- kopanonet
kwebapp:
image: zokradonh/kopano_webapp:${WEBAPP_VERSION}
hostname: kwebapp
container_name: kopano_webapp
links:
- kserver
#ports:
# - "8236:80"
# - "8237:443"
volumes:
- syncstates:/var/lib/z-push/
- sslcerts:/kopano/ssl
environment:
- TZ=Europe/Berlin
- KCCONF_SERVERHOSTNAME=kserver
- KCCONF_SERVERPORT=237
networks:
- web
- kopanonet
kssl:
image: zokradonh/kopano_ssl
container_name: kopano_ssl
volumes:
- sslcerts:/kopano/ssl
kmta:
image: tvial/docker-mailserver:latest
hostname: myhost #change here
domainname: domain.tld #change here
#dns: 127.0.0.1
container_name: kopano_mta
#links:
# - adtunnel
ports:
- "25:25"
# - "143:143"
# - "587:587"
# - "993:993"
volumes:
- tmpmaildata:/var/mail
- tmpmailstate:/var/mail-state
- ./mtaconfig/:/tmp/docker-mailserver/ # create this dir
environment:
- TZ=Europe/Berlin
- ENABLE_SPAMASSASSIN=1
- ENABLE_CLAMAV=1
- ENABLE_FAIL2BAN=1
- ENABLE_POSTGREY=1
- TLS_LEVEL=intermediate
- POSTGREY_DELAY=10
- ONE_DIR=1
- DMS_DEBUG=0
- ENABLE_LDAP=1
- LDAP_SERVER_HOST=ldaps://ldapserver:ldapport #change here
- LDAP_SEARCH_BASE=OU=MyUsers,DC=domain,DC=tld #change here
- LDAP_BIND_DN=cn=SOME_STANDARD_USER,OU=MyUsers,DC=domain,DC=tld #change here
- LDAP_BIND_PW=PASSWORD_OF_SOME_STANDARD_USER #change here
- LDAP_QUERY_FILTER_USER=(&(objectClass=user)(|(mail=%s)(otherMailbox=%s)))
- LDAP_QUERY_FILTER_GROUP=(&(objectclass=group)(mail=%s))
- LDAP_QUERY_FILTER_ALIAS=(&(objectClass=user)(otherMailbox=%s))
- LDAP_QUERY_FILTER_DOMAIN=(&(|(mail=*@%s)(otherMailbox=*@%s)(mailGroupMember=*@%s))(kopanoAccount=1)(|(objectClass=user)(objectclass=group)))
- ENABLE_SASLAUTHD=1
- SASLAUTHD_LDAP_SERVER=ldaps://ldapserver:ldapport #change here
- SASLAUTHD_LDAP_BIND_DN=cn=SOME_STANDARD_USER,OU=MyUsers,DC=domain,DC=tld #change here
- SASLAUTHD_LDAP_PASSWORD=PASSWORD_OF_SOME_STANDARD_USER #change here
- SASLAUTHD_LDAP_SEARCH_BASE=OU=MyUsers,DC=domain,DC=tld #change here
- SASLAUTHD_LDAP_FILTER=(&(sAMAccountName=%U)(objectClass=person))
- SASLAUTHD_MECHANISMS=ldap
- POSTMASTER_ADDRESS=postmaster@domain.tld #change here
- SMTP_ONLY=1
- PERMIT_DOCKER=network
- ENABLE_POSTFIX_VIRTUAL_TRANSPORT=1
- POSTFIX_DAGENT=lmtp:kdagent:2003
- REPORT_RECIPIENT=1
networks:
- kopanonet
cap_add:
- NET_ADMIN
- SYS_PTRACE
db:
image: mariadb
restart: always
container_name: kopano_db
volumes:
- db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=YOUR_MYSQL_ROOT_PASSWORD #change here
- MYSQL_PASSWORD=YOUR_PASSWORD #change here
- MYSQL_DATABASE=kopano
- MYSQL_USER=kopano
networks:
- kopanonet
volumes:
db:
data:
syncstates:
sslcerts:
tmpmaildata:
tmpmailstate:
networks:
web: # this requires an external docker container that is a http reverse proxy (e.g. haproxy)
external:
name: haproxy_webrproxynet
kopanonet:
driver: bridge

61
examples/apache-proxy.md Normal file
View File

@ -0,0 +1,61 @@
# Using Apache as the front facing reverse proxy
Example provided by [ronnybremer](https://github.com/ronnybremer) in [Add reverse proxy example for Apache](https://github.com/zokradonh/kopano-docker/issues/372).
To be able to use a different proxy, than the bundled kweb the env variable `FQDNCLEANED` needs to be unset (to not route traffic through it, but the external proxy). Additionally `EMAIL` needs to be set to `off`.
```bash
<VirtualHost aaa.bbb.ccc.ddd:443 [aaaa:bbbb:cccc:dddd:eeee:ffff::yy]:443>
ServerName public.domain.com:443
ServerAdmin your_friendly_admin@domain.com
UseCanonicalName On
ErrorLog logs/meet_ssl_error_log
CustomLog logs/meet_ssl_access_log combined
LogLevel warn
SSLEngine on
SSLCompression off
SSLProxyEngine off
SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite HIGH:3DES:!aNULL:!MD5:!SEED:!IDEA
# for higher security
# SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH
SSLHonorCipherOrder on
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
Header unset X-Frame-Options
Header unset Content-Security-Policy
RewriteEngine On
# Meet and PWAs only work on https
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} ^/meet$ [OR]
RewriteCond %{REQUEST_URI} ^/meet/
RewriteRule ^(.*)$ https://public.domain.com/meet/ [R,L]
# We need to access Meet through the proper domain
RewriteCond %{REQUEST_URI} ^/meet$ [OR]
RewriteCond %{REQUEST_URI} ^/meet/
RewriteCond %{HTTP_HOST} !^public.domain.com$ [NC]
RewriteRule ^(.*)$ https://public.domain.com/meet/ [R,L]
# Upgrade Websocket connections
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule /api/kwm/v2/(.*) ws://internal.domain.com:2015/api/kwm/v2/$1 [P,L]
<Directory />
Order deny,allow
Deny from all
</Directory>
<Location />
ProxyPass http://internal.domain.com:2015/
ProxyPassReverse http://internal.domain.com:2015/
ProxyPreserveHost On
</Location>
</VirtualHost>
```

107
examples/core.yml Normal file
View File

@ -0,0 +1,107 @@
version: "3.5"
services:
ldap:
image: ${docker_repo:-zokradonh}/kopano_ldap_demo
container_name: ldap
ports:
- ${LDAPPORT:-389}:389
environment:
- LDAP_ORGANISATION=${LDAP_ORGANISATION}
- LDAP_DOMAIN=${LDAP_DOMAIN}
- LDAP_BASE_DN=${LDAP_BASE_DN}
- LDAP_ADMIN_PASSWORD=${LDAP_ADMIN_PASSWORD}
- LDAP_READONLY_USER=true
- LDAP_READONLY_USER_PASSWORD=${LDAP_READONLY_USER_PASSWORD}
command: "--loglevel info --copy-service"
volumes:
- ldap:/var/lib/ldap
- slapd:/etc/ldap/slapd.d
networks:
- ldap-net
db:
image: mariadb:10.3.10-bionic
restart: always
container_name: kopano_db
volumes:
- mysql/:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
healthcheck:
test: ["CMD-SHELL", 'mysql --database=$$MYSQL_DATABASE --password=$$MYSQL_ROOT_PASSWORD --execute="SELECT count(table_name) > 0 FROM information_schema.tables;" --skip-column-names -B']
interval: 30s
timeout: 10s
retries: 4
networks:
- kopano-net
kopano_ssl:
image: ${docker_repo:-zokradonh}/kopano_ssl
container_name: kopano_ssl
environment:
- FQDN=${FQDN}
- PKI_COUNTRY=NL
volumes:
- /etc/kopano/ssl/:/kopano/ssl
kopano_server:
image: ${docker_repo:-zokradonh}/kopano_core:${CORE_VERSION:-latest}
hostname: kopano_server
container_name: kopano_server
depends_on:
- db
- ldap
- kopano_ssl
ports:
- ${KOPANOPORT:-236}:236
- ${KOPANOSPORT:-237}:237
environment:
- SERVICE_TO_START=server
- TZ=${TZ}
- KCCONF_SERVER_COREDUMP_ENABLED=no
- KCCONF_SERVER_LOG_LEVEL=3
- KCCONF_SERVER_MYSQL_HOST=${MYSQL_HOST}
- KCCONF_SERVER_MYSQL_PORT=3306
- KCCONF_SERVER_MYSQL_DATABASE=${MYSQL_DATABASE}
- KCCONF_SERVER_MYSQL_USER=${MYSQL_USER}
- KCCONF_SERVER_MYSQL_PASSWORD=${MYSQL_PASSWORD}
- KCCONF_SERVER_SERVER_SSL_KEY_FILE=/kopano/ssl/kopano_server.pem
- KCCONF_SERVER_SERVER_SSL_CA_FILE=/kopano/ssl/ca.pem
- KCCONF_SERVER_SERVER_NAME=Kopano
- KCCONF_SERVER_SSLKEYS_PATH=/kopano/ssl/clients
- KCCONF_SERVER_PROXY_HEADER=* # delete line if webapp is not behind reverse proxy
- KCCONF_SERVER_SYSTEM_EMAIL_ADDRESS=${POSTMASTER_ADDRESS}
- KCCONF_SERVER_SYNC_GAB_REALTIME=no
- KCCONF_LDAP_LDAP_URI=${LDAP_SERVER}
- KCCONF_LDAP_LDAP_BIND_USER=${LDAP_BIND_DN}
- KCCONF_LDAP_LDAP_BIND_PASSWD=${LDAP_BIND_PW}
- KCCONF_LDAP_LDAP_SEARCH_BASE=${LDAP_SEARCH_BASE}
- KCUNCOMMENT_LDAP_1=${KCUNCOMMENT_LDAP_1}
- KCCOMMENT_LDAP_1=${KCCOMMENT_LDAP_1}
- ADDITIONAL_KOPANO_PACKAGES=${ADDITIONAL_KOPANO_PACKAGES}
networks:
- kopano-net
- ldap-net
- web-net
volumes:
- kopanodata/:/kopano/data
- /etc/kopano/ssl/:/kopano/ssl
- /run/kopano/:/run/kopano
volumes:
ldap:
slapd:
mysql:
kopanodata:
networks:
web-net:
kopano-net:
driver: bridge
ldap-net:
name: ldap-net
driver: bridge

View File

@ -0,0 +1,7 @@
version: "3.5"
services:
# disable services
mail:
image: hello-world
restart: "no"

View File

@ -0,0 +1,40 @@
version: "3.5"
# example file to store attachments in s3 (provided by minio)
# rename to docker-compose.override.yml and place it along the existing file to use it
# (and change accesskey an secretkey below)
services:
kopano_server:
depends_on:
- minio
environment:
- KCCONF_SERVER_ATTACHMENT_STORAGE=s3
- KCCONF_SERVER_LOG_LEVEL=6
- KCCONF_SERVER_ATTACHMENT_S3_HOSTNAME=minio:9000
- KCCONF_SERVER_ATTACHMENT_S3_PROTOCOL=http
- KCCONF_SERVER_ATTACHMENT_S3_URISTYLE=path
- KCCONF_SERVER_ATTACHMENT_S3_REGION=us-east-1
- KCCONF_SERVER_ATTACHMENT_S3_ACCESSKEYID=ACCESSKEY
- KCCONF_SERVER_ATTACHMENT_S3_SECRETACCESSKEY=SECRETKEY
- KCCONF_SERVER_ATTACHMENT_S3_BUCKETNAME=kopano
- KCCONF_SERVER_ATTACHMENT_PATH=attachments
minio:
image: minio/minio
ports:
- '9000:9000'
volumes:
- miniodata:/export
- minioconfig:/root/.minio
environment:
- MINIO_ACCESS_KEY=ACCESSKEY
- MINIO_SECRET_KEY=SECRETKEY
command: server /data
entrypoint: sh
command: -c 'mkdir -p /export/kopano && /usr/bin/minio server /export'
networks:
- kopano-net
volumes:
miniodata:
minioconfig:

View File

@ -0,0 +1,7 @@
version: "3.5"
services:
watchtower:
image: v2tec/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock

View File

@ -0,0 +1,15 @@
# Configuration example for running Kopano in a Multiserver setup
This example shows how a Kopano Multiserver/Distributed setup can be achieved. The design is by no means perfect (a real deployment could make use of zero user/cachine nodes to handle front facing components), but its functional. Users will be able to login to Kopano WebApp as well as Meet and see users of other nodes and will be able to mail/call with them.
**Hint:** The configuration as it is requires that you clean out existing Kopano containers and data volumes, as the additional database is only created on the initial start of the database container.
1. Add the `kopano-multiserver.yml` to the `COMPOSE_FILE` variable in your `.env` file.
Example:
```bash
COMPOSE_FILE=docker-compose.yml:docker-compose.ports.yml:examples/kopano-multiserver/kopano-multiserver.yml
```
2. run `docker-compose up -d` from the root of this project.

View File

@ -0,0 +1,96 @@
version: "3.5"
services:
db:
volumes:
- ./database/create-additional-databases.sh:/docker-entrypoint-initdb.d/create-additional-databases.sh
environment:
- MYSQL_ADDITIONAL_DATABASES=${MYSQL_DATABASE}2
kopano_server:
environment:
- KCCONF_ADMIN_SSLKEY_FILE=/kopano/ssl/admin.pem
- KCCONF_SERVER_ENABLE_DISTRIBUTED_KOPANO=true
- KCCONF_SERVER_SERVER_NAME=kopano_server
kopano_server_2:
image: ${docker_repo:-zokradonh}/kopano_core:${CORE_VERSION:-latest}
hostname: kopano_server_2
container_name: ${COMPOSE_PROJECT_NAME}_server_2
depends_on:
- db
- kopano_konnect
- kopano_ssl
- ldap
environment:
- ADDITIONAL_KOPANO_PACKAGES=${ADDITIONAL_KOPANO_PACKAGES}
- KCCOMMENT_LDAP_1=${KCCOMMENT_LDAP_1}
- KCCONF_ADMIN_SSLKEY_FILE=/kopano/ssl/admin.pem
- KCCONF_LDAP_LDAP_BIND_PASSWD=${LDAP_BIND_PW}
- KCCONF_LDAP_LDAP_BIND_USER=${LDAP_BIND_DN}
- KCCONF_LDAP_LDAP_SEARCH_BASE=${LDAP_SEARCH_BASE}
- KCCONF_LDAP_LDAP_URI=${LDAP_SERVER}
- KCCONF_SERVER_COREDUMP_ENABLED=no
- KCCONF_SERVER_ENABLE_DISTRIBUTED_KOPANO=true
- KCCONF_SERVER_ENABLE_SSO=yes
- KCCONF_SERVER_KCOIDC_INSECURE_SKIP_VERIFY=${INSECURE}
- KCCONF_SERVER_KCOIDC_ISSUER_IDENTIFIER=https://${FQDN}
- KCCONF_SERVER_MYSQL_DATABASE=${MYSQL_DATABASE}2
- KCCONF_SERVER_MYSQL_HOST=${MYSQL_HOST}
- KCCONF_SERVER_MYSQL_PASSWORD=${MYSQL_PASSWORD}
- KCCONF_SERVER_MYSQL_PORT=3306
- KCCONF_SERVER_MYSQL_USER=${MYSQL_USER}
- KCCONF_SERVER_PROXY_HEADER=* # delete line if webapp is not behind reverse proxy
- KCCONF_SERVER_SERVER_NAME=kopano_server_2
- KCCONF_SERVER_SERVER_SSL_CA_FILE=/kopano/ssl/ca.pem
- KCCONF_SERVER_SERVER_SSL_KEY_FILE=/kopano/ssl/kopano_server_2.pem
- KCCONF_SERVER_SSLKEYS_PATH=/kopano/ssl/clients
- KCCONF_SERVER_SYSTEM_EMAIL_ADDRESS=${POSTMASTER_ADDRESS}
- KCUNCOMMENT_LDAP_1=${KCUNCOMMENT_LDAP_1}
- SERVICE_TO_START=server
- TZ=${TZ}
env_file:
- kopano_server.env
networks:
- kopano-net
- ldap-net
- web-net
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanodata2/:/kopano/data
- kopanosocket2/:/run/kopano
- kopanossl/:/kopano/ssl
kopano_spooler_2:
image: ${docker_repo:-zokradonh}/kopano_core:${CORE_VERSION:-latest}
restart: unless-stopped
hostname: spooler_2
container_name: ${COMPOSE_PROJECT_NAME}_spooler_2
domainname: ${LDAP_DOMAIN}
depends_on:
- kopano_server_2
- mail
volumes:
- kopanosocket2/:/run/kopano
- kopanossl/:/kopano/ssl
environment:
- KCCONF_SPOOLER_LOG_LEVEL=3
- KCCONF_SPOOLER_SMTP_SERVER=mail
- KCCONF_SPOOLER_SSLKEY_FILE=/kopano/ssl/kopano_spooler.pem
- SERVICE_TO_START=spooler
- TZ=${TZ}
env_file:
- kopano_spooler.env
networks:
- kopano-net
kopano_scheduler:
depends_on:
- kopano_server_2
environment:
- CRON_KOPANOUSERS2=10 * * * * docker exec kopano_server_2 kopano-admin --sync
volumes:
kopanodata2:
kopanosocket2:

45
examples/meet/README.md Normal file
View File

@ -0,0 +1,45 @@
# Running Kopano Meet without Kopano (with only the LDAP backend)
The docker-compose.yml file in this directory can be used as a template to run Kopano Meet against a LDAP user directory. The file as it is starts a demo deployment of Meet including some pre created users to explore Kopano Meet.
Check https://github.com/zokradonh/kopano-docker/blob/master/ldap_demo/README.md to learn more about the included demo users.
## Instructions
1. run `setup.sh`
2. check `.env` for any required customization (port 443 already in use?)
3. run `docker-compose up` to start
4. navigate to https://your-domain to login to Kopano Meet
## Additional environment variables for using ActiveDirectory
Create the a file named `docker-compose.override.yml` with the following content in case you are using Microsoft ActiveDirectory.
```yaml
version: "3.5"
services:
kopano_grapi:
environment:
- LDAP_FILTER=(&(objectClass=organizationalPerson)(!(UserAccountControl:1.2.840.113556.1.4.803:=2)))
- LDAP_LOGIN_ATTRIBUTE=sAMAccountName
- LDAP_EMAIL_ATTRIBUTE=mail
- LDAP_NAME_ATTRIBUTE=displayName
- LDAP_FAMILY_NAME_ATTRIBUTE=sn
- LDAP_GIVEN_NAME_ATTRIBUTE=givenName
- LDAP_JOB_TITLE_ATTRIBUTE=title
- LDAP_OFFICE_LOCATION_ATTRIBUTE=L
- LDAP_BUSINESS_PHONE_ATTRIBUTE=telephoneNumber
- LDAP_MOBILE_PHONE_ATTRIBUTE=mobile
- USERID_SEARCH_FILTER_TEMPLATE=({loginAttribute}=%(userid)s)
- SEARCH_SEARCH_FILTER_TEMPLATE=(&(objectClass=organizationalPerson)(!(UserAccountControl:1.2.840.113556.1.4.803:=2))(|({emailAttribute}=*%(search)s*)({givenNameAttribute}=*%(search)s*)({familyNameAttribute}=*%(search)s*)))
kopano_konnect:
environment:
- LDAP_LOGIN_ATTRIBUTE=sAMAccountName
- LDAP_NAME_ATTRIBUTE=displayName
- LDAP_UUID_ATTRIBUTE_TYPE=binary
- LDAP_UUID_ATTRIBUTE=objectGUID
```

View File

@ -0,0 +1,42 @@
# Architecture Overview
## web
- external entry point for users accessing Kopano Meet
- reverse proxy for kopano_kapi, kopano_konnect, kopano_kwmserver and kopano_meet
- can retrieve ssl certificate from Lets Encrypt
- redirects all requests to /meet
- recommended to use as it makes web configuration easy and secure (manual configuration will be tendious and potentially less secure)
## ldap
- (optional) bundles OpenLDAP service
- Konnect and Grapi are using it
## kopano_ssl
- helper container to generate ssl certificates for internal usage
- will create required files and then stop
## kopano_grapi
- groupware backend of the Kopano RestAPI
- connects to LDAP to provide a global addressbook to users
## kopano_kapi
- http endpoint of the Kopano RestAPI
- stores recent calls for the user in a key value stores (queried over Rest)
## kopano_konnect
- authentification component (OpenID Connect) for Meet
- connects to the LDAP backend to verify user logins via bind
## kopano_kwmserver
- WebRTC signalling server
## kopano_meet
- provides the Meet web application/frontend

View File

@ -0,0 +1,26 @@
version: "3.5"
services:
kopano_kwmserver:
environment:
- enable_mcu_api=yes
- pipeline_forced_regexp=@conference/.*
#- pipeline_forced_regexp=@group/.*
kopano_kwmbridge:
image: ${docker_repo:-zokradonh}/kopano_kwmbridge:${KWMBRIDGE_VERSION:-latest}
read_only: true
restart: unless-stopped
depends_on:
- kopano_kwmserver
environment:
- INSECURE=${INSECURE}
- oidc_issuer_identifier=https://${FQDN}
- kwm_server_urls=https://${FQDN}
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanossl/:/kopano/ssl
network_mode: "host"
tmpfs:
- /tmp

View File

@ -0,0 +1,201 @@
version: "3.5"
services:
web:
image: ${docker_repo:-kopano}/kopano_web:${KWEB_VERSION:-latest}
restart: unless-stopped
ports:
- "${CADDY:-2015}:2015"
- "${HTTP:-80}:80"
- "${HTTPS:-443}:443"
environment:
- DEFAULTREDIRECT=/meet
- EMAIL=${EMAIL:-off}
- FQDN=${FQDN}
command: wrapper.sh
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- web:/.kweb
networks:
web-net:
aliases:
- ${FQDNCLEANED:-domain.invalid}
ldap:
image: ${docker_repo:-kopano}/${LDAP_CONTAINER:-kopano_ldap_demo}:${LDAP_VERSION:-latest}
restart: unless-stopped
container_name: ${COMPOSE_PROJECT_NAME}_ldap
environment:
- LDAP_ADMIN_PASSWORD=${LDAP_ADMIN_PASSWORD}
- LDAP_BASE_DN=${LDAP_BASE_DN}
- LDAP_DOMAIN=${LDAP_DOMAIN}
- LDAP_ORGANISATION=${LDAP_ORGANISATION}
- LDAP_READONLY_USER_PASSWORD=${LDAP_READONLY_USER_PASSWORD}
- LDAP_READONLY_USER=true
command: "--loglevel info --copy-service"
volumes:
- ldap:/var/lib/ldap
- slapd:/etc/ldap/slapd.d
networks:
- ldap-net
kopano_ssl:
image: ${docker_repo:-kopano}/kopano_ssl:${SSL_VERSION:-latest}
environment:
- FQDN=${FQDN}
- PKI_COUNTRY=NL
volumes:
- kopanossl/:/kopano/ssl
kopano_kustomer:
image: kopano/kustomerd:${KUSTOMER_VERSION:-latest}
restart: unless-stopped
command: serve
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanolicenses:/etc/kopano/licenses
- kopanosocket/:/run/kopano
kopano_grapi:
image: ${docker_repo:-kopano}/kopano_core:${CORE_VERSION:-latest}
restart: unless-stopped
container_name: ${COMPOSE_PROJECT_NAME}_grapi
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanosocket/:/run/kopano
environment:
- GRAPI_BACKEND=ldap
- LDAP_BASEDN=${LDAP_SEARCH_BASE}
- LDAP_BINDDN=${LDAP_BIND_DN}
- LDAP_BINDPW=${LDAP_BIND_PW}
- LDAP_URI=${LDAP_SERVER}
- SERVICE_TO_START=grapi
- TZ=${TZ}
networks:
- kopano-net
- ldap-net
kopano_kapi:
image: ${docker_repo:-kopano}/kopano_core:${CORE_VERSION:-latest}
restart: unless-stopped
container_name: ${COMPOSE_PROJECT_NAME}_kapi
depends_on:
- kopano_grapi
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanodata/:/kopano/data
- kopanosocket/:/run/kopano
- kopanossl/:/kopano/ssl
environment:
- DEFAULT_PLUGIN_PUBS_SECRET_KEY_FILE=/kopano/ssl/kapid-pubs-secret.key
- KCCONF_KAPID_INSECURE=${INSECURE}
- KCCONF_KAPID_LISTEN=0.0.0.0:8039
- KCCONF_KAPID_LOG_LEVEL=DEBUG
- KCCONF_KAPID_LOG_LEVEL=info
- KCCONF_KAPID_OIDC_ISSUER_IDENTIFIER=https://${FQDN}
- KCCONF_KAPID_PLUGIN_GRAPI_SOCKET_PATH=/var/run/kopano/grapi
- KCCONF_KAPID_PLUGIN_KVS_DB_DATASOURCE=/kopano/data/kapi-kvs/kvs.db
- SERVICE_TO_START=kapi
- TZ=${TZ}
networks:
- kopano-net
- web-net
kopano_konnect:
image: ${docker_repo:-kopano}/kopano_konnect:${KONNECT_VERSION:-latest}
restart: unless-stopped
depends_on:
- kopano_ssl
- web
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanossl/:/kopano/ssl
environment:
- allow_client_guests=yes
- allow_dynamic_client_registration=yes
- eckey=/kopano/ssl/meet-kwmserver.pem
- ecparam=/kopano/ssl/ecparam.pem
- encryption_secret_key=/kopano/ssl/konnectd-encryption.key
- FQDN=${FQDN}
- identifier_registration_conf=/kopano/ssl/konnectd-identifier-registration.yaml
- identifier_scopes_conf=/etc/kopano/konnectd-identifier-scopes.yaml
- KONNECT_BACKEND=ldap
- LDAP_BASEDN=${LDAP_SEARCH_BASE}
- LDAP_BINDDN=${LDAP_BIND_DN}
- LDAP_BINDPW=${LDAP_BIND_PW}
- LDAP_EMAIL_ATTRIBUTE=mail
- LDAP_FILTER=(objectClass=organizationalPerson)
- LDAP_LOGIN_ATTRIBUTE=uid
- LDAP_NAME_ATTRIBUTE=cn
- LDAP_SCOPE=sub
- LDAP_URI=${LDAP_SERVER}
- LDAP_UUID_ATTRIBUTE_TYPE=text
- LDAP_UUID_ATTRIBUTE=uidNumber
- signing_private_key=/kopano/ssl/konnectd-tokens-signing-key.pem
networks:
- kopano-net
- ldap-net
- web-net
kopano_kwmserver:
image: ${docker_repo:-kopano}/kopano_kwmserver:${KWM_VERSION:-latest}
restart: unless-stopped
command: wrapper.sh
depends_on:
- kopano_kapi
- kopano_konnect
environment:
- enable_guest_api=yes
- INSECURE=${INSECURE}
- oidc_issuer_identifier=https://${FQDN}
- public_guest_access_regexp=^group/public/.*
- registration_conf=/kopano/ssl/konnectd-identifier-registration.yaml
- turn_service_credentials_password=${TURN_PASSWORD}
- turn_service_credentials_user=${TURN_USER}
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
- kopanossl/:/kopano/ssl
networks:
- web-net
kopano_meet:
image: ${docker_repo:-kopano}/kopano_meet:${MEET_VERSION:-latest}
restart: unless-stopped
environment:
- KCCONF_MEET_disableFullGAB=false
- KCCONF_MEET_GRID_WEBAPP=no
- KCCONF_MEET_guests_enabled=true
- KCCONF_MEET_useIdentifiedUser=true
- SERVICE_TO_START=meet
depends_on:
- kopano_kapi
- kopano_konnect
- kopano_kwmserver
- web
volumes:
- /etc/machine-id:/etc/machine-id
- /etc/machine-id:/var/lib/dbus/machine-id
networks:
- web-net
volumes:
kopanodata:
kopanolicenses:
kopanosocket:
kopanossl:
ldap:
slapd:
web:
networks:
kopano-net:
driver: bridge
ldap-net:
driver: bridge
web-net:

40
examples/meet/env-example Normal file
View File

@ -0,0 +1,40 @@
# please consult https://github.com/kopano-dev/kopano-docker
# for possible configuration values and their impact
# Access to the Kopano Turn service can be requested at https://portal.kopano.com/content/turn-server-access-request
TURN_USER=
TURN_PASSWORD=
# Defines how Kopano can be accessed from the outside world
FQDN=kopano.demo
FQDNCLEANED=kopano.demo
DEFAULTREDIRECT=/meet
EMAIL=self_signed
CADDY=2015
HTTP=80
HTTPS=443
TZ=Europe/Berlin
LDAP_CONTAINER=kopano_ldap_demo
LDAP_ORGANISATION="Kopano Demo"
LDAP_DOMAIN=kopano.demo
LDAP_BASE_DN=dc=kopano,dc=demo
LDAP_SERVER=ldap://ldap:389
LDAP_ADMIN_PASSWORD=adminpassword
LDAP_READONLY_USER_PASSWORD=readonlypassword
LDAP_BIND_DN=cn=readonly,dc=kopano,dc=demo
LDAP_BIND_PW=readonlypassword
LDAP_SEARCH_BASE=dc=kopano,dc=demo
# Settings for test environments
INSECURE=yes
# Docker and docker-compose settings
# Docker Repository to push to/pull from
docker_repo=kopano
COMPOSE_PROJECT_NAME=kopano
# Additional packages to install
ADDITIONAL_KOPANO_PACKAGES=python3-grapi.backend.ldap

146
examples/meet/setup.sh Executable file
View File

@ -0,0 +1,146 @@
#!/bin/bash
set -e
fqdn_to_dn() {
printf 'dc=%s' "$1" | sed -E 's/\./,dc=/g'
}
random_string() {
hexdump -n 16 -v -e '/1 "%02X"' /dev/urandom
}
if [ ! -e /etc/machine-id ]; then
echo "This compose file uses /etc/machine-id to identify the system its running on. The file does not seem to exist on your system, please create it."
exit 1
fi
if [ ! -e ./.env ]; then
PRINT_SETUP_SUCCESS=""
echo "Creating an .env file for you"
value_default="Kopano Demo"
read -r -p "Name of the Organisation for LDAP [$value_default]: " new_value
LDAP_ORGANISATION=${new_value:-$value_default}
value_default="kopano.demo"
read -r -p "FQDN to be used (for reverse proxy).
Hint: use port 2015 in case port 443 is already in use on the system.
[$value_default]: " new_value
FQDN=${new_value:-$value_default}
value_default="self_signed"
read -r -p "Email address to use for Lets Encrypt.
Use 'self_signed' as your email to create self signed certificates.
Use 'off' if you want to run the service without tls encryption. Make sure to use an ssl-terminating reverse proxy in front in this case.
[$value_default]: " new_value
EMAIL=${new_value:-$value_default}
# Let Kapi accept self signed certs if required
if [ "$EMAIL" == "self_signed" ]; then
INSECURE="yes"
else
INSECURE="no"
fi
LDAP_BASE_DN=$(fqdn_to_dn "${FQDN%:*}")
value_default="$LDAP_BASE_DN"
read -r -p "Name of the BASE DN for LDAP [$value_default]: " new_value
LDAP_BASE_DN=${new_value:-$value_default}
value_default="ldap://ldap:389"
read -r -p "LDAP server to be used (defaults to the bundled OpenLDAP) [$value_default]: " new_value
LDAP_SERVER=${new_value:-$value_default}
if [ "$LDAP_SERVER" != "$value_default" ]; then
# We don't need an admin password in case we don't use the bundled LDAP server
LDAP_ADMIN_PASSWORD=""
value_default="$LDAP_BASE_DN"
read -r -p "LDAP search base [$value_default]: " new_value
LDAP_SEARCH_BASE=${new_value:-$value_default}
value_default="cn=readonly,$LDAP_BASE_DN"
read -r -p "LDAP bind user (needs read permissions) [$value_default]: " new_value
LDAP_BIND_DN=${new_value:-$value_default}
value_default="kopano123"
read -r -p "LDAP bind password to be used [$value_default]: " new_value
LDAP_BIND_PW=${new_value:-$value_default}
PRINT_SETUP_SUCCESS="$PRINT_SETUP_SUCCESS !! You have specified the LDAP server '${LDAP_SERVER}', don't forget to remove the bundled ldap service in docker-compose.yml !!"
else
value_default="yes"
read -r -p "Use bundled LDAP with demo users? yes/no [$value_default]: " new_value
LDAP_CONTAINER_QUESTION=${new_value:-$value_default}
if [ "${LDAP_CONTAINER_QUESTION}" == "yes" ]; then
LDAP_CONTAINER="kopano_ldap_demo"
else
LDAP_CONTAINER="kopano_ldap"
fi
LDAP_ADMIN_PASSWORD=$(random_string)
LDAP_SEARCH_BASE="$LDAP_BASE_DN"
LDAP_BIND_DN="cn=readonly,$LDAP_BASE_DN"
LDAP_BIND_PW=$(random_string)
fi
if [ -f /etc/timezone ]; then
value_default=$(cat /etc/timezone)
elif [ -f /etc/localtime ]; then
value_default=$(readlink /etc/localtime|sed -n 's|^.*zoneinfo/||p')
else
value_default="Europe/Berlin"
fi
read -r -p "Timezone to be used [$value_default]: " new_value
TZ=${new_value:-$value_default}
echo "${PRINT_SETUP_SUCCESS}"
cat <<EOF > "./.env"
# please consult https://github.com/kopano-dev/kopano-docker
# for possible configuration values and their impact
# Access to the Kopano Turn service can be requested at https://portal.kopano.com/content/turn-server-access-request
TURN_USER=
TURN_PASSWORD=
# Defines how Kopano can be accessed from the outside world
FQDN=$FQDN
FQDNCLEANED=${FQDN%:*}
DEFAULTREDIRECT=/meet
EMAIL=$EMAIL
CADDY=2015
HTTP=80
HTTPS=443
TZ=$TZ
LDAP_CONTAINER=$LDAP_CONTAINER
LDAP_ORGANISATION="$LDAP_ORGANISATION"
LDAP_DOMAIN=${FQDN%:*}
LDAP_BASE_DN=$LDAP_BASE_DN
LDAP_SERVER=$LDAP_SERVER
LDAP_ADMIN_PASSWORD=$LDAP_ADMIN_PASSWORD
LDAP_READONLY_USER_PASSWORD=$LDAP_BIND_PW
LDAP_BIND_DN=$LDAP_BIND_DN
LDAP_BIND_PW=$LDAP_BIND_PW
LDAP_SEARCH_BASE=$LDAP_SEARCH_BASE
# Settings for test environments
INSECURE=$INSECURE
# Docker and docker-compose settings
# Docker Repository to push to/pull from
docker_repo=kopano
COMPOSE_PROJECT_NAME=kopano
EOF
else
echo ".env already exists with initial configuration"
echo "If you want to change the configuration, please edit .env directly"
exit 1
fi

Some files were not shown because too many files have changed in this diff Show More