Skip to content

Commit

Permalink
use submodules for envs dev
Browse files Browse the repository at this point in the history
  • Loading branch information
nadar committed Dec 13, 2017
1 parent f6203ce commit 15ed24f
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 157 deletions.
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "envs/dev/modules/luya-module-admin"]
path = envs/dev/modules/luya-module-admin
url = [email protected]:luyadev/luya-module-admin.git
[submodule "envs/dev/modules/luya-module-cms"]
path = envs/dev/modules/luya-module-cms
url = [email protected]:luyadev/luya-module-cms.git
10 changes: 6 additions & 4 deletions envs/dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ Dev Environment

1. Open `dev` folder in your Terminal.
2. Install Dependencies `composer install`
3. Rename `env.php.dist` to `env.php` and modify your *Database connection component* to match your local env settings.
4. Change to the *public_html* folder with `cd public_html`
5. Execute `php index.php migrate`, then import files into database `php index.php import` and afterwards execute the setup command `php index.php admin/setup`.
6. Access the *public_html* folder in your browser and your ready to go!
3. Initialize submodules: `git submodule init`
3b. Update the head for your submodules: `git submodule update`
4. Rename `env.php.dist` to `env.php` and modify your *Database connection component* to match your local env settings.
5. Change to the *public_html* folder with `cd public_html`
6. Execute `php index.php migrate`, then import files into database `php index.php import` and afterwards execute the setup command `php index.php admin/setup`.
7. Access the *public_html* folder in your browser and your ready to go!

+ [Installation instructions](https://luya.io/guide/install)
+ [API Documentation](https://luya.io/api)
Expand Down
22 changes: 5 additions & 17 deletions envs/dev/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"jakeasmith/http_build_url" : "^0.1",
"ifsnop/mysqldump-php":"2.*",
"paypal/rest-api-sdk-php" : "~1.6.0",
"luyadev/luya-composer": "^1.0",
"luyadev/luya-composer": "~1.0.0",
"luyadev/luya-bootstrap4": "^1.0@dev",
"luyadev/luya-generic" : "^1.0@dev",
"luyadev/luya-bootstrap3" : "^1.0@dev"
"luyadev/luya-generic" : "~1.0.0",
"luyadev/luya-bootstrap3" : "~1.0.0"
},
"extra": {
"asset-installer-paths": {
Expand All @@ -25,21 +25,9 @@
"autoload" : {
"psr-4" : {
"ngresttest\\" : "modules/ngresttest",
"moduletest\\" : "modules/moduletest",
"luya\\" : "../../core/",
"luya\\admin\\" : "../../modules/admin/src",
"luya\\cms\\" : "../../modules/cms/src",
"luya\\crawler\\" : "../../modules/crawler/src",
"luya\\errorapi\\" : "../../modules/errorapi/src",
"luya\\gallery\\" : "../../modules/gallery/src",
"luya\\frontendgroup\\" : "../../modules/frontendgroup/src",
"luya\\news\\" : "../../modules/news/src",
"luya\\remoteadmin\\" : "../../modules/remoteadmin/src",
"luya\\styleguide\\" : "../../modules/styleguide/src",
"luya\\payment\\" : "../../../luya-module-payment/src",
"luya\\basicauth\\" : "../../../luya-module-basicauth/src",
"luya\\bootstrap4\\" : "../../../luya-bootstrap4/src",
"luya\\estore\\" : "../../../luya-module-estore/src/"
"luya\\admin\\" : "modules/luya-module-admin/src",
"luya\\cms\\" : "modules/luya-module-cms/src"
}
}
}
55 changes: 26 additions & 29 deletions envs/dev/configs/env.php.dist
Original file line number Diff line number Diff line change
@@ -1,56 +1,53 @@
<?php

defined('YII_DEBUG') or define('YII_DEBUG', true);
defined('YII_ENV') or define('YII_ENV', 'dev');
define('YII_DEBUG', true);
define('YII_ENV', 'dev');

$config = [
return [
'id' => 'testenv', // For best interoperability it is recommended that you use only alphanumeric characters when specifying an application ID
'siteTitle' => 'Test-Env', // The name of your site, will be display on the login screen
'basePath' => dirname(__DIR__),
'defaultRoute' => 'cms', // set the default module
'modules' => [
'modules' => [
// locale
'ngresttestadmin' => 'ngresttest\Module',

// modules folder
'cms' => 'luya\cms\frontend\Module',
'cmsadmin' => 'luya\cms\admin\Module',
'admin' => 'luya\admin\Module',
'crawler' => [
'class' => 'luya\crawler\frontend\Module',
'baseUrl' => 'http://luya.io',
'cmsadmin' => [
'class' => 'luya\cms\admin\Module',
],
'admin' => [
'class' => 'luya\admin\Module',
'interfaceLanguage' => 'ru',
'secureLogin' => false,
],
'crawleradmin' => 'luya\crawler\admin\Module',
'news' => 'luya\news\frontend\Module',
'newsadmin' => 'luya\news\admin\Module',

// yii2
'gii' => 'yii\gii\Module',
'debug' => 'yii\debug\Module',
],
'components' => [
'mail' => [
],
'errorHandler' => [
'mail' => [
'password' => 'HalloZephir2015!',
],
'errorHandler' => [
'transferException' => false,
],
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=localhost;dbname=DB_NAME',
'dsn' => 'mysql:host=localhost;dbname=luya_envs_dev',
// 'dsn' => 'mysql:host=localhost;dbname=DB_NAME;unix_socket=/Applications/MAMP/tmp/mysql/mysql.sock', // OSX MAMP
// 'dsn' => 'mysql:host=localhost;dbname=DB_NAME;/Applications/XAMPP/xamppfiles/var/mysql/mysql.sock', // OSX XAMPP
'username' => '',
'password' => '',
'username' => 'root',
'password' => 'defaultPassword',
'charset' => 'utf8'
],
'cache' => [
'class' => 'yii\caching\DummyCache',
],
'assetManager' => [
'class' => 'luya\web\AssetManager',
'linkAssets' => true,
],
'class' => 'luya\web\AssetManager',
'linkAssets' => true,
],
],
'bootstrap' => [
'luya\cms\frontend\Bootstrap', 'debug'
'debug', 'luya\cms\frontend\Bootstrap', // 'nord\yii\account\Bootstrap',
]
];

return $config;
];
18 changes: 0 additions & 18 deletions envs/dev/modules/contactmanager/README.md

This file was deleted.

12 changes: 0 additions & 12 deletions envs/dev/modules/contactmanager/admin/Module.php

This file was deleted.

15 changes: 0 additions & 15 deletions envs/dev/modules/contactmanager/frontend/Module.php

This file was deleted.

This file was deleted.

33 changes: 0 additions & 33 deletions envs/dev/modules/contactmanager/frontend/views/default/index.php

This file was deleted.

1 change: 1 addition & 0 deletions envs/dev/modules/luya-module-admin
Submodule luya-module-admin added at 215fd1
1 change: 1 addition & 0 deletions envs/dev/modules/luya-module-cms
Submodule luya-module-cms added at 058243

0 comments on commit 15ed24f

Please sign in to comment.