Development with Docker
On this page
The application repository includes a development helper for Linux and macOS. It is separate from the production Docker image and from the multi-repository InvoiceShelf/devenv workspace.
Clone the correct version
git clone --branch 2.x https://github.com/InvoiceShelf/InvoiceShelf.git invoiceshelf-v2
cd invoiceshelf-v2
To reproduce this guide’s baseline exactly, check out tag 2.4.6 in a disposable checkout. Install Docker with Compose and Node.js 24+ on the host.
Start the development environment
./devenv
Follow the helper’s database and optional Gotenberg prompts. It records the selected Compose configuration in .devenvconfig. Check the displayed host and ports; another development stack may already use them.
Install dependencies
./devenv run composer install
./devenv run php artisan key:generate
corepack enable
pnpm install --frozen-lockfile
pnpm dev
The PHP command runs in the application container, while Vite runs on the host. Generate a key only for a new development environment. Complete the browser installer at the configured local hostname.
Daily commands
Use ./devenv start, ./devenv stop, ./devenv logs and ./devenv shell. ./devenv run php artisan migrate applies pending migrations to your development database. ./devenv test runs the PHP tests; ./devenv format runs the formatter.
Use the Mailpit and database-inspection endpoints exposed by the chosen Compose file for local checks. Keep development mail local and use fixtures instead of production customer records. Run pnpm build before checking the production asset output.