0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-04-19 18:36:09 +02:00

Config redis and smtp using env vars.

This commit is contained in:
Rodrigo Aguilera 2018-03-23 21:44:03 +01:00
parent bb42fcfaed
commit e2c8feefde
20 changed files with 250 additions and 0 deletions

10
.config/redis.config.php Normal file
View file

@ -0,0 +1,10 @@
<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_PORT') ?: 6379,
),
);
}

15
.config/smtp.config.php Normal file
View file

@ -0,0 +1,15 @@
<?php
if (getenv('MAIL_SMTPMODE') == 'smtp') {
$CONFIG = array (
'mail_smtpmode' => getenv('MAIL_SMTPMODE'),
'mail_smtphost' => getenv('MAIL_SMTPHOST'),
'mail_smtpport' => getenv('MAIL_SMTPPORT'),
'mail_smtpsecure' => getenv('MAIL_SMTPSECURE'),
'mail_smtpauth' => getenv('MAIL_SMTPAUTH'),
'mail_smtpauthtype' => getenv('MAIL_SMTPAUTHTYPE'),
'mail_smtpname' => getenv('MAIL_SMTPNAME'),
'mail_smtppassword' => getenv('MAIL_SMTPPASSWORD'),
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -0,0 +1,10 @@
<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_PORT') ?: 6379,
),
);
}

View file

@ -0,0 +1,15 @@
<?php
if (getenv('MAIL_SMTPMODE') == 'smtp') {
$CONFIG = array (
'mail_smtpmode' => getenv('MAIL_SMTPMODE'),
'mail_smtphost' => getenv('MAIL_SMTPHOST'),
'mail_smtpport' => getenv('MAIL_SMTPPORT'),
'mail_smtpsecure' => getenv('MAIL_SMTPSECURE'),
'mail_smtpauth' => getenv('MAIL_SMTPAUTH'),
'mail_smtpauthtype' => getenv('MAIL_SMTPAUTHTYPE'),
'mail_smtpname' => getenv('MAIL_SMTPNAME'),
'mail_smtppassword' => getenv('MAIL_SMTPPASSWORD'),
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -0,0 +1,10 @@
<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_PORT') ?: 6379,
),
);
}

View file

@ -0,0 +1,15 @@
<?php
if (getenv('MAIL_SMTPMODE') == 'smtp') {
$CONFIG = array (
'mail_smtpmode' => getenv('MAIL_SMTPMODE'),
'mail_smtphost' => getenv('MAIL_SMTPHOST'),
'mail_smtpport' => getenv('MAIL_SMTPPORT'),
'mail_smtpsecure' => getenv('MAIL_SMTPSECURE'),
'mail_smtpauth' => getenv('MAIL_SMTPAUTH'),
'mail_smtpauthtype' => getenv('MAIL_SMTPAUTHTYPE'),
'mail_smtpname' => getenv('MAIL_SMTPNAME'),
'mail_smtppassword' => getenv('MAIL_SMTPPASSWORD'),
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -0,0 +1,10 @@
<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_PORT') ?: 6379,
),
);
}

View file

@ -0,0 +1,15 @@
<?php
if (getenv('MAIL_SMTPMODE') == 'smtp') {
$CONFIG = array (
'mail_smtpmode' => getenv('MAIL_SMTPMODE'),
'mail_smtphost' => getenv('MAIL_SMTPHOST'),
'mail_smtpport' => getenv('MAIL_SMTPPORT'),
'mail_smtpsecure' => getenv('MAIL_SMTPSECURE'),
'mail_smtpauth' => getenv('MAIL_SMTPAUTH'),
'mail_smtpauthtype' => getenv('MAIL_SMTPAUTHTYPE'),
'mail_smtpname' => getenv('MAIL_SMTPNAME'),
'mail_smtppassword' => getenv('MAIL_SMTPPASSWORD'),
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -0,0 +1,10 @@
<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_PORT') ?: 6379,
),
);
}

View file

@ -0,0 +1,15 @@
<?php
if (getenv('MAIL_SMTPMODE') == 'smtp') {
$CONFIG = array (
'mail_smtpmode' => getenv('MAIL_SMTPMODE'),
'mail_smtphost' => getenv('MAIL_SMTPHOST'),
'mail_smtpport' => getenv('MAIL_SMTPPORT'),
'mail_smtpsecure' => getenv('MAIL_SMTPSECURE'),
'mail_smtpauth' => getenv('MAIL_SMTPAUTH'),
'mail_smtpauthtype' => getenv('MAIL_SMTPAUTHTYPE'),
'mail_smtpname' => getenv('MAIL_SMTPNAME'),
'mail_smtppassword' => getenv('MAIL_SMTPPASSWORD'),
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -0,0 +1,10 @@
<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_PORT') ?: 6379,
),
);
}

View file

@ -0,0 +1,15 @@
<?php
if (getenv('MAIL_SMTPMODE') == 'smtp') {
$CONFIG = array (
'mail_smtpmode' => getenv('MAIL_SMTPMODE'),
'mail_smtphost' => getenv('MAIL_SMTPHOST'),
'mail_smtpport' => getenv('MAIL_SMTPPORT'),
'mail_smtpsecure' => getenv('MAIL_SMTPSECURE'),
'mail_smtpauth' => getenv('MAIL_SMTPAUTH'),
'mail_smtpauthtype' => getenv('MAIL_SMTPAUTHTYPE'),
'mail_smtpname' => getenv('MAIL_SMTPNAME'),
'mail_smtppassword' => getenv('MAIL_SMTPPASSWORD'),
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -0,0 +1,10 @@
<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_PORT') ?: 6379,
),
);
}

View file

@ -0,0 +1,15 @@
<?php
if (getenv('MAIL_SMTPMODE') == 'smtp') {
$CONFIG = array (
'mail_smtpmode' => getenv('MAIL_SMTPMODE'),
'mail_smtphost' => getenv('MAIL_SMTPHOST'),
'mail_smtpport' => getenv('MAIL_SMTPPORT'),
'mail_smtpsecure' => getenv('MAIL_SMTPSECURE'),
'mail_smtpauth' => getenv('MAIL_SMTPAUTH'),
'mail_smtpauthtype' => getenv('MAIL_SMTPAUTHTYPE'),
'mail_smtpname' => getenv('MAIL_SMTPNAME'),
'mail_smtppassword' => getenv('MAIL_SMTPPASSWORD'),
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -0,0 +1,10 @@
<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_PORT') ?: 6379,
),
);
}

View file

@ -0,0 +1,15 @@
<?php
if (getenv('MAIL_SMTPMODE') == 'smtp') {
$CONFIG = array (
'mail_smtpmode' => getenv('MAIL_SMTPMODE'),
'mail_smtphost' => getenv('MAIL_SMTPHOST'),
'mail_smtpport' => getenv('MAIL_SMTPPORT'),
'mail_smtpsecure' => getenv('MAIL_SMTPSECURE'),
'mail_smtpauth' => getenv('MAIL_SMTPAUTH'),
'mail_smtpauthtype' => getenv('MAIL_SMTPAUTHTYPE'),
'mail_smtpname' => getenv('MAIL_SMTPNAME'),
'mail_smtppassword' => getenv('MAIL_SMTPPASSWORD'),
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -0,0 +1,10 @@
<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_PORT') ?: 6379,
),
);
}

View file

@ -0,0 +1,15 @@
<?php
if (getenv('MAIL_SMTPMODE') == 'smtp') {
$CONFIG = array (
'mail_smtpmode' => getenv('MAIL_SMTPMODE'),
'mail_smtphost' => getenv('MAIL_SMTPHOST'),
'mail_smtpport' => getenv('MAIL_SMTPPORT'),
'mail_smtpsecure' => getenv('MAIL_SMTPSECURE'),
'mail_smtpauth' => getenv('MAIL_SMTPAUTH'),
'mail_smtpauthtype' => getenv('MAIL_SMTPAUTHTYPE'),
'mail_smtpname' => getenv('MAIL_SMTPNAME'),
'mail_smtppassword' => getenv('MAIL_SMTPPASSWORD'),
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}

View file

@ -0,0 +1,10 @@
<?php
if (getenv('REDIS_HOST')) {
$CONFIG = array (
'memcache.locking' => '\OC\Memcache\Redis',
'redis' => array(
'host' => getenv('REDIS_HOST'),
'port' => getenv('REDIS_PORT') ?: 6379,
),
);
}

View file

@ -0,0 +1,15 @@
<?php
if (getenv('MAIL_SMTPMODE') == 'smtp') {
$CONFIG = array (
'mail_smtpmode' => getenv('MAIL_SMTPMODE'),
'mail_smtphost' => getenv('MAIL_SMTPHOST'),
'mail_smtpport' => getenv('MAIL_SMTPPORT'),
'mail_smtpsecure' => getenv('MAIL_SMTPSECURE'),
'mail_smtpauth' => getenv('MAIL_SMTPAUTH'),
'mail_smtpauthtype' => getenv('MAIL_SMTPAUTHTYPE'),
'mail_smtpname' => getenv('MAIL_SMTPNAME'),
'mail_smtppassword' => getenv('MAIL_SMTPPASSWORD'),
'mail_from_address' => getenv('MAIL_FROM_ADDRESS'),
'mail_domain' => getenv('MAIL_DOMAIN'),
);
}