9 Quick Start Guide
Danny edited this page 2025-04-25 14:21:57 +01:00

Quick Start Guide

Ready to spin up your first PHP development environment with Loom Spinner CLI? Follow these steps to get started quickly!

1. Prerequisites

Before you launch your environment, ensure you have:

If Docker is not running, loom commands will display an error.

2. Create or Choose Your PHP Project

Make sure you have a PHP project directory—or create a fresh one. You can use Loom Spinner with both existing and new projects.

cd /path/to/my-project

3. Start the Environment

To launch a local development environment for your project, use:

loom spin:up my-project .
  • my-project is the name you'll use for this environment.
  • . means "use the current directory as the project root".

Loom Spinner will set up Docker containers with PHP, Nginx, Node, MySQL (or SQLite), and more, based on your configuration and project needs.

4. Access Your Project

Once the containers are running:

  • Your code inside the project directory is available inside the container at /data/var/www
  • Your project's public directory will be served via Nginx at http://localhost:<nginx-port>

You can check which port is being used by running:

docker ps

or viewing Docker Desktop.

Access the PHP Container Shell

If you want to run tests or other commands inside your PHP container, you can connect directly to it with:

docker exec -it <project-name>-php bash

Replace <project-name> with the name you specified when spinning up your environment (e.g., my-project-php). This opens an interactive Bash shell inside the container, giving you full access to the project environment.

5. Manage Your Environment

  • Stop the environment:
    loom spin:stop my-project
    
  • Start it again:
    loom spin:start my-project
    
  • Destroy the environment:
    loom spin:down my-project
    
    (This will remove the containers created for the environment, don't worry this won't damage your project files!)

6. Next Steps

Loom Spinner is highly configurable. You can customize your environment by passing options to the command or by adding a spinner.yaml file to your project root. Check out the Configuration page for details.


You're ready to go! If you get stuck, check the other sections in this documentation or reach out for support.

Happy spinning! 🧵