mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-10-22 17:05:33 +02:00
Merge pull request #193 from open-sausages/pulls/4.0/recipe-concept
API Convert installer to recipe
This commit is contained in:
commit
dd2ebad5dc
@ -10,5 +10,8 @@
|
|||||||
"tests": [
|
"tests": [
|
||||||
"vendor/bin/phpunit framework/tests/php",
|
"vendor/bin/phpunit framework/tests/php",
|
||||||
"vendor/bin/phpunit cms/tests"
|
"vendor/bin/phpunit cms/tests"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"silverstripe/recipe-plugin"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
59
.htaccess
59
.htaccess
@ -1,59 +0,0 @@
|
|||||||
### SILVERSTRIPE START ###
|
|
||||||
|
|
||||||
# Deny access to templates (but allow from localhost)
|
|
||||||
<Files *.ss>
|
|
||||||
Order deny,allow
|
|
||||||
Deny from all
|
|
||||||
Allow from 127.0.0.1
|
|
||||||
</Files>
|
|
||||||
|
|
||||||
# Deny access to IIS configuration
|
|
||||||
<Files web.config>
|
|
||||||
Order deny,allow
|
|
||||||
Deny from all
|
|
||||||
</Files>
|
|
||||||
|
|
||||||
# Deny access to YAML configuration files which might include sensitive information
|
|
||||||
<Files ~ "\.ya?ml$">
|
|
||||||
Order allow,deny
|
|
||||||
Deny from all
|
|
||||||
</Files>
|
|
||||||
|
|
||||||
# Route errors to static pages automatically generated by SilverStripe
|
|
||||||
ErrorDocument 404 /assets/error-404.html
|
|
||||||
ErrorDocument 500 /assets/error-500.html
|
|
||||||
|
|
||||||
<IfModule mod_rewrite.c>
|
|
||||||
|
|
||||||
# Turn off index.php handling requests to the homepage fixes issue in apache >=2.4
|
|
||||||
<IfModule mod_dir.c>
|
|
||||||
DirectoryIndex disabled
|
|
||||||
DirectorySlash Off
|
|
||||||
</IfModule>
|
|
||||||
|
|
||||||
SetEnv HTTP_MOD_REWRITE On
|
|
||||||
RewriteEngine On
|
|
||||||
|
|
||||||
# Enable HTTP Basic authentication workaround for PHP running in CGI mode
|
|
||||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
|
||||||
|
|
||||||
# Deny access to potentially sensitive files and folders
|
|
||||||
RewriteRule ^\.env - [F,L,NC]
|
|
||||||
RewriteRule ^vendor(/|$) - [F,L,NC]
|
|
||||||
RewriteRule silverstripe-cache(/|$) - [F,L,NC]
|
|
||||||
RewriteRule composer\.(json|lock) - [F,L,NC]
|
|
||||||
RewriteRule (error|silverstripe|debug)\.log - [F,L,NC]
|
|
||||||
|
|
||||||
# Process through SilverStripe if no file with the requested name exists.
|
|
||||||
# Pass through the original path as a query parameter, and retain the existing parameters.
|
|
||||||
RewriteCond %{REQUEST_URI} ^(.*)$
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
|
||||||
RewriteRule .* framework/main.php?url=%1 [QSA]
|
|
||||||
|
|
||||||
# If framework isn't in a subdirectory, rewrite to installer
|
|
||||||
RewriteCond %{REQUEST_URI} ^(.*)/framework/main.php$
|
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
|
||||||
RewriteRule . %1/install.php? [R,L]
|
|
||||||
|
|
||||||
</IfModule>
|
|
||||||
### SILVERSTRIPE END ###
|
|
@ -1,26 +1,26 @@
|
|||||||
{
|
{
|
||||||
"name": "silverstripe/installer",
|
"name": "silverstripe/installer",
|
||||||
|
"type": "silverstripe-recipe",
|
||||||
"description": "The SilverStripe Framework Installer",
|
"description": "The SilverStripe Framework Installer",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=5.6.0",
|
"php": ">=5.6.0",
|
||||||
"silverstripe/admin": "1.0.x-dev",
|
"silverstripe/recipe-plugin": "^0.1",
|
||||||
"silverstripe/asset-admin": "1.0.x-dev",
|
"silverstripe/recipe-cms": "1.0.x-dev",
|
||||||
"silverstripe/assets": "1.0.x-dev",
|
|
||||||
"silverstripe/campaign-admin": "1.0.x-dev",
|
|
||||||
"silverstripe/cms": "4.0.x-dev",
|
|
||||||
"silverstripe/config": "1.0.x-dev",
|
|
||||||
"silverstripe/errorpage": "1.0.x-dev",
|
|
||||||
"silverstripe/framework": "4.0.x-dev",
|
|
||||||
"silverstripe/graphql": "0.2.x-dev",
|
|
||||||
"silverstripe/reports": "4.0.x-dev",
|
|
||||||
"silverstripe/siteconfig": "4.0.x-dev",
|
|
||||||
"silverstripe/versioned": "1.0.x-dev",
|
|
||||||
"silverstripe-themes/simple": "~3.2.0"
|
"silverstripe-themes/simple": "~3.2.0"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/PHPUnit": "^5.7"
|
"phpunit/PHPUnit": "^5.7"
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
|
"project-files": [
|
||||||
|
"assets/*",
|
||||||
|
"mysite/_config/*",
|
||||||
|
"index.php",
|
||||||
|
"install.php",
|
||||||
|
".env.example",
|
||||||
|
"favicon.ico",
|
||||||
|
"install-frameworkmissing.html"
|
||||||
|
],
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"4.x-dev": "4.0.x-dev",
|
"4.x-dev": "4.0.x-dev",
|
||||||
"dev-master": "5.x-dev"
|
"dev-master": "5.x-dev"
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
<FilesMatch "\.(php|php3|php4|php5|phtml|inc)$">
|
|
||||||
Deny from all
|
|
||||||
</FilesMatch>
|
|
@ -1 +0,0 @@
|
|||||||
<?php
|
|
@ -1,10 +0,0 @@
|
|||||||
---
|
|
||||||
Name: mysite
|
|
||||||
---
|
|
||||||
# YAML configuration for SilverStripe
|
|
||||||
# See http://doc.silverstripe.org/framework/en/topics/configuration
|
|
||||||
# Caution: Indentation through two spaces, not tabs
|
|
||||||
SilverStripe\View\SSViewer:
|
|
||||||
themes:
|
|
||||||
- 'simple'
|
|
||||||
- '$default'
|
|
7
mysite/_config/theme.yml
Normal file
7
mysite/_config/theme.yml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
Name: mytheme
|
||||||
|
---
|
||||||
|
SilverStripe\View\SSViewer:
|
||||||
|
themes:
|
||||||
|
- 'simple'
|
||||||
|
- '$default'
|
@ -1,12 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use SilverStripe\CMS\Model\SiteTree;
|
|
||||||
|
|
||||||
class Page extends SiteTree
|
|
||||||
{
|
|
||||||
private static $db = array(
|
|
||||||
);
|
|
||||||
|
|
||||||
private static $has_one = array(
|
|
||||||
);
|
|
||||||
}
|
|
@ -1,32 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use SilverStripe\CMS\Controllers\ContentController;
|
|
||||||
|
|
||||||
class PageController extends ContentController
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* An array of actions that can be accessed via a request. Each array element should be an action name, and the
|
|
||||||
* permissions or conditions required to allow the user to access it.
|
|
||||||
*
|
|
||||||
* <code>
|
|
||||||
* array (
|
|
||||||
* 'action', // anyone can access this action
|
|
||||||
* 'action' => true, // same as above
|
|
||||||
* 'action' => 'ADMIN', // you must have ADMIN permissions to access this action
|
|
||||||
* 'action' => '->checkAction' // you can only access this action if $this->checkAction() returns true
|
|
||||||
* );
|
|
||||||
* </code>
|
|
||||||
*
|
|
||||||
* @var array
|
|
||||||
*/
|
|
||||||
private static $allowed_actions = array(
|
|
||||||
|
|
||||||
);
|
|
||||||
|
|
||||||
protected function init()
|
|
||||||
{
|
|
||||||
parent::init();
|
|
||||||
// You can include any CSS or JS required by your project here.
|
|
||||||
// See: https://docs.silverstripe.org/en/developer_guides/templates/requirements/
|
|
||||||
}
|
|
||||||
}
|
|
20
web.config
20
web.config
@ -1,20 +0,0 @@
|
|||||||
<!-- Routing configuration for Microsoft IIS web server -->
|
|
||||||
<configuration>
|
|
||||||
<system.webServer>
|
|
||||||
<security>
|
|
||||||
<requestFiltering>
|
|
||||||
<hiddenSegments>
|
|
||||||
<add segment=".env" />
|
|
||||||
<add segment="silverstripe-cache" />
|
|
||||||
<add segment="vendor" />
|
|
||||||
<add segment="composer.json" />
|
|
||||||
<add segment="composer.lock" />
|
|
||||||
</hiddenSegments>
|
|
||||||
<fileExtensions allowUnlisted="true" >
|
|
||||||
<add fileExtension=".ss" allowed="false"/>
|
|
||||||
<add fileExtension=".yml" allowed="false"/>
|
|
||||||
</fileExtensions>
|
|
||||||
</requestFiltering>
|
|
||||||
</security>
|
|
||||||
</system.webServer>
|
|
||||||
</configuration>
|
|
Loading…
Reference in New Issue
Block a user