{"id":17696898,"url":"https://github.com/datashaman/docker-laravel","last_synced_at":"2025-10-11T20:13:21.244Z","repository":{"id":66709811,"uuid":"173439975","full_name":"datashaman/docker-laravel","owner":"datashaman","description":null,"archived":false,"fork":false,"pushed_at":"2019-03-04T16:27:33.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-06T05:43:48.780Z","etag":null,"topics":[],"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/datashaman.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}},"created_at":"2019-03-02T11:31:51.000Z","updated_at":"2019-03-04T16:27:34.000Z","dependencies_parsed_at":"2023-09-08T06:00:13.549Z","dependency_job_id":null,"html_url":"https://github.com/datashaman/docker-laravel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datashaman%2Fdocker-laravel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datashaman%2Fdocker-laravel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datashaman%2Fdocker-laravel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datashaman%2Fdocker-laravel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datashaman","download_url":"https://codeload.github.com/datashaman/docker-laravel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246399800,"owners_count":20770907,"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":[],"created_at":"2024-10-24T14:45:38.941Z","updated_at":"2025-10-11T20:13:16.215Z","avatar_url":"https://github.com/datashaman.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-laravel\n\nA script for building Dockerfile and docker-compose.yml based on Laravel project requirements.\n\n## Usage\n\nCheckout the repository:\n\n    git clone https://github.com/datashaman/docker-laravel.git\n    cd docker-laravel\n\nGenerate _Dockerfile_ and _docker-compose.yml_ with:\n\n    ./build.sh php7.2 beanstalkd mailhog memcached mariadb elasticsearch redis\n\nCopy the following into your project folder:\n\n- Dockerfile\n- docker-compose.yml\n- templates/nginx.conf\n- templates/php-fpm.conf\n\nIf you want to put the templates somewhere else, adjust the paths in _Dockerfile_ and _docker-compose.yml_.\n\nThe _php-fpm.conf_ file is needed at build time (and maybe also runtime), and the _nginx.conf_ file is needed at runtime.\n\nEdit your current _.env_ file and remove any references to hostnames of services you've just added.\n\nFor example, `DB_HOST`, `ELASTICSEARCH_HOST`, `MEMCACHED_HOST`, `REDIS_HOST`. These will be configured inside the Compose stack.\n\nRemove any mail-related variables as well, _mailhog_ will handle that.\n\nBring the Compose stack up:\n\n    docker-compose up\n\nOnce it's pulled and built everything see which ports are open:\n\n    docker-compose ps\n\nThe stack exposes the following HTTP endpoints:\n\n- [beanstalkd console](http://127.0.0.1:2080)\n- [mailhog](http://127.0.0.1:8025)\n- [minio](http://127.0.0.1:9000)\n- [web app](http://127.0.0.1:8080)\n- [redis commander](http://127.0.0.1:8081)\n\nThe _app_ uses the _PHP-FPM_ binary, but can also be used for CLI usage. Do something like this to run your migrations and setup up your instance's data:\n\n- docker-compose run app composer install\n- docker-compose run app php artisan migrate --seed\n\nTyping that all the time is a _PITA_, so setup an alias in your _.bashrc_ or similar:\n\n    alias dcra='docker-compose run app'\n\nAnd use it like this:\n\n    dcra composer install\n    dcra php artisan migrate --seed\n\nServices available in the stack:\n\n- _app_ running workspace code\n- _beanstalkd_\n- _beanstalkd-console_\n- _db_ running mysql, mariadb or postgresql\n- _elasticsearch_\n- _mailhog_\n- _memcached_\n- _minio_\n- _redis_\n- _redis-commander_\n- _web_ running nginx\n- _worker_ running workspace code (_--tries_ set to 1)\n\nThe sample _Dockerfile_ and _docker-compose.yml_ files in this repo build all the above (using _mariadb_ as _db_).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatashaman%2Fdocker-laravel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatashaman%2Fdocker-laravel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatashaman%2Fdocker-laravel/lists"}