dev-environment

Configures and troubleshoots the OrangeHRM Docker-based local development environment.

Updated Jul 23, 2026
One-click install
npx skills add https://github.com/snow-gift111/orangehrm-ai-sdlc-capstone --skill dev-environment-snow-gift111
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dev-environment
Source: https://github.com/snow-gift111/orangehrm-ai-sdlc-capstone/tree/main/.agents/skills/dev-environment
Command: npx skills add https://github.com/snow-gift111/orangehrm-ai-sdlc-capstone --skill dev-environment-snow-gift111

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up OrangeHRM locally requires a separate Docker companion repo, multiple PHP/DB containers, host port management, and hostname routing — this Skill provides the reference for running, switching, and debugging that environment without installing PHP or MySQL on the host. ## Core Features & Use Cases - Container orchestration guidance: Documents the orangehrm-os-dev-environment repo layout, available PHP (5.6–8.3) and MySQL/MariaDB services, container naming, and common docker compose commands. - Version selection rule: Directs developers to derive the lowest supported PHP version from src/composer.json before installing dependencies, and to run Composer/Yarn inside the PHP container. - Troubleshooting playbook: Maps symptoms (port 80/443 conflicts, "database connection refused", unreachable http://phpXX/, mount issues) to diagnostic commands and fixes. - Use Case: A developer hits "port is already allocated" when starting the stack — the Skill walks through checking which process holds port 80, then either freeing it or remapping host ports in the companion repo's .env. ## Quick Start Ask the agent to help you start the OrangeHRM Docker dev environment with the lowest supported PHP version and a MariaDB container.

Frequently Asked Questions about dev-environment

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

FAQPage Schema
How do I set up a local OrangeHRM development environment with Docker?

Clone the orangehrm-os-dev-environment companion repo, copy .env.dist to .env, create an html/ directory containing your OrangeHRM checkout, add the php hostnames to /etc/hosts, then run docker compose up with your chosen PHP and database services.

Which PHP version should I use for OrangeHRM development?

Use the lowest PHP version the codebase supports, derived from src/composer.json require.php or config.platform.php. This ensures Composer resolves dependencies compatible across the whole supported range; other versions can run alongside for compatibility testing.

Why does docker compose up fail with "port is already allocated"?

Another process already binds host port 80 or 443, which nginx needs. Check with lsof -nP -iTCP:80 -sTCP:LISTEN, then either ask the developer to stop the conflicting process or remap the host ports in the companion repo's .env file.

Why does OrangeHRM show "database connection refused" in Docker?

The app is likely using 127.0.0.1 instead of the DB container name as the hostname. From PHP code and containers, use the service name such as mariadb103 or mysql57, with port 3306 and default root password root.

Can I run the same OrangeHRM checkout on multiple PHP versions?

Yes. The dev environment serves the same mounted checkout under multiple PHP containers simultaneously, for example http://php74/orangehrm-5x/ and http://php83/orangehrm-5x/, which is useful for verifying PHP-version compatibility.