docker-dev

Manages the Toollab Docker development environment for the Laravel API and Nuxt front stacks.

Updated May 5, 2025
One-click install
npx skills add https://github.com/sebauvray/toollab-api --skill docker-dev-sebauvray
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: docker-dev
Source: https://github.com/sebauvray/toollab-api/tree/main/.claude/skills/docker-dev
Command: npx skills add https://github.com/sebauvray/toollab-api --skill docker-dev-sebauvray

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up and maintaining the Toollab local development environment involves two Docker Compose stacks (Laravel API and Nuxt front), an external shared network, UID/GID alignment, named volumes, and config caching pitfalls. This Skill consolidates every startup, reset, and troubleshooting procedure so developers avoid broken permissions, stale config, and lost data. ## Core Features & Use Cases - First-time setup: Creates the external dev_toollab network, aligns .env UID/GID with the host, builds both stacks, and runs migrations with seeds. - Daily operations: Provides ready-to-use commands for logs, artisan tasks (migrate, tinker, queue, pest, pint), database access, and container lifecycle management. - Database reset: Resets the database either with demo seed data or cleanly with ProductionSeeder plus a super admin account. - Troubleshooting table: Diagnoses common failures such as missing network, permission denied on vendor/storage, occupied ports, 413 upload limits, 502 nginx errors, and ineffective .env changes. - Use Case: A developer clones the repo on a new machine, follows the Skill to create the network and fix .env values, and has the API at localhost:8000 and the Nuxt front at localhost:3000 running with seeded data in minutes. ## Quick Start Ask the assistant to start the Toollab Docker development environment and seed the database with demo data.

Frequently Asked Questions about docker-dev

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I start the Toollab Docker development environment?▼

Create the external network with docker network create dev_toollab, copy .env.example to .env in both toollab-api and toollab-front, align CURRENT_UID and CURRENT_GID with your host user, then run docker compose up -d --build in each stack and run migrations with seeds.

How do I reset the Laravel database with test data in Docker?▼

Run docker exec api_dev_toollab php artisan migrate:fresh --seed --force to reset with demo data. For a clean reset, run migrate:fresh, then db:seed --class=ProductionSeeder, then create a super admin with the toollab:create-super-admin command.

Why do my .env changes have no effect in the Laravel container?▼

The dev entrypoint runs config:cache on every container start, so Laravel reads cached configuration instead of the .env file. Run docker exec api_dev_toollab php artisan config:clear or restart the container to apply changes.

Why do I get permission denied on vendor or storage in Docker?▼

The CURRENT_UID and CURRENT_GID values in .env do not match your host user, so bind-mounted volumes are owned by root. Fix the values using id -u and id -g, then rebuild with docker compose up -d --build.

What causes a 502 error after restarting the Laravel API container?▼

Nginx may hold a stale upstream IP after the php-fpm container restarts. The configuration mitigates this with the Docker DNS resolver at 127.0.0.11, but if the error persists, restart the nginx container.

Why are file uploads over 1 MB failing with a 413 error?▼

The nginx configuration does not set client_max_body_size, so the default 1 MB limit applies to uploads. Add a client_max_body_size directive to the nginx config to raise the limit.