Coder Social home page Coder Social logo

jeffesonmaia / roots-example-project.com Goto Github PK

View Code? Open in Web Editor NEW

This project forked from roots/roots-example-project.com

0.0 2.0 0.0 588 KB

Example project that uses Bedrock, Trellis, and Sage

Home Page: http://roots-example-project.com/

PHP 52.20% JavaScript 25.85% CSS 6.55% Ruby 10.30% Shell 5.10%

roots-example-project.com's Introduction

Roots Example Project

This repository is an example of how to integrate and use the following projects together:

For more background, see this blog post.

This project is a complete working example that's deployed on a Digital Ocean 512MB droplet.

You can view it at http://roots-example-project.com/.

Instructions

This project can be cloned and re-configured to fit your needs but we highly suggest you follow in the instructions below to create your own. This will guarantee you have the latest version of Bedrock, Trellis, Sage, and Soil in case this example falls behind a little.

Here's how this example project was created:

  1. Create a new project directory: $ mkdir example.com && cd example.com
  2. Clone Trellis: $ git clone --depth=1 [email protected]:roots/trellis.git && rm -rf trellis/.git
  3. Clone Bedrock: $ git clone --depth=1 [email protected]:roots/bedrock.git site && rm -rf site/.git
  4. Clone Sage: $ git clone --depth=1 [email protected]:roots/sage.git site/web/app/themes/sage && rm -rf site/web/app/themes/sage/.git

After that your folder structure is complete and you're ready to configure the individual components.

Bedrock

Bedrock doesn't need any additional configuration by default. There's only one custom option set in this example: WP_DEFAULT_THEME.

  • In site/config/application.php add define('WP_DEFAULT_THEME', 'sage');

Trellis

Trellis' instructions apply here, but more specifically:

  1. Make sure you have the requirements all installed
  2. Install the Ansible Galaxy roles: $ cd trellis && ansible-galaxy install -r requirements.yml
  3. Configure your wordpress_sites - see the Local Development Setup docs

Staging/Production

If you also want staging/production servers, create those manually at this point.

  1. Add their hostnames/IPs to ansible/hosts/<environment>
  2. Configure their wordpress_sites just like #3 above and follow the Remote Server Setup docs
  3. Define your SSH keys to give users the ability to deploy, see the SSH Keys docs

Provision

Development

  1. Run vagrant up

Staging/Production

  1. Provision server: ansible-playbook -i hosts/<environment> server.yml
  2. Deploy your site: ./deploy.sh <environment> <site name>

Naming

Some notes on names used throughout this project:

  • You're encouraged to rename Sage to your theme name. Just remember to rename references to it everywhere.
  • Any time you see a name like "example.com", "example.dev", "roots-example-project.com", etc, it should be renamed to your project name.
  • <environment> is a placeholder to be replaced by staging or production (for example).

Sage/Theme

  1. Install Sage's requirements
  2. SSH into VM: $ vagrant ssh
  3. Add the Soil plugin: $ cd /srv/www/roots-example-project.com/current && composer require roots/soil dev-master (note: non-development use requires a license that you can purchase on the Roots site)
  4. Activate Soil: $ wp plugin activate soil
  5. Configure Sage and customize the theme as usual. At a minimum, do this on your host/local machine:
$ cd web/app/themes/sage
$ npm install
$ bower install
$ gulp

roots-example-project.com's People

Contributors

swalkinshaw avatar retlehs avatar fullyint avatar austinpray avatar louim avatar nathanielks avatar aaemnnosttv avatar heyfletch avatar alexsomeoddpilot avatar brandonshutter avatar emaildano avatar chriszarate avatar etcook avatar foxaii avatar kalenjohnson avatar qwp6t avatar rstormsf avatar rasmusbe avatar jacobdorman avatar fredriksundstrom avatar davenaylor avatar starise avatar kimisyl avatar liviucmg avatar iloveitaly avatar thewunder avatar paultibbetts avatar reiz avatar rslnk avatar slackday avatar

Watchers

James Cloos avatar Jeffeson Pinheiro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.