Setup Neos with Devbox

#What is Devbox?

Devbox is a command-line tool that lets you easily create isolated shells for development. It's shipped with Process Compose to manage non-containerized services and works well with direnv to automatically load and unload the Devbox environment.

#Step by Step Instructions

#1. Install Devbox and direnv

#2. Check out the project

To check out an existing project, clone it and install all dependencies.

sh
git clone https://YOUR-PROJECT-URL-HERE your-project
cd your-project

#3. Set up Devbox

This is something you only need to do once for your project. Run

sh
devbox init
devbox generate direnv
devbox add php@8.3 mysql80

This creates the Devbox configuration. Make sure to add it to your Version Control System (e.g. Git).

#4. Set up Process Compose

For each service you need to run, add it to your Process Compose configuration. It is the equivalent of Docker Compose.

process-compose.yaml
version: "0.5"

processes:
  app:server:
    command: ./flow server:run
    depends_on:
      composer:install:
        condition: process_completed_successfully
  composer:install:
    command: composer install

#5. Start Devbox

To start your local setup, run:

sh
devbox services up

Written by