dnadesign / basic-recipe
DNA Basic Recipe metapackage
Installs: 91
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 13
Forks: 5
Open Issues: 13
Language:JavaScript
Type:silverstripe-recipe
Requires
- php: >=7.0.0
- adrexia/standardsediting: ^2.0
- benmanu/silverstripe-styleguide: 0.1.1
- jonom/silverstripe-betternavigator: ^5.0.1
- silverstripe/environmentcheck: ^2.0
- silverstripe/raygun: 2.1.0
- silverstripe/recipe-cms: ^4
- silverstripe/recipe-plugin: ^1.3
- stevie-mayhew/silverstripe-svg: ^2.2
- symbiote/silverstripe-gridfieldextensions: ^3.2
Requires (Dev)
- dev-master
- 3.0.x-dev
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
- 2.1
- 2.0
- 1.1
- 1.0
- dev-dependabot/npm_and_yarn/theme-default/minimist-1.2.8
- dev-dependabot/npm_and_yarn/theme-default/ua-parser-js-0.7.33
- dev-dependabot/npm_and_yarn/theme-default/json5-2.2.3
- dev-dependabot/npm_and_yarn/theme-default/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/theme-default/engine.io-and-browser-sync-6.2.1
- dev-dependabot/composer/guzzlehttp/guzzle-6.5.8
- dev-dependabot/composer/guzzlehttp/psr7-1.8.5
- dev-dependabot/npm_and_yarn/theme-default/follow-redirects-1.14.8
- dev-feature/packageupdates
- dev-adrexia-patch-1
- dev-feature/upgrade-4.3
This package is auto-updated.
Last update: 2024-12-06 15:20:45 UTC
README
Dna Recipe
Includes a collection of useful modules, a starter theme, and the silverstripe recipe-cms
Requirements
Silverstripe 4. See 3.0 branch for silverstripe 3 support.
Getting started
NOTE: assumes you have node setup and gulp installed globally. If not, you should go do those things first
Install
To start a project with this recipe use a terminal to run (replace your-project
with your project's name):
composer create-project dnadesign/basic-recipe ./your-project
cd your-project
make setup
This will:
- Copy a draft
.env
file in for you (you'll need to update this) - Install the frontend dependencies & create the built theme in
theme-default/dist
- Run
composer install
(because this task doubles as a quick setup for future devs on your project) - Run
composer vendor-expose
to symlink assets intopublic
- Run a
dev/build ?flush
Recipe options
To add this recipe to an existing project:
(optional) composer require dnadesign/basic-recipe ./your-project
To move the cms recipe dependencies to your own composer file in order to modify them:
(optional) composer update-recipe silverstripe/recipe-cms
More information about recipes and how to work with them is available here: https://github.com/silverstripe/recipe-plugin
Using this recipe
This code comes bundled with a makefile for quick access to common tasks. Run make list
or make help
to get a list of available options, or open the Makefile directly.
Theme
Theme-default is a starter theme, intended to be used as a base for development. See the theme README file for theme specific documentation
Testing and deployment
This recipe comes with setup for a deployment pipeline from CodeShip to Silverstripe Dashboards. There are commands in the MakeFile for this purpose.
If you don't intend to use this pipeline, feel free to remove these from the makefile. Note that by default we aren't committing built assets, so if you have a git based deployment pipeline, you might want to remove theme-default/dist
from .gitignore
Prerequisites
- A Codeship account
- A SilverStripe Dashboard Project, and a Dashboard api key
- An amazon s3 bucket
Note: you can still use Codeship and not deploy to platform.
Setup
- Update the
pipeline_project_name
in the MakeFile with the project name used in the Silverstripe Dashboard. - Codeship: create a new project for this build, and set it up with your projects git details (Codeship supports GitHub, GitLab, and BitBucket repos)
CodeShip: Setup your tests
Codeship > Your project > Project settings > Test
Setup commands
- Select your technology > select php
- Update the php version to support your project. eg:
phpenv local 7.2
- Adjust any other settings you might need (e.g. you can set memory limits with:
echo "memory_limit = 512M" >> $HOME/.phpenv/versions/7.2/etc/php.ini
) - Call
make pipeline_setuptest
to set up an instance of your project for tests to run inside
Configure Test Pipelines
- Create a test pipeline
- Call the
make pipeline_test
command to run all your project's tests
Note: Tests can be bypassed if the most recent commit message contains SKIP_CI. eg:
FIX: response.js bug by updating [SKIP_CI]
Codeship: setup for deployments
Configuration
Configure your Codeship environment variables under Project settings > Environment
. You will need:
AWS_DEFAULT_REGION
- from your s3 bucket account. e.g. ap-southeast-2
AWS_ACCESS_KEY_ID
- from your s3 bucket account.
AWS_SECRET_ACCESS_KEY
- from your s3 bucket account.
DASHBOARD_TOKEN
- You can find this in your profile on the Silverstripe Dashboard
DASHBOARD_USER
- this is the email address you use on the dashboard, and not your username
Note: The AWS connections might be adapted for deployments to other environments, if you aren't hosted on CWP, or the Silverstripe Platform.
Deployment
Project settings > Deploy
- Add a new deployment pipeline, and choose a deployment branch
- Choose "Custom script"
- Call
make pipeline_deploy
. This will prep the test build - removing unwanted files, create a tar file, and send it to a SilverStripe Dashboard for deployment.
You should now be able to push to your deployment branch to trigger a deploy