{"id":19302780,"url":"https://github.com/arifulhb/laravel-docker-app","last_synced_at":"2025-07-25T23:40:53.766Z","repository":{"id":43815783,"uuid":"313969930","full_name":"arifulhb/laravel-docker-app","owner":"arifulhb","description":"A complete Laravel, PHP Docker based development environment with individual Nginx, Web app, Queue, Scheduler, Redis containers.","archived":false,"fork":false,"pushed_at":"2022-02-17T20:10:50.000Z","size":41,"stargazers_count":40,"open_issues_count":3,"forks_count":20,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T22:46:48.203Z","etag":null,"topics":["containerization","development-environment","docker","docker-compose","laravel","laravel-framework","php"],"latest_commit_sha":null,"homepage":"https://dev.to/arifulhb/a-complete-docker-based-development-environment-for-laravel-php-10o4","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/arifulhb.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}},"created_at":"2020-11-18T15:04:40.000Z","updated_at":"2024-12-24T06:11:31.000Z","dependencies_parsed_at":"2022-09-22T02:42:26.773Z","dependency_job_id":null,"html_url":"https://github.com/arifulhb/laravel-docker-app","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arifulhb%2Flaravel-docker-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arifulhb%2Flaravel-docker-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arifulhb%2Flaravel-docker-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arifulhb%2Flaravel-docker-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arifulhb","download_url":"https://codeload.github.com/arifulhb/laravel-docker-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250232124,"owners_count":21396576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["containerization","development-environment","docker","docker-compose","laravel","laravel-framework","php"],"created_at":"2024-11-09T23:23:47.777Z","updated_at":"2025-04-22T11:31:52.797Z","avatar_url":"https://github.com/arifulhb.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel-Docker-App\n## Laravel, PHP7.3, Nginx, MySQL 5.7, Redis Docker Container\nA complete Laravel, PHP Development environment that is very similar to production environment.\n\nDocker Compose based **Laravel development environment** with individual **App** _(Laravel app)_, **Nginx**, **Database** _(MySQL)_, **Queue**, **Scheduler**, **Redis**  services.\n\n## Installation\n### Install Laravel\nClone the repo at your development machine. Go to your *Laravel Docker* directory. Then Run this\n```\nsh install\n```\nA bash script will download latest Laravel zip and then unzip the Laravel project into the `app` directory.\n\n### Update Laravel Version\nTo update Laravel version before installaiton, edit the `install` file in root directory.\n\n## Docker Container management\n\n### Build containers\nRun this to build your docker containers for each services (*app, database, queue, scheduler, redis*).\n  ```\n  docker-compose build\n  ```\n\n### Run the containers\n  ```\n  docker-compose up\n  ```\n ### To run the services at background\n  ```\n  docker-compose up -d\n  ```\n### SSH into your app console\nTo **install Laravel**, _generate app key_ and _run migrations_, you need to ssh to your app container service. To ssh to your app container, run this.\n```\ndocker-compose exec app sh\n```\nThis will take you to `/var/www/app` path inside your `app` service container. Now you can run your `composer install` and other Laravel or PHP specific commands there.\n\nTo ssh into other containers, replace the `app` with other container name as `scheduler`, `queue`. e.g.\n```\ndocker-compose exec queue sh\n```\n\n### Stop running containers\n```\ndocker-compose stop\n```\n\n## Environment Variables\n### PHP\nIf you want to change, enable/disable any PHP settings, you can change them in `./docker/config/php/php-ini-development.ini` file and then `build` and `up` the container again.\n### MySQL\nMySQL username, password can be changed from `docker-compose.yml` file. Fin the `environment` section under `mysql`. Change the value and build the mysql image again with `docker-compose build mysql`.\n```\n  environment:\n    MYSQL_DATABASE: app\n    MYSQL_ROOT_PASSWORD: root\n    MYSQL_USER: admin\n    MYSQL_PASSWORD: secret\n```\nAfter you change the value and build, you need to restart the mysql service `docker-compose up mysql` to make it affective. \n### Nginx\nIf you want to change Nginx web host configurations, you can find the file at `./docker/images/web/sites/default.dev.conf`\n### Storage and Logs\nThis Laravel-docker-app leverage the power of `docker volume` and store some the docker container data at your host machine. Here is the details of folder structure and what data it contain:\n- `./docker/data/mysql` contain mysql database files\n- `./docker/data/redis` contain redis database file\n- `./docker/data/web` contain nginx webserver logs\n### Connecting MySQL with local desktop client.\n```\nhost: 0.0.0.0\nusername: root\npassword: root\nport: 33066\n```\n## Why of Laravel-docker-app\nAt the moment, there are many other Laravel Docker github repo or packages available, so why this new package again? Here I'll list few of my points:\n1. This docker app images is based on `alpine` based PHP image, which makes it very light weight.\n2. This is built on service based architecture. Usually for Laravel application, there should be `Queue` and `cron` running on behind. In this system, you can run `Queue`, `Scheduler` container separately and Queue will listen to a separate `Redis` database. \n3. It's the most compatible with production environment. Very easily this can be converted to a production grade, scalable service.\n\n## Browse your site locally\nYou can find your site running at http://localhost\n\n## TODO\nFuture development plan:\n- [ ] Docker Swarm for testing and production environment\n- [ ] Kubernetes scripts for testing and production environment\n\n## Contribution\nIf you find any security hole or improvement opportunity, feel free to fork and PR your updates. I'll be happy to merge any reasonable PR.\n\n### Contact\nEmail: `arifulhb@gmail.com`\n\n### Disclaimer\nThis docker environment is for development only and NOT optimized for production.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farifulhb%2Flaravel-docker-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farifulhb%2Flaravel-docker-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farifulhb%2Flaravel-docker-app/lists"}