{"id":20603845,"url":"https://github.com/maxkostinevich/laravel-docker-template","last_synced_at":"2025-04-15T02:07:16.634Z","repository":{"id":41401650,"uuid":"180982793","full_name":"maxkostinevich/Laravel-Docker-Template","owner":"maxkostinevich","description":"Docker compose template for Laravel application","archived":false,"fork":false,"pushed_at":"2022-09-07T11:16:00.000Z","size":24,"stargazers_count":39,"open_issues_count":0,"forks_count":24,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-15T02:07:09.603Z","etag":null,"topics":["docker","docker-compose","docker-compose-template","docker-laravel","laravel","php"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=DNyQX00X_cg","language":"Batchfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxkostinevich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-12T10:06:56.000Z","updated_at":"2025-02-24T14:08:35.000Z","dependencies_parsed_at":"2023-01-17T22:46:04.656Z","dependency_job_id":null,"html_url":"https://github.com/maxkostinevich/Laravel-Docker-Template","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxkostinevich%2FLaravel-Docker-Template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxkostinevich%2FLaravel-Docker-Template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxkostinevich%2FLaravel-Docker-Template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxkostinevich%2FLaravel-Docker-Template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxkostinevich","download_url":"https://codeload.github.com/maxkostinevich/Laravel-Docker-Template/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991543,"owners_count":21194894,"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":["docker","docker-compose","docker-compose-template","docker-laravel","laravel","php"],"created_at":"2024-11-16T09:18:52.259Z","updated_at":"2025-04-15T02:07:16.616Z","avatar_url":"https://github.com/maxkostinevich.png","language":"Batchfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Docker Template\nDocker Compose template for rapid Laravel/PHP development.\n\n![bash](https://user-images.githubusercontent.com/10295466/56030094-b0ec6900-5d24-11e9-967f-259a9579dd70.png)\n\nLinux, OS X and Windows friendly.\n\nThis Docker template is also suitable for any other PHP projects, feel free to modify Docker configuration as needed.\n\n## Included services\n- Nginx\n- PHP 8.1.0\n- MySQL\n- Redis\n- Adminer\n- Redis Commander\n- Mailhog (Mailcatcher alternative)\n\n\n## Project Setup\n\n### Prepare the Docker template\n\n1. Clone this repo:\n\n```\ngit clone git@github.com:maxkostinevich/Laravel-Docker-Template.git yourproject\ncd yourproject\nrm -rf .git\n```\n\nTo delete sample ```index.php``` file run ```rm -rf /src/public```\n\n2. Update project name in ```.env``` file\n\n3. Build and run containers:\n\n```\ndocker-compose build\ndocker-compose up\n```\n\n\n### Setting up existing project\n\n1. Put your project files into ```/src``` folder and update your project ```.env``` file:\n\n```\nAPP_URL: http://localhost:8080\nDB_HOST: mysql\nDB_PORT: 3306\n```\n\nNote: webroot folder is set to ```/src/public```\n\n2. Login into ```php-fpm``` container:\n\n- on Windows:\n\n```\nphp.bat\n```\n- on Linux/OS X:\n\n```\nsh php.sh\n```\n\nand run all required commands, for example:\n\n```\ncomposer install\nphp artisan migrate\n\nnpm install\nnpm run dev\n```\n\nIf your ```APP_KEY``` is not generated yet, you may generate it by the following command:\n```\nphp artisan key:generate\n```\n\n### Setting up new project\n\nTo create new Laravel project simply login into ```php-fpm``` container using the following script:\n\n- on Windows:\n\n```\nphp.bat\n```\n- on Linux/OS X:\n\n```\nsh php.sh\n```\n\nand create a new Laravel app using ```laravel new``` command.\n\n\n### Running containers in the background\n\nYou may also run containers in the background using the following script:\n\n- on Windows:\n\n```\nserve.bat\n```\n\n- on Linux/OS X:\n\n```\nsh serve.sh\n```\n\n\n### Stop and delete containers\n\n\nTo stop Docker containers run:\n\n```\ndocker-compose stop\n```\n\nTo delete Docker containers run:\n\n```\ndocker-compose down\n```\n\n### Database Management\n\nFor your convenience, Adminer is installed and available at ```http://localhost:6080```\n\nYou may also login into ```mysql``` container using the following script:\n\n- on Windows:\n```\nmysql.bat\n```\n\n- on Linux/OSX:\n```\nsh mysql.sh\n```\n\n\n### Redis configuration\n\nTo use Redis in your project,you'd need to install predis first:\n\n```\ncomposer require predis/predis\n```\n\nThen setup Redis connection in your ```.env``` file as follows:\n\n```\nREDIS_HOST=redis\n\nCACHE_DRIVER=redis\nSESSION_DRIVER=redis\nQUEUE_DRIVER=redis\n```\n\nFor your convenience, Redis Commander is installed and available at ```http://localhost:6081```\n\n\n### Windows-only \n\n**Phantom containers**\n\nIn order to force stop all running containers you may need to run the following script: \n```\ndocker-stop.bat\n```\n\n**Make shorthand command**\n\n```\nmake.bat appname\n```\n\n\n### Main Endpoints\n\n- App URL: ```http://localhost:8080```\n- Adminer: ```http://localhost:6080```\n- Redis Commander: ```http://localhost:6081```\n- MailHog: ```http://localhost:6082```\n\n\n---\n### [MIT License](https://opensource.org/licenses/MIT)\n(c) 2022 [Max Kostinevich](https://maxkostinevich.com) - All rights reserved.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxkostinevich%2Flaravel-docker-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxkostinevich%2Flaravel-docker-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxkostinevich%2Flaravel-docker-template/lists"}