Add docker support
This commit is contained in:
parent
56daa40ffb
commit
0d5ab221d5
2 changed files with 33 additions and 0 deletions
|
@ -263,6 +263,12 @@ variables (e.g. `URL_BASE_TRUSTED=https://mailtrain.domain.com (and more env-var
|
||||||
| LDAP_UIDTAG | LDAP UID tag (e.g. uid/cn/username) |
|
| LDAP_UIDTAG | LDAP UID tag (e.g. uid/cn/username) |
|
||||||
| WITH_ZONE_MTA | enables or disables builtin Zone-MTA (default: true) |
|
| WITH_ZONE_MTA | enables or disables builtin Zone-MTA (default: true) |
|
||||||
| POOL_NAME | sets builtin Zone-MTA pool name (default: os.hostname()) |
|
| POOL_NAME | sets builtin Zone-MTA pool name (default: os.hostname()) |
|
||||||
|
| WITH_CAS | use if you want to use CAS |
|
||||||
|
| CAS_URL | CAS base URL |
|
||||||
|
| CAS_NAMETAG | The field used to save the name (default: username) |
|
||||||
|
| CAS_MAILTAG | The field used to save the email (default: mail) |
|
||||||
|
| CAS_NEWUSERROLE | The role of new users (default: nobody) |
|
||||||
|
| CAS_NEWUSERNAMESPACEID | The namespace id of new users (default: 1) |
|
||||||
|
|
||||||
If you don't want to modify the original `docker-compose.yml`, you can put your overrides to another file (e.g. `docker-compose.override.yml`) -- like the one below.
|
If you don't want to modify the original `docker-compose.yml`, you can put your overrides to another file (e.g. `docker-compose.override.yml`) -- like the one below.
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,12 @@ LDAP_UIDTAG=${LDAP_UIDTAG:-'username'}
|
||||||
LDAP_MAILTAG=${LDAP_MAILTAG:-'mail'}
|
LDAP_MAILTAG=${LDAP_MAILTAG:-'mail'}
|
||||||
LDAP_NAMETAG=${LDAP_NAMETAG:-'username'}
|
LDAP_NAMETAG=${LDAP_NAMETAG:-'username'}
|
||||||
LDAP_METHOD=${LDAP_METHOD:-'ldapjs'}
|
LDAP_METHOD=${LDAP_METHOD:-'ldapjs'}
|
||||||
|
WITH_CAS=${WITH_CAS:-'false'}
|
||||||
|
CAS_URL=${CAS_URL:-'https://example.cas-server.com'}
|
||||||
|
CAS_NAMETAG=${CAS_NAMETAG:-'username'}
|
||||||
|
CAS_MAILTAG=${CAS_MAILTAG:-'mail'}
|
||||||
|
CAS_NEWUSERROLE=${CAS_NEWUSERROLE:-'nobody'}
|
||||||
|
CAS_NEWUSERNAMESPACEID=${CAS_NEWUSERNAMESPACEID:-'1'}
|
||||||
MONGO_HOST=${MONGO_HOST:-'mongo'}
|
MONGO_HOST=${MONGO_HOST:-'mongo'}
|
||||||
WITH_REDIS=${WITH_REDIS:-'true'}
|
WITH_REDIS=${WITH_REDIS:-'true'}
|
||||||
REDIS_HOST=${REDIS_HOST:-'redis'}
|
REDIS_HOST=${REDIS_HOST:-'redis'}
|
||||||
|
@ -110,6 +116,27 @@ ldap:
|
||||||
EOT
|
EOT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Manage CAS if enabled
|
||||||
|
if [ "$WITH_CAS" = "true" ]; then
|
||||||
|
echo 'Info: CAS enabled'
|
||||||
|
cat >> server/config/production.yaml <<EOT
|
||||||
|
cas:
|
||||||
|
enabled: true
|
||||||
|
url: $CAS_URL
|
||||||
|
nameTag: $CAS_NAMETAG
|
||||||
|
mailTag: $CAS_MAILTAG
|
||||||
|
newUserRole: $CAS_NEWUSERROLE
|
||||||
|
newUserNamespaceId: $CAS_NEWUSERNAMESPACEID
|
||||||
|
|
||||||
|
EOT
|
||||||
|
else
|
||||||
|
echo 'Info: CAS not enabled'
|
||||||
|
cat >> server/config/production.yaml <<EOT
|
||||||
|
cas:
|
||||||
|
enabled: false
|
||||||
|
EOT
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f server/services/workers/reports/config/production.yaml ]; then
|
if [ -f server/services/workers/reports/config/production.yaml ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue