Skip to content

Commit

Permalink
Adding docs
Browse files Browse the repository at this point in the history
  • Loading branch information
borkweb committed Jan 20, 2021
1 parent 848935f commit 7da0859
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The tric (Modern **Tri**be **C**ontainers) CLI command provides a containerized

1. Clone this repo
2. Follow the [Setup Instructions](docs/setup.md)
3. (Optional) Make [composer installs faster](docs/speedier-composer.md)

## Usage

Expand Down Expand Up @@ -128,6 +129,7 @@ Honestly, all of them are worth knowing. But here are a few important ones worth

* `tric cli` – run WP CLI commands within the container stack.
* `tric composer` – run composer commands against the current plugin target.
* `tric composer-cache` – make composer faster by using your machine's compose cache directory.
* `tric debug` – activates/deactivates debug output.
* `tric info` – displays current `tric` environment settings.
* `tric npm` – run npm commands against the current plugin target.
Expand Down
39 changes: 39 additions & 0 deletions docs/speedier-composer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Increasing the speed of composer

By default, `tric` caches composer dependencies within the container
and, when the containers are destroyed, so is the cache.

## Do not despair!

`tric` allows you to map your machine's composer cache directory into
the `tric` containers so that repeated `tric composer` commands can benefit from
composer cache as well! Simply:

```bash
tric composer-cache set /path/to/composer/cache

# @borkweb's command that he uses:
tric composer-cache set /home/matt/.cache/composer
```

## Removing the composer cache dir mapping

You can disable the cache dir mapping via the following:

```bash
tric composer-cache unset
```

## Discovering what the mapping is set to

You can see what the composer cache directory mapping is set to via:

```bash
tric composer-cache

# OR via:

tric info
```

*Note: When composer-cache is unset, it defaults to `/tmp`, though that mapped path is never used by composer.*

0 comments on commit 7da0859

Please sign in to comment.