mirror of
https://github.com/zokradonh/kopano-docker
synced 2025-06-07 16:06:14 +00:00
Unignore compose (#94)
* merge docker-compose.yml-example with docker-compose.yml
This commit is contained in:
parent
94a2b3ad12
commit
8cdd0c63f9
6
.gitignore
vendored
6
.gitignore
vendored
@ -1,9 +1,7 @@
|
|||||||
.vscode/settings.json
|
.vscode/settings.json
|
||||||
**/.vscode
|
**/.vscode
|
||||||
*.yml
|
|
||||||
*.yml-*
|
|
||||||
!.travis.yml
|
!.travis.yml
|
||||||
docker-compose.yml
|
.travis/config.yml
|
||||||
data/*
|
data/*
|
||||||
Makefile-env
|
|
||||||
.env
|
.env
|
||||||
|
*.env
|
||||||
|
2
Makefile
2
Makefile
@ -21,7 +21,7 @@ KOPANO_ZPUSH_REPOSITORY_URL := http://repo.z-hub.io/z-push:/final/Debian_9.0/
|
|||||||
RELEASE_KEY_DOWNLOAD := 0
|
RELEASE_KEY_DOWNLOAD := 0
|
||||||
DOWNLOAD_COMMUNITY_PACKAGES := 1
|
DOWNLOAD_COMMUNITY_PACKAGES := 1
|
||||||
|
|
||||||
COMPOSE_FILE := docker-compose.yml-example
|
COMPOSE_FILE := docker-compose.yml
|
||||||
-include .env
|
-include .env
|
||||||
export
|
export
|
||||||
|
|
||||||
|
@ -22,6 +22,10 @@ This repository contains an easy to replicate recipe to spin up a [Kopano](https
|
|||||||
|
|
||||||
The `docker-compose.yml` file by default pulls Docker containers from 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.
|
The `docker-compose.yml` file by default pulls Docker containers from 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.
|
||||||
|
|
||||||
|
## 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?
|
## 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 dependecy mess in your production 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 dependecy mess in your production environment.
|
||||||
@ -30,7 +34,9 @@ And last but not least this project also offers a `zokradonh/kopano_utils` image
|
|||||||
|
|
||||||
### Need to adjust any values after the initial run of `setup.sh`?
|
### 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 favourite editor. Repeated runs of `setup.sh` will neither modify `docker-compose.yml` nor `.env`. In that file you will also find some given defaults like ldap query filters and the local ports for the reverse proxy.
|
If you want to modify some of the values from the `setup.sh` run you can simply edit `.env` in your favourite 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 `kopano_server.env`. These additional env files are auto created when running `setup.sh`
|
||||||
|
|
||||||
### How to use a newer version than the one available from the Docker Hub?
|
### How to use a newer version than the one available from the Docker Hub?
|
||||||
|
|
||||||
|
@ -39,6 +39,8 @@ services:
|
|||||||
- LDAP_ADMIN_PASSWORD=${LDAP_ADMIN_PASSWORD}
|
- LDAP_ADMIN_PASSWORD=${LDAP_ADMIN_PASSWORD}
|
||||||
- LDAP_READONLY_USER=true
|
- LDAP_READONLY_USER=true
|
||||||
- LDAP_READONLY_USER_PASSWORD=${LDAP_READONLY_USER_PASSWORD}
|
- LDAP_READONLY_USER_PASSWORD=${LDAP_READONLY_USER_PASSWORD}
|
||||||
|
env_file:
|
||||||
|
- ldap.env
|
||||||
command: "--loglevel info --copy-service"
|
command: "--loglevel info --copy-service"
|
||||||
volumes:
|
volumes:
|
||||||
- ldap:/var/lib/ldap
|
- ldap:/var/lib/ldap
|
||||||
@ -89,6 +91,8 @@ services:
|
|||||||
- PASSWORD_MIN_DIGIT=${SELF_SERVICE_PASSWORD_MIN_DIGIT}
|
- PASSWORD_MIN_DIGIT=${SELF_SERVICE_PASSWORD_MIN_DIGIT}
|
||||||
- PASSWORD_MIN_SPECIAL=${SELF_SERVICE_PASSWORD_MIN_SPECIAL}
|
- PASSWORD_MIN_SPECIAL=${SELF_SERVICE_PASSWORD_MIN_SPECIAL}
|
||||||
- PASSWORD_HASH=CRYPT
|
- PASSWORD_HASH=CRYPT
|
||||||
|
env_file:
|
||||||
|
- password-self-service.env
|
||||||
expose:
|
expose:
|
||||||
- "80"
|
- "80"
|
||||||
networks:
|
networks:
|
||||||
@ -141,6 +145,8 @@ services:
|
|||||||
- ENABLE_POSTFIX_VIRTUAL_TRANSPORT=1
|
- ENABLE_POSTFIX_VIRTUAL_TRANSPORT=1
|
||||||
- POSTFIX_DAGENT=lmtp:kopano_dagent:2003
|
- POSTFIX_DAGENT=lmtp:kopano_dagent:2003
|
||||||
- REPORT_RECIPIENT=1
|
- REPORT_RECIPIENT=1
|
||||||
|
env_file:
|
||||||
|
- mail.env
|
||||||
networks:
|
networks:
|
||||||
- kopano-net
|
- kopano-net
|
||||||
- ldap-net
|
- ldap-net
|
||||||
@ -162,6 +168,8 @@ services:
|
|||||||
- MYSQL_USER=${MYSQL_USER}
|
- MYSQL_USER=${MYSQL_USER}
|
||||||
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
|
||||||
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
- MYSQL_DATABASE=${MYSQL_DATABASE}
|
||||||
|
env_file:
|
||||||
|
- db.env
|
||||||
healthcheck:
|
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']
|
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
|
interval: 30s
|
||||||
@ -173,6 +181,8 @@ services:
|
|||||||
kopano_ssl:
|
kopano_ssl:
|
||||||
image: ${docker_repo:?err}/kopano_ssl
|
image: ${docker_repo:?err}/kopano_ssl
|
||||||
container_name: kopano_ssl
|
container_name: kopano_ssl
|
||||||
|
env_file:
|
||||||
|
- kopano_ssl.env
|
||||||
volumes:
|
volumes:
|
||||||
- kopanossl/:/kopano/ssl
|
- kopanossl/:/kopano/ssl
|
||||||
|
|
||||||
@ -215,6 +225,8 @@ services:
|
|||||||
- KCCONF_SERVER_KCOIDC_ISSUER_IDENTIFIER=https://${FQDN}
|
- KCCONF_SERVER_KCOIDC_ISSUER_IDENTIFIER=https://${FQDN}
|
||||||
- KCCONF_SERVER_KCOIDC_INSECURE_SKIP_VERIFY=${INSECURE}
|
- KCCONF_SERVER_KCOIDC_INSECURE_SKIP_VERIFY=${INSECURE}
|
||||||
- KCCONF_SERVER_KCOIDC_INITIALIZE_TIMEOUT=360
|
- KCCONF_SERVER_KCOIDC_INITIALIZE_TIMEOUT=360
|
||||||
|
env_file:
|
||||||
|
- kopano_server.env
|
||||||
networks:
|
networks:
|
||||||
- kopano-net
|
- kopano-net
|
||||||
- ldap-net
|
- ldap-net
|
||||||
@ -234,6 +246,8 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- TZ=${TZ}
|
- TZ=${TZ}
|
||||||
- ADDITIONAL_KOPANO_WEBAPP_PLUGINS=${ADDITIONAL_KOPANO_WEBAPP_PLUGINS}
|
- ADDITIONAL_KOPANO_WEBAPP_PLUGINS=${ADDITIONAL_KOPANO_WEBAPP_PLUGINS}
|
||||||
|
env_file:
|
||||||
|
- kopano_webapp.env
|
||||||
networks:
|
networks:
|
||||||
- web-net
|
- web-net
|
||||||
- kopano-net
|
- kopano-net
|
||||||
@ -248,6 +262,8 @@ services:
|
|||||||
- zpushstates/:/var/lib/z-push/
|
- zpushstates/:/var/lib/z-push/
|
||||||
environment:
|
environment:
|
||||||
- TZ=${TZ}
|
- TZ=${TZ}
|
||||||
|
env_file:
|
||||||
|
- kopano_zpush.env
|
||||||
networks:
|
networks:
|
||||||
- web-net
|
- web-net
|
||||||
- kopano-net
|
- kopano-net
|
||||||
@ -260,6 +276,8 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- SERVICE_TO_START=grapi
|
- SERVICE_TO_START=grapi
|
||||||
- TZ=${TZ}
|
- TZ=${TZ}
|
||||||
|
env_file:
|
||||||
|
- kopano_grapi.env
|
||||||
networks:
|
networks:
|
||||||
- kopano-net
|
- kopano-net
|
||||||
|
|
||||||
@ -278,6 +296,8 @@ services:
|
|||||||
- KCCONF_KAPID_LOG_LEVEL=DEBUG
|
- KCCONF_KAPID_LOG_LEVEL=DEBUG
|
||||||
- KCCONF_KAPID_OIDC_ISSUER_IDENTIFIER=https://${FQDN}
|
- KCCONF_KAPID_OIDC_ISSUER_IDENTIFIER=https://${FQDN}
|
||||||
- KCCONF_KAPID_INSECURE=${INSECURE}
|
- KCCONF_KAPID_INSECURE=${INSECURE}
|
||||||
|
env_file:
|
||||||
|
- kopano_kapi.env
|
||||||
networks:
|
networks:
|
||||||
- kopano-net
|
- kopano-net
|
||||||
- web-net
|
- web-net
|
||||||
@ -293,6 +313,8 @@ services:
|
|||||||
- TZ=${TZ}
|
- TZ=${TZ}
|
||||||
- KCCONF_DAGENT_LOG_LEVEL=3
|
- KCCONF_DAGENT_LOG_LEVEL=3
|
||||||
- KCCONF_DAGENT_SSLKEY_FILE=/kopano/ssl/kdagent.pem
|
- KCCONF_DAGENT_SSLKEY_FILE=/kopano/ssl/kdagent.pem
|
||||||
|
env_file:
|
||||||
|
- kopano_dagent.env
|
||||||
networks:
|
networks:
|
||||||
- kopano-net
|
- kopano-net
|
||||||
|
|
||||||
@ -310,6 +332,8 @@ services:
|
|||||||
- KCCONF_SPOOLER_LOG_LEVEL=3
|
- KCCONF_SPOOLER_LOG_LEVEL=3
|
||||||
- KCCONF_SPOOLER_SMTP_SERVER=mail
|
- KCCONF_SPOOLER_SMTP_SERVER=mail
|
||||||
- KCCONF_SPOOLER_SSLKEY_FILE=/kopano/ssl/kspooler.pem
|
- KCCONF_SPOOLER_SSLKEY_FILE=/kopano/ssl/kspooler.pem
|
||||||
|
env_file:
|
||||||
|
- kopano_spooler.env
|
||||||
networks:
|
networks:
|
||||||
- kopano-net
|
- kopano-net
|
||||||
|
|
||||||
@ -323,7 +347,9 @@ services:
|
|||||||
- SERVICE_TO_START=gateway
|
- SERVICE_TO_START=gateway
|
||||||
- TZ=${TZ}
|
- TZ=${TZ}
|
||||||
- KCCONF_GATEWAY_SERVER_SOCKET=http://kopano_server:236/
|
- KCCONF_GATEWAY_SERVER_SOCKET=http://kopano_server:236/
|
||||||
- KCCONF_GATEWAY_LOG_LEVEL=6
|
- KCCONF_GATEWAY_LOG_LEVEL=3
|
||||||
|
env_file:
|
||||||
|
- kopano_gateway.env
|
||||||
networks:
|
networks:
|
||||||
- kopano-net
|
- kopano-net
|
||||||
|
|
||||||
@ -337,6 +363,8 @@ services:
|
|||||||
- SERVICE_TO_START=ical
|
- SERVICE_TO_START=ical
|
||||||
- TZ=${TZ}
|
- TZ=${TZ}
|
||||||
- KCCONF_ICAL_SERVER_SOCKET=http://kopano_server:236/
|
- KCCONF_ICAL_SERVER_SOCKET=http://kopano_server:236/
|
||||||
|
env_file:
|
||||||
|
- kopano_ical.env
|
||||||
networks:
|
networks:
|
||||||
- kopano-net
|
- kopano-net
|
||||||
|
|
||||||
@ -349,6 +377,8 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- SERVICE_TO_START=monitor
|
- SERVICE_TO_START=monitor
|
||||||
- TZ=${TZ}
|
- TZ=${TZ}
|
||||||
|
env_file:
|
||||||
|
- kopano_monitor.env
|
||||||
networks:
|
networks:
|
||||||
- kopano-net
|
- kopano-net
|
||||||
|
|
||||||
@ -362,6 +392,8 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- SERVICE_TO_START=search
|
- SERVICE_TO_START=search
|
||||||
- TZ=${TZ}
|
- TZ=${TZ}
|
||||||
|
env_file:
|
||||||
|
- kopano_search.env
|
||||||
networks:
|
networks:
|
||||||
- kopano-net
|
- kopano-net
|
||||||
|
|
||||||
@ -374,6 +406,8 @@ services:
|
|||||||
- kopanosocket/:/run/kopano
|
- kopanosocket/:/run/kopano
|
||||||
environment:
|
environment:
|
||||||
- FQDN=${FQDN}
|
- FQDN=${FQDN}
|
||||||
|
env_file:
|
||||||
|
- kopano_konnect.env
|
||||||
networks:
|
networks:
|
||||||
- kopano-net
|
- kopano-net
|
||||||
- web-net
|
- web-net
|
||||||
@ -392,6 +426,8 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- INSECURE=${INSECURE}
|
- INSECURE=${INSECURE}
|
||||||
- oidc_issuer_identifier=https://${FQDN}
|
- oidc_issuer_identifier=https://${FQDN}
|
||||||
|
env_file:
|
||||||
|
- kopano_kwmserver.env
|
||||||
volumes:
|
volumes:
|
||||||
- kopanossl/:/kopano/ssl
|
- kopanossl/:/kopano/ssl
|
||||||
networks:
|
networks:
|
||||||
@ -403,6 +439,8 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
- SERVICE_TO_START=meet
|
- SERVICE_TO_START=meet
|
||||||
- KCCONF_KWEBD_TLS=no
|
- KCCONF_KWEBD_TLS=no
|
||||||
|
env_file:
|
||||||
|
- kopano_meet.env
|
||||||
depends_on:
|
depends_on:
|
||||||
- kopano_kapi
|
- kopano_kapi
|
||||||
- kopano_konnect
|
- kopano_konnect
|
10
setup.sh
10
setup.sh
@ -10,11 +10,6 @@ random_string() {
|
|||||||
hexdump -n 16 -v -e '/1 "%02X"' /dev/urandom
|
hexdump -n 16 -v -e '/1 "%02X"' /dev/urandom
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ ! -e ./docker-compose.yml ]; then
|
|
||||||
echo "copying example compose file"
|
|
||||||
cp docker-compose.yml-example docker-compose.yml
|
|
||||||
fi
|
|
||||||
|
|
||||||
LANG_OPTIONS=("de-at" "de-ch" "de-de" "en" "en-gb" "es" "fr" "it" "nl" "pl-pl")
|
LANG_OPTIONS=("de-at" "de-ch" "de-de" "en" "en-gb" "es" "fr" "it" "nl" "pl-pl")
|
||||||
PLUGIN_OPTIONS=("contactfax" "desktopnotifications" "filepreviewer" "files" "filesbackend-smb" "filesbackend-owncloud" "folderwidgets" "gmaps" "intranet" "mattermost" "mdm" "pimfolder" "quickitems" "smime" "titlecounter" "webappmanual" "zdeveloper")
|
PLUGIN_OPTIONS=("contactfax" "desktopnotifications" "filepreviewer" "files" "filesbackend-smb" "filesbackend-owncloud" "folderwidgets" "gmaps" "intranet" "mattermost" "mdm" "pimfolder" "quickitems" "smime" "titlecounter" "webappmanual" "zdeveloper")
|
||||||
|
|
||||||
@ -69,6 +64,11 @@ docker_tag_search () {
|
|||||||
echo "$results" | xargs -n1 | sort -ru | xargs
|
echo "$results" | xargs -n1 | sort -ru | xargs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "Creating individual env files for containers (if they do not exist already)"
|
||||||
|
for dockerenv in ldap password-self-service mail db kopano_ssl kopano_server kopano_webapp kopano_zpush kopano_grapi kopano_kapi kopano_dagent kopano_spooler kopano_gateway kopano_ical kopano_monitor kopano_search kopano_konnect kopano_kwmserver kopano_meet; do
|
||||||
|
touch ./"$dockerenv".env
|
||||||
|
done
|
||||||
|
|
||||||
if [ ! -e ./.env ]; then
|
if [ ! -e ./.env ]; then
|
||||||
PRINT_SETUP_SUCCESS=""
|
PRINT_SETUP_SUCCESS=""
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user