clevertech / YiiBoilerplate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to configure Yii-boilerplate to go for Yii-SES

sallespromanager opened this issue · comments

i am trying to configure a Yii-boilerplate. i still do not understand how to do it.

i am using a single hosted environment, so no development team or local dev machine for now.

i understood I should use environments/params-prod.php and environments/main-prod.php to set up my backend app for a start.

I am using the configs below and running ./runpostdeploy production , every time i change any config file.

what am i doing wrong ?

  • environments/params-prod.php:
    This is to have the application parameters required for the application on production
return array(
    'env.code' => 'prod',
    'connectionString' => 'mysql:host=localhost;dbname=db1',
    'username' => 'uuu',
    'password' => 'zzz',
    // Amazon SES
    'ses.aws.key'=>'xx',
    'ses.aws.secret'=>'yy',
    'ses.aws.verifiedEmail'=>'me@domain.com',
    // this is used in contact page

);

environments/main-prod.php:
The application configuration settings required for the application on production

return array(
            'components' => array(

                'db'=> array(
                    'connectionString' => $params['db.connectionString'],
                    'username' => $params['db.username'],
                    'password' => $params['db.password'],
                    'schemaCachingDuration' => YII_DEBUG ? 0 : 86400000, // 1000 days
                    'enableParamLogging' => YII_DEBUG,
                    'charset' => 'utf8'
                    ),

                'phpThumb'=>array(
                    'class'=>'ext.EPhpThumb.EPhpThumb',
                    'options'=>array(),
                    ),
            ),

            'modules'=>array(

                // Amazon SES
                'ses'=>array(
                    'password'=>'clevertech',
                ),
            )

);

after reading the Wiki many times, it seems it would be very helpful to have example code ( like i am trying to do above ) including the settings needed in the config files ( either local or prod ) to set up a couple of modules and db connection.

tks

Please note that in latest master there is a major rewrite in the configuration and overall setup of the YiiBoilerplate. While new readme and possible wiki articles are underway, you can already check the new codebase and see whether you can setup your project over current YiiBoilerplate yourself.