No results
5
Build Command
Danny edited this page 2025-04-25 11:27:42 +01:00
Table of Contents
Build: spin:up
Spins up a new Docker environment for your project, tailored for PHP development.
Usage
loom spin:up [name] [path] [--options]
Arguments
Argument | Required | Description |
---|---|---|
name | ✅ | Name for your environment (used as Docker container prefix). |
path | ✅ | Path to your project's root directory (absolute path or . ). |
Options
Option | Description | Example/Accepted Values |
---|---|---|
--php | Choose PHP version | 8.3 , 8.4 , etc. |
--disable-xdebug | Disable Xdebug in PHP container | (flag, no value) |
--database | Select database | mysql , sqlite or sqlite3 |
--disable-database | Disable database container | (flag, no value) |
--disable-server | Exclude Nginx web server | (flag, no value) |
--node | Set Node.js version | 20 , 23 , etc. |
What it Does
- Reads configuration and builds required project files (Dockerfile, docker-compose).
- Spins up the PHP (and optionally Nginx/database) containers for your project.
- Automatically mounts your project directory.
- Creates a
/sqlite
folder in your project root if you have selected SQLite as your database. This folder is used to store your development SQLite database files, ensuring that your database persists across container rebuilds and is easily accessible for backups or inspection.
Notes
- Container configuration is determined only at build time.
To apply changes to config or options, destroy and rebuild your environment. - Project name becomes the Docker prefix (e.g.,
projectname-php
). - Requires Docker running.
Database Folders and Data
- MySQL: Database data is stored inside a
data/[projectname]/mysql
folder created by the environment, (outside your project) allowing MySQL data persistence between container restarts. - SQLite: If you enable the SQLite database option, a
sqlite
folder will automatically be created in the root of your project (if it doesn't already exist). This folder is used to store your SQLite database files. You should add this folder to your.gitignore
if you do not wish to track database state in version control.