├── README.md ├── composer.json ├── .gitignore ├── LICENSE └── CHANGELOG.md /README.md: -------------------------------------------------------------------------------- 1 | [![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/) 2 | 3 | # DEPRECATED 4 | 5 | Craft 3 Multi-Environment has been deprecated; if you still want to use it, you can find it in the [cme-.env.php](https://github.com/nystudio107/craft3-multi-environment/tree/cme-.env.php) branch. 6 | 7 | Instead, we suggest using `.env` files as described [Flat Multi-Environment Config for Craft CMS 3](https://nystudio107.com/blog/multi-environment-configuration-for-craft-cms-3) documentation combined with using [Dotenvy](https://github.com/nystudio107/dotenvy) to generate the server configuration. 8 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nystudio107/craft3-multi-environment", 3 | "description": "Efficient and flexible multi-environment config for Craft 3 CMS", 4 | "version": "2.0.0", 5 | "keywords": [ 6 | "craft", 7 | "craftcms", 8 | "multi-environment" 9 | ], 10 | "support": { 11 | "docs": "https://github.com/nystudio107/craft3-multi-environment/blob/master/README.md", 12 | "issues": "https://github.com/nystudio107/craft3-multi-environment/issues" 13 | }, 14 | "license": "MIT", 15 | "authors": [ 16 | { 17 | "name": "nystudio107", 18 | "homepage": "https://nystudio107.com/" 19 | } 20 | ], 21 | "require": { 22 | "php": ">=7.0.0", 23 | "craftcms/cms": "^3.0.0-RC7" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Craft 3 .gitignore 2 | # 3 | # Example .gitignore file for Craft 3 CMS projects 4 | # 5 | # @author nystudio107 6 | # @copyright Copyright (c) 2017 nystudio107 7 | # @link https://nystudio107.com/ 8 | # @package nystudio107/craft 9 | # @since 1.0.0 10 | # @license MIT 11 | 12 | # This file should be renamed to '.gitignore' and placed in your 13 | # Craft 3 CMS project root directory 14 | 15 | # CRAFT ENVIRONMENT 16 | .env.php 17 | .env.sh 18 | .env 19 | 20 | # COMPOSER 21 | /vendor 22 | 23 | # CRAFT STORAGE 24 | /storage/* 25 | 26 | # ASSETS 27 | /web/assets/* 28 | 29 | # BUILD FILES 30 | /bower_components/* 31 | /node_modules/* 32 | /build/* 33 | /yarn-error.log 34 | /npm-debug.log 35 | 36 | # MISC FILES 37 | .cache 38 | .DS_Store 39 | .idea 40 | .project 41 | .settings 42 | *.esproj 43 | *.sublime-workspace 44 | *.sublime-project 45 | *.tmproj 46 | *.tmproject 47 | .vscode/* 48 | !.vscode/settings.json 49 | !.vscode/tasks.json 50 | !.vscode/launch.json 51 | !.vscode/extensions.json 52 | config.codekit3 53 | prepros-6.config 54 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 nystudio107 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Craft 3 Multi-Environment Changelog 2 | 3 | ## 1.0.7 - 2018.01.25 4 | ### Changed 5 | * Deprecated `craft.config.general.custom.baseUrl` and `craft.config.general.custom.basePath` in favor of `alias('@baseUrl')` and `alias('@basePath')` 6 | * Updated `README.md` 7 | 8 | ## 1.0.6 - 2018.01.20 9 | ### Added 10 | * Added `aliases` to `general.php` and `volumes.php` 11 | * Added documentation on aliases to `README.md` 12 | 13 | ### Changed 14 | * Changed `allowAutoUpdates` => `allowUpdates` in `general.php` 15 | 16 | ## 1.0.5 - 2017.11.25 17 | ### Changed 18 | * Refactored custom `general.php` settings into the `custom` key 19 | * Handle empty `$_SERVER['HTTP_HOST']` in the `.env.php` 20 | * Config cleanup 21 | 22 | ## 1.0.4 - 2017.11.20 23 | ### Added 24 | * Added `CRAFTENV_DB_PORT` environmental variable 25 | * Added `staticAssetsVersion`, `baseUrl`, and `basePath` to `general.php` 26 | 27 | ### Changed 28 | * Changed the default values to unique, replaceable placeholder strings 29 | 30 | ## 1.0.3 - 2017.10.28 31 | ### Added 32 | * Added `CRAFTENV_SECURITY_KEY` to `example.env.php` 33 | * Added `securityKey` defaults to `general.php` 34 | * Added `defaultSearchTermOptions` defaults to `general.php` 35 | * Added `isSystemOn` defaults to `general.php` 36 | * Added `backupDbOnUpdate` defaults to `general.php` 37 | * Added Composer support 38 | 39 | ## 1.0.2 - 2017.07.20 40 | ### Changed 41 | * Fixed the `forge-example` to used `fastcgi_param` instead of `SetEnv` (which is for Apache) 42 | * PSR2 code cleanup 43 | * Added `.gitignore` 44 | 45 | ## 1.0.1 - 2017.02.20 46 | ### Changed 47 | * Handle load balancing and shared environments better via a check for `HTTP_X_FORWARDED_PROTO` in the protocol 48 | * General code cleanup 49 | 50 | ## 1.0.0 - 2017.02.1 51 | ### Added 52 | * Ported to Craft 3 53 | 54 | Brought to you by [nystudio107](https://nystudio107.com/) 55 | --------------------------------------------------------------------------------