{"id":28927990,"url":"https://github.com/iamsaqibs/laravel-docker-template","last_synced_at":"2026-04-11T12:35:19.966Z","repository":{"id":299844250,"uuid":"1000073451","full_name":"iamsaqibs/laravel-docker-template","owner":"iamsaqibs","description":"🚀 Production-ready Docker development environment for Laravel with automatic HTTPS/SSL, one-command setup, and multi-project support. Includes PHP 8.2, MySQL, Redis, PHPMyAdmin, and Mailhog.","archived":false,"fork":false,"pushed_at":"2025-06-18T15:29:48.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-15T22:15:43.573Z","etag":null,"topics":["docker","docker-compose","laravel"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamsaqibs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-11T08:18:46.000Z","updated_at":"2025-06-18T15:29:52.000Z","dependencies_parsed_at":"2025-06-18T16:35:46.298Z","dependency_job_id":null,"html_url":"https://github.com/iamsaqibs/laravel-docker-template","commit_stats":null,"previous_names":["iamsaqibs/laravel-docker-template"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iamsaqibs/laravel-docker-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamsaqibs%2Flaravel-docker-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamsaqibs%2Flaravel-docker-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamsaqibs%2Flaravel-docker-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamsaqibs%2Flaravel-docker-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamsaqibs","download_url":"https://codeload.github.com/iamsaqibs/laravel-docker-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamsaqibs%2Flaravel-docker-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31681201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T08:18:19.405Z","status":"ssl_error","status_checked_at":"2026-04-11T08:17:08.892Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","laravel"],"created_at":"2025-06-22T14:11:33.669Z","updated_at":"2026-04-11T12:35:19.952Z","avatar_url":"https://github.com/iamsaqibs.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Docker Development Template\n\nA reusable Docker development environment template for Laravel applications, optimized for **OrbStack** and development workflows.\n\n## 🚀 Quick Setup for Any Laravel Project\n\n### Prerequisites\n\n- [OrbStack](https://orbstack.dev/) installed and running\n- A Laravel project\n\n### Setup Instructions\n\n1. **Copy this template to your Laravel project root:**\n   ```bash\n   # Copy the entire laravel-docker-template directory to your Laravel project\n   cp -r /path/to/laravel-docker-template/* /path/to/your/laravel/project/\n   ```\n\n2. **Configure your project:**\n   ```bash\n   # Navigate to your Laravel project\n   cd /path/to/your/laravel/project\n   \n   # Edit the docker/.env.template file to match your project needs\n   # The setup script will guide you through this\n   ```\n\n3. **Run the setup:**\n   ```bash\n   ./docker-dev.sh setup\n   ```\n\n   This will:\n   - Prompt you for project configuration\n   - Generate docker-compose.yml and environment files\n   - Build all containers\n   - Start all services\n   - Run database migrations\n\n4. **Access your application:**\n   - **Laravel App**: http://localhost:8080 (or your configured port)\n   - **PHPMyAdmin**: http://localhost:8081 (or your configured port)\n   - **Mailhog**: http://localhost:8025 (or your configured port)\n\n## 🔧 Configuration\n\nThe template uses a configuration file `docker/.env.template` where you can customize:\n\n- **Project name** (affects container names and network)\n- **Database name, username, and password**\n- **Port mappings** (avoid conflicts with other projects)\n- **Application URL**\n\n## 🛠️ Development Workflow\n\n### Helper Script Commands\n\n```bash\n# Start/Stop Services\n./docker-dev.sh start      # Start all services\n./docker-dev.sh stop       # Stop all services\n./docker-dev.sh restart    # Restart all services\n\n# Development Tasks\n./docker-dev.sh shell      # Open shell in app container\n./docker-dev.sh logs       # View all container logs\n./docker-dev.sh app-logs   # View app container logs only\n\n# Laravel Commands\n./docker-dev.sh artisan migrate\n./docker-dev.sh artisan make:model Product\n./docker-dev.sh artisan queue:work\n\n# Package Management\n./docker-dev.sh composer install\n./docker-dev.sh composer require package/name\n./docker-dev.sh npm install\n./docker-dev.sh npm run dev\n\n# Database Access\n./docker-dev.sh mysql      # Connect to MySQL CLI\n./docker-dev.sh redis      # Connect to Redis CLI\n\n# Testing\n./docker-dev.sh test       # Run PHPUnit tests\n\n# Maintenance\n./docker-dev.sh status     # Show container status\n./docker-dev.sh fresh      # Fresh install (destroys data!)\n./docker-dev.sh cleanup    # Remove all containers and volumes\n```\n\n## 🔍 Features\n\nThis Docker environment includes:\n\n- **Laravel App** (PHP 8.2 + Apache) - Main application container\n- **MySQL 8.0** - Database with persistent storage\n- **Redis 7** - Caching and session storage\n- **Mailhog** - Email testing tool\n- **PHPMyAdmin** - Database management interface\n- **Xdebug** - Pre-configured for VS Code debugging\n\n## 📂 Template Structure\n\n```\nlaravel-docker-template/\n├── docker/\n│   ├── dev/\n│   │   ├── Dockerfile           # PHP/Apache container\n│   │   ├── 000-default.conf     # Apache configuration\n│   │   ├── php.ini             # PHP configuration\n│   │   ├── supervisord.conf     # Process manager\n│   │   ├── entrypoint.sh        # Container startup script\n│   │   ├── env.example          # Laravel environment template\n│   │   └── mysql/\n│   │       └── init.sql         # Database initialization\n│   └── .env.template           # Docker configuration template\n├── .vscode/\n│   └── launch.json             # VS Code debug configuration\n├── .dockerignore               # Docker ignore file\n├── docker-compose.yml.template # Docker Compose template\n├── docker-dev.sh              # Development helper script\n└── README.md                  # This file\n```\n\n## 🔄 Using with Multiple Projects\n\nYou can run multiple Laravel projects simultaneously by:\n\n1. Using different port mappings for each project\n2. Using different project names\n3. Each project will have its own isolated containers and networks\n\nExample configurations for multiple projects:\n\n**Project A** (ports 8080, 8081, 8025):\n```env\nPROJECT_NAME=project_a\nAPP_PORT=8080\nPHPMYADMIN_PORT=8081\nMAILHOG_WEB_PORT=8025\n```\n\n**Project B** (ports 8090, 8091, 8035):\n```env\nPROJECT_NAME=project_b\nAPP_PORT=8090\nPHPMYADMIN_PORT=8091\nMAILHOG_WEB_PORT=8035\n```\n\n## 🚨 Troubleshooting\n\n### Port Conflicts\n\nIf you get port conflicts:\n1. Edit `docker/.env.template` to use different ports\n2. Run `./docker-dev.sh fresh` to rebuild with new configuration\n\n### Permission Issues\n\n```bash\n./docker-dev.sh shell\nchown -R www-data:www-data storage bootstrap/cache\nchmod -R 775 storage bootstrap/cache\n```\n\n### Database Issues\n\n```bash\n# Check if MySQL is ready\n./docker-dev.sh mysql\n\n# Reset database\n./docker-dev.sh fresh\n```\n\n## 📚 Next Steps\n\nAfter setup:\n1. Update your `.env` file with any additional configuration\n2. Install your project dependencies: `./docker-dev.sh composer install`\n3. Run migrations: `./docker-dev.sh artisan migrate`\n4. Start developing! ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamsaqibs%2Flaravel-docker-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamsaqibs%2Flaravel-docker-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamsaqibs%2Flaravel-docker-template/lists"}