loom-spinner-cli/README.md

83 lines
2.2 KiB
Markdown
Raw Normal View History

2025-04-24 03:55:34 +01:00
<div>
<img src="./header.jpg" alt="Loom Spinner CLI Header Image &amp; Logo" style="width: 100%; height: auto;">
</div>
2025-04-24 03:51:17 +01:00
2025-04-24 10:22:52 +01:00
# Loom Spinner
2025-04-24 03:15:08 +01:00
<div>
<!-- Version Badge -->
<img src="https://img.shields.io/badge/Version-1.0.0-blue" alt="Version 1.1.0">
</div>
2025-04-24 03:15:08 +01:00
An environment management application for PHP developers.
2025-04-24 03:15:08 +01:00
Allows you to spin up minimal, sensibly pre-configured Docker
containers for PHP development, for a fast, consistent and smooth development experience.
2025-04-24 03:15:08 +01:00
Simple commands you can run from anywhere on your system.
2025-04-24 03:15:08 +01:00
# The Lowdown
2025-04-24 03:15:08 +01:00
Create pre-configured Docker environments on a project-by-project basis, tailored specifically for developing PHP
applications. The default setup gives you an environment with:
2025-04-24 03:15:08 +01:00
- PHP 8.4 (with XDebug + OpCache)
- Nginx
- SQLite3
- NodeJS 23 (Node, NPM + NPX)
2025-04-24 03:15:08 +01:00
Your project is mounted to the PHP container and your projects `public` directory is served via Nginx at
2025-04-24 04:00:14 +01:00
`http://localhost:<nginx-port>`. Your container is also accessible via the command line, so you can run unit tests
or other commands inside your sandboxed environment.
2025-04-24 03:58:22 +01:00
**Loom Spinner CLI is currently in the early stages of development and thus only has limited features, such as only
allowing you to use a SQLite database. More options will be added in subsequent releases.**
2025-04-24 03:15:08 +01:00
# Installation
2025-04-13 20:13:19 +01:00
2025-04-24 03:15:08 +01:00
Pre-Requisites:
2025-04-13 20:13:19 +01:00
2025-04-24 03:15:08 +01:00
- Composer
- Docker Desktop/Docker Engine
2025-04-13 20:13:19 +01:00
2025-04-24 03:15:08 +01:00
```shell
composer global require loomlabs/loom-spinner-cli
```
2025-04-13 22:17:49 +01:00
2025-04-24 03:15:08 +01:00
# Usage
2025-04-14 15:25:40 +01:00
2025-04-24 03:15:08 +01:00
Start your (Docker) engines, then:
2025-04-13 22:17:49 +01:00
2025-04-24 03:15:08 +01:00
```shell
cd /path/to/my-project
loom spin:up my-project .
```
2025-04-24 03:15:08 +01:00
Check your new containers ports by inspecting the containers in Docker Desktop or running `docker ps`.
2025-04-24 03:15:08 +01:00
Your projects public directory is now available at `http://localhost:<nginx-container-port>`. Voila!
2025-04-24 00:01:49 +01:00
2025-04-24 03:15:08 +01:00
## What Else?
2025-04-24 00:01:49 +01:00
2025-04-24 03:15:08 +01:00
Want to stop your containers?
2025-04-24 00:01:49 +01:00
2025-04-24 03:15:08 +01:00
```shell
loom spin:stop my-project
```
2025-04-24 03:15:08 +01:00
Start them again?
2025-04-24 03:15:08 +01:00
```shell
loom spin:start my-project
```
2025-04-24 03:15:08 +01:00
Destroy your containers?
2025-04-24 03:15:08 +01:00
```shell
loom spin:down my-project
```
2025-04-24 03:15:08 +01:00
What's more, `loom` can be configured further with a simple set of configuration options. For a more detailed
quick-start guide or for more information on using and configuring **Loom Spinner CLI**, please consult the wiki.
2025-04-24 03:15:08 +01:00
Happy spinning! 🧵