# Copyright 2019 TeamTalk Remix Team
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v1
kind: Secret
metadata:
  name: teamtalk-ng-dashboard
  labels:
    app: teamtalk-ng
    component: dashboard
stringData:
  database.php: |
    <?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

    $active_group = 'default';
    $active_record = TRUE;

    $db['default']['hostname'] = 'teamtalk-ng-db';
    $db['default']['username'] = 'teamtalk';
    $db['default']['password'] = 'changeme';
    $db['default']['database'] = 'teamtalk';
    $db['default']['dbdriver'] = 'mysql';
    $db['default']['dbprefix'] = '';
    $db['default']['pconnect'] = TRUE;
    $db['default']['db_debug'] = TRUE;
    $db['default']['cache_on'] = FALSE;
    $db['default']['cachedir'] = '';
    $db['default']['char_set'] = 'utf8';
    $db['default']['dbcollat'] = 'utf8_general_ci';
    $db['default']['swap_pre'] = '';
    $db['default']['autoinit'] = TRUE;
    $db['default']['stricton'] = FALSE;

    /* End of file database.php */
    /* Location: ./application/config/database.php */

  config.php: |
    <?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
    $config['base_url']	= '';
    $config['msfs_url'] = 'http://teamtalk-ng-msfs:8700/';
    $config['http_url'] = 'http://teamtalk-ng-http-msg:8400/';

    $config['index_page'] = '';
    $config['uri_protocol']	= 'PATH_INFO';
    $config['url_suffix'] = '';
    $config['language']	= 'english';
    $config['charset'] = 'UTF-8';
    $config['enable_hooks'] = FALSE;
    $config['subclass_prefix'] = 'MY_';
    $config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
    $config['allow_get_array']		= TRUE;
    $config['enable_query_strings'] = FALSE;
    $config['controller_trigger']	= 'c';
    $config['function_trigger']		= 'm';
    $config['directory_trigger']	= 'd'; // experimental not currently in use
    $config['log_threshold'] = 0;
    $config['log_path'] = '';
    $config['log_date_format'] = 'Y-m-d H:i:s';
    $config['cache_path'] = '';
    $config['encryption_key'] = 'TeamTalk';
    $config['sess_cookie_name']		= 'ci_session';
    $config['sess_expiration']		= 7200;
    $config['sess_expire_on_close']	= FALSE;
    $config['sess_encrypt_cookie']	= FALSE;
    $config['sess_use_database']	= FALSE;
    $config['sess_table_name']		= 'ci_sessions';
    $config['sess_match_ip']		= FALSE;
    $config['sess_match_useragent']	= TRUE;
    $config['sess_time_to_update']	= 300;
    $config['cookie_prefix']	= "";
    $config['cookie_domain']	= "";
    $config['cookie_path']		= "/";
    $config['cookie_secure']	= FALSE;
    $config['global_xss_filtering'] = FALSE;
    $config['csrf_protection'] = FALSE;
    $config['csrf_token_name'] = 'csrf_test_name';
    $config['csrf_cookie_name'] = 'csrf_cookie_name';
    $config['csrf_expire'] = 7200;
    $config['compress_output'] = FALSE;
    $config['time_reference'] = 'local';
    $config['rewrite_short_tags'] = FALSE;
    $config['proxy_ips'] = '';
    /* End of file config.php */
    /* Location: ./application/config/config.php */
