GithubHelp home page GithubHelp logo

garrettcadams / trellis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from roots/trellis

0.0 2.0 0.0 849 KB

Ansible playbooks for a WordPress LEMP stack

Home Page: https://roots.io/trellis/

License: MIT License

Shell 9.66% Python 90.34%

trellis's Introduction

Trellis

Release Build Status

Ansible playbooks for setting up a LEMP stack for WordPress.

  • Local development environment with Vagrant
  • High-performance production servers
  • One-command deploys for your Bedrock-based WordPress sites

What's included

Trellis will configure a server with the following and more:

  • Ubuntu 16.04 Xenial LTS
  • Nginx (with optional FastCGI micro-caching)
  • PHP 7.1
  • MariaDB (a drop-in MySQL replacement)
  • SSL support (scores an A+ on the Qualys SSL Labs Test)
  • Let's Encrypt integration for free SSL certificates
  • HTTP/2 support (requires SSL)
  • Composer
  • WP-CLI
  • sSMTP (mail delivery)
  • MailHog
  • Memcached
  • Fail2ban
  • ferm

Requirements

Make sure all dependencies have been installed before moving on:

Installation

The recommended directory structure for a Trellis project looks like:

example.com/      # → Root folder for the project
├── trellis/      # → Your clone of this repository
└── site/         # → A Bedrock-based WordPress site
    └── web/
        ├── app/  # → WordPress content directory (themes, plugins, etc.)
        └── wp/   # → WordPress core (don't touch!)

See a complete working example in the roots-example-project.com repo.

  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. Install the Ansible Galaxy roles: $ cd trellis && ansible-galaxy install -r requirements.yml

Windows user? Read the Windows docs for slightly different installation instructions. VirtualBox is known to have poor performance in Windows — use VMware or see some possible solutions.

Documentation

Trellis documentation is available at https://roots.io/trellis/docs/.

Local development setup

  1. Configure your WordPress sites in group_vars/development/wordpress_sites.yml and in group_vars/development/vault.yml
  2. Run vagrant up

Read the local development docs for more information.

Remote server setup (staging/production)

A base Ubuntu 16.04 server is required for setting up remote servers. OS X users must have passlib installed.

  1. Configure your WordPress sites in group_vars/<environment>/wordpress_sites.yml and in group_vars/<environment>/vault.yml (see the Vault docs for how to encrypt files containing passwords)
  2. Add your server IP/hostnames to hosts/<environment>
  3. Specify public SSH keys for users in group_vars/all/users.yml (see the SSH Keys docs)
  4. Run ansible-playbook server.yml -e env=<environment> to provision the server

Read the remote server docs for more information.

Deploying to remote servers

  1. Add the repo (Git URL) of your Bedrock WordPress project in the corresponding group_vars/<environment>/wordpress_sites.yml file
  2. Set the branch you want to deploy
  3. Run ./bin/deploy.sh <environment> <site name>
  4. To rollback a deploy, run ansible-playbook rollback.yml -e "site=<site name> env=<environment>"

Read the deploys docs for more information.

Contributing

Contributions are welcome from everyone. We have contributing guidelines to help you get started.

Community

Keep track of development and community news.

trellis's People

Contributors

swalkinshaw avatar fullyint avatar retlehs avatar austinpray avatar qwp6t avatar nathanielks avatar louim avatar kalenjohnson avatar cfxd avatar chriszarate avatar primozcigler avatar emaildano avatar brandonshutter avatar ckovey avatar heyfletch avatar paultibbetts avatar swaincreates avatar rstormsf avatar rifi2k avatar henkler avatar jacobdorman avatar duncanjbrown avatar davenaylor avatar bostondv avatar yeah568 avatar jeffbski avatar kimisyl avatar nbyloff avatar olapersson avatar theaggressive avatar

Watchers

James Cloos avatar Garrett Adams 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.