> For the complete documentation index, see [llms.txt](https://docker.nailsapp.co.uk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docker.nailsapp.co.uk/commands.md).

# Commands

A quick run-down of the day-to-day commands for setting up and interacting with the containers.

This environment is, more or less, just a wrapper for `docker-compose` with some sparkle sprinkled on top; to make life a little easier we use a `Makefile` to wrap up some of the common commands.

Day-to-day, you'll likely use `up`, `build`, and `down` when working with this stack, but the following are available by default:

{% hint style="info" %}
All of the below should be run using `make`, e.g. `make up`
{% endhint %}

| Command            | Value                                                                                                                                                                          |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `build`            | Executes `./www/build.sh` within the context of the [web server container](/containers/web-server.md).                                                                         |
| `build-containers` | Builds the project containers.                                                                                                                                                 |
| `build-xdebug`     | Builds the project containers, installing [XDebug](https://xdebug.org).                                                                                                        |
| `build-blakfire`   | Builds the project containers, installing [Blackfire](https://blackfire.io).                                                                                                   |
| `build-fresh`      | Executes `./www/build.sh` within the context of the [web server container](/containers/web-server.md), passing `fresh` as an arg. USeful for starting a build from scratch.    |
| `clean`            | Stop, then remove, all containers.                                                                                                                                             |
| `down`             | Stop all containers.                                                                                                                                                           |
| `restart`          | Restart all containers.                                                                                                                                                        |
| `seed`             | Executes `./www/seed.sh` within the context of the [web server container](/containers/web-server.md).                                                                          |
| `ssh`              | SSH into the [web server container](/containers/web-server.md).                                                                                                                |
| `ssh-root`         | SSH into the [web server container](/containers/web-server.md), as `root`.                                                                                                     |
| `ssl-create`       | Creates a new [LetsEncrypt](https://letsencrypt.org) SSL certificate.                                                                                                          |
| `ssl-renew`        | Renews an existing [LetsEncrypt](https://letsencrypt.org) SSL certificate.                                                                                                     |
| `test`             | Executes `./www/test.sh` within the context of the [web server container](/containers/web-server.md), useful for running testing suites such as [PHPUnit](https://phpunit.de). |
| `test-fresh`       | Executes `./www/test.sh` within the context of the [web server container](/containers/web-server.md), triggering a database refresh.                                           |
| `up`               | Start all containers, install framework if necessary, configure [cron](/containers/web-server.md#cron), and configure [SSL](/containers/web-server.md#ssl).                    |
| `watch`            | Executes `./www/watch.sh` within the context of the [web server container](/containers/web-server.md), useful for running scripts which build CSS and JS.                      |

{% hint style="success" %}
Feel free to add your own, as per your project's needs.
{% endhint %}
