Skip to content

Commit

Permalink
Simplify README
Browse files Browse the repository at this point in the history
This removes the "manual" docs from the README and focuses on the
trellis-cli workflow. This README isn't meant to be the full
documentation anyway.
  • Loading branch information
swalkinshaw committed Dec 11, 2021
1 parent aa78f3a commit 2d90962
Showing 1 changed file with 1 addition and 78 deletions.
79 changes: 1 addition & 78 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,61 +78,18 @@ Full documentation is available at [https://docs.roots.io/trellis/master/install

## Requirements

Make sure all dependencies have been installed before moving on:

- [Virtualbox](https://www.virtualbox.org/wiki/Downloads) >= 4.3.10
- [Vagrant](https://www.vagrantup.com/downloads.html) >= 2.1.0
- **Recommended**: [trellis-cli](https://github.com/roots/trellis-cli)

**Windows user?** [Read the Windows getting started docs](https://docs.roots.io/getting-started/windows/#working-with-trellis) for slightly different installation instructions.
See the full [installation](https://docs.roots.io/trellis/master/installation/#installation) docs for requirements and our [getting started pages](https://docs.roots.io/getting-started) for more OS specific instructions.

## Installation

### Using trellis-cli

Create a new project:

```bash
$ trellis new example.com
```

### Manual

The recommended directory structure for a Trellis project looks like:

```bash
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](https://github.com/roots/roots-example-project.com).

1. Create a new project directory:

```bash
$ mkdir example.com && cd example.com
```

2. Install Trellis:

```bash
$ git clone --depth=1 git@github.com:roots/trellis.git && rm -rf trellis/.git
```

3. Install Bedrock into the `site` directory:

```bash
$ composer create-project roots/bedrock site
```

## Local development setup

### Using trellis-cli

1. Review the automatically created site in `group_vars/development/wordpress_sites.yml`
2. Customize settings if necessary

Expand All @@ -142,12 +99,6 @@ Start the Vagrant virtual machine:
$ trellis up
```

### Manual

1. Configure your WordPress sites in `group_vars/development/wordpress_sites.yml` and in `group_vars/development/vault.yml`
2. Ensure you're in the trellis directory: `cd trellis`
3. Run `vagrant up`

[Read the local development docs](https://docs.roots.io/trellis/master/local-development/#wordpress-installation) for more information.

## Remote server setup (staging/production)
Expand All @@ -158,8 +109,6 @@ A base Ubuntu 18.04 (Bionic) or Ubuntu 20.04 (Focal LTS) server is required for
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](https://docs.roots.io/trellis/master/ssh-keys/))

### Using trellis-cli

Initialize Trellis (Virtualenv) environment:

```bash
Expand All @@ -178,25 +127,13 @@ Or take advantage of its [Digital Ocean](https://roots.io/r/digitalocean) suppor
$ trellis droplet create production
```

### Manual

For remote servers, installing Ansible locally is an additional requirement. See the [docs](https://docs.roots.io/trellis/master/remote-server-setup/#requirements) for more information.

Provision the server:

```bash
$ ansible-playbook server.yml -e env=<environment>
```

[Read the remote server docs](https://docs.roots.io/trellis/master/remote-server-setup/) 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 (defaults to `master`)

### Using trellis-cli

Deploy a site:

```bash
Expand All @@ -209,20 +146,6 @@ Rollback a deploy:
$ trellis rollback <environment> <site>
```

### Manual

Deploy a site:

```bash
$ ./bin/deploy.sh <environment> <site>
```

Rollback a deploy:

```bash
$ ansible-playbook rollback.yml -e "site=<site> env=<environment>"
```

[Read the deploys docs](https://roots.io/docs/trellis/master/deployments/) for more information.

## Contributing
Expand Down

0 comments on commit 2d90962

Please sign in to comment.