{"id":23145810,"url":"https://github.com/ityetti/laravel-docker","last_synced_at":"2026-04-11T18:03:34.103Z","repository":{"id":267531273,"uuid":"898134697","full_name":"ityetti/laravel-docker","owner":"ityetti","description":"Laravel Docker to Development (Apple Silicon): Traefik + Nginx + Redis + PHP-FPM + MySQL + xDebug + Mailpit + RabbitMQ + OpenSearch + Varnish","archived":false,"fork":false,"pushed_at":"2024-12-10T21:28:21.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T22:42:48.986Z","etag":null,"topics":["apple-silicon-support","applesilicon","docker","laravel","mailpit","mysql","nginx","opensearch","opensearch-dashboards","php","redis","traefik","varnish"],"latest_commit_sha":null,"homepage":"https://github.com/ityetti/laravel-docker","language":"Dockerfile","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/ityetti.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-03T21:11:18.000Z","updated_at":"2024-12-26T19:33:47.000Z","dependencies_parsed_at":"2024-12-10T22:36:43.135Z","dependency_job_id":null,"html_url":"https://github.com/ityetti/laravel-docker","commit_stats":null,"previous_names":["ityetti/laravel-docker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ityetti%2Flaravel-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ityetti%2Flaravel-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ityetti%2Flaravel-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ityetti%2Flaravel-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ityetti","download_url":"https://codeload.github.com/ityetti/laravel-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247182339,"owners_count":20897379,"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":["apple-silicon-support","applesilicon","docker","laravel","mailpit","mysql","nginx","opensearch","opensearch-dashboards","php","redis","traefik","varnish"],"created_at":"2024-12-17T16:16:26.517Z","updated_at":"2026-04-11T18:03:29.079Z","avatar_url":"https://github.com/ityetti.png","language":"Dockerfile","readme":"#  Laravel 2 Docker to Development (Apple Silicon)\n\n### Traefik + Nginx + Redis + PHP-FPM + MySQL + XDebug + Mailpit + RabbitMQ + OpenSearch + Varnish\n\nThe docker stack is composed of the following containers\n\n| Name                 | Version |\n|----------------------|---------|\n| traefik              | 3.2     |\n| nginx                | 1.27    |\n| php-fpm              | 8.2     |\n| php-fpm-xdebug       | 3.2.2   |\n| redis                | 7.4     |\n| mysql                | 8.4.3   |\n| mailpit              | 1.21    |\n| rabbitmq             | 4.0.4   |\n| opensearch           | 2.18    |\n| opensearch-dashboard | 2.18    |\n| varnish              | 7.6     |\n\n### Container traefik\nStarts a reverse proxy and load balancer for project\u003cbr\u003e\nOpens local port: `80`, `443`\n\n### Container nginx\nBuilds from the nginx folder. \u003cbr\u003e\nMounts the folder laravel from the project main folder into the container volume `/home/laravel`.\u003cbr\u003e\n\n### Container php-fpm\nBuilds from the php-fpm folder.\u003cbr\u003e\nMounts the folder laravel from the project main folder into the container volume `/home/laravel`.\u003cbr\u003e\nThis container includes all dependencies for Laravel.\u003cbr\u003e\n\n### Container php-fpm-xdebug\nBuilds from the php-fpm-xdebug folder.\u003cbr\u003e\nMounts the folder laravel from the project main folder into the container volume `/home/laravel`.\u003cbr\u003e\nThis container includes all dependencies for Laravel (also contain xDebug).\u003cbr\u003e\n\n### Container redis:\nStarts a redis container.\u003cbr\u003e\n\n### Container mysql:\nPlease change or set the mysql environment variables\n    \n    MYSQL_DATABASE: 'xxxx'\n    MYSQL_ROOT_PASSWORD: 'xxxx'\n    MYSQL_USER: 'xxxx'\n    MYSQL_PASSWORD: 'xxxx'\n    MYSQL_ALLOW_EMPTY_PASSWORD: 'xxxxx'\n\nDefault values:\n\n    MYSQL_DATABASE: 'laravel'\n    MYSQL_ROOT_PASSWORD: 'root_pass'\n    MYSQL_USER: 'laravel_user'\n    MYSQL_PASSWORD: 'PASSWD#'\n    MYSQL_ALLOW_EMPTY_PASSWORD: 'false'\n\nOpens up port: `3306`\n\nNote: On your host, port 3306 might already be in use. So before running docker-compose.yml, under the docker-compose.yml's mysql section change the host's port number to something other than 3306, select any as long as that port is not already being used locally on your machine.\n\n### Container mailpit:\nStarts a mailpit container.\u003cbr\u003e\nOpens up port: `8025`\n\n### Container rabbitmq:\nStarts a rabbitmq container.\u003cbr\u003e\nOpens up port: `15672`\n\n### Container opensearch:\nStarts an opensearch container.\u003cbr\u003e\n\n### Container opensearch-dashboard:\nStarts an opensearch dashboard container.\u003cbr\u003e\nOpens up port: `5601`\n\n### Container varnish:\nBuilds from the varnish folder.\nStarts a varnish container.\u003cbr\u003e\nOpens up port: `6081`\n\n## Setup\nCopy your `.env.sample` to `.env` file in root folder, and change `PROJECT_NAME` and `PROJECT_VIRTUAL_HOST`:\u003cbr\u003e\n`PROJECT_NAME` - help you to create simple and clear container names.\u003cbr\u003e\n`PROJECT_VIRTUAL_HOST` - it is your main url address.\u003cbr\u003e\n\nFor example:\n\n    PROJECT_NAME=laravel\n    PROJECT_VIRTUAL_HOST=laravel.test\n\nEdit your `/etc/hosts` and add next line:\u003cbr\u003e\n`127.0.0.1 laravel.test traefik.laravel.test mail.laravel.test search.laravel.test dashboard.laravel.test rabbit.laravel.test`\u003cbr\u003e\n\nTo start/build the stack.\u003cbr\u003e\nUse - `docker-compose up` or `docker-compose up -d` to run the container on detached mode.\u003cbr\u003e\nCompose will take some time to execute.\u003cbr\u003e\nAfter the build has finished you can press the ctrl+c and docker-compose stop all containers.\n\n## Installing Laravel\nTo the run installation process use next commands.\u003cbr\u003e\nCreate and install new project:\n\n    ./scripts/composer create-project laravel/laravel .\n    ./scripts/npm install\n    ./scripts/npm run build\n    ./scripts/php artisan key:generate\n    ./scripts/php artisan migrate\n\n## Setting up Laravel\nTo access the laravel homepage, go to the following url: https://laravel.test\u003cbr\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003eStoring sessions and cache in redis.\u003c/summary\u003e\n\n##### As reference, you could use files from `laravel_config` folder.\n\n#### Setting up vite.config.js (you need to add the correct server configuration).\n\n```js\n   server: {\n        host: 'nginx',\n        port: 5175,\n        https: true,\n    },\n```\n\n#### Setting up the boot method in /app/Providers/AppServiceProvider.php (it is necessary for the correct use of HTTPS locally).\n\n```php\npublic function boot(): void\n    {\n        if (config('app.env') === 'local') {\n            URL::forceScheme('https');\n        }\n    }\n```\n\n#### Don't forget to change the following parameters in the .env file of the Laravel app folder.\n\n```php\nAPP_URL=https://laravel.test\nDB_CONNECTION=mysql\nDB_HOST=mysql\nDB_PORT=3306\nDB_DATABASE=laravel_db\nDB_USERNAME=laravel_user\nDB_PASSWORD=\"PASSWD#\"\nREDIS_CLIENT=redis\nREDIS_HOST=redis\nREDIS_PASSWORD=null\nREDIS_PORT=6379\nMAIL_HOST=mailpit\n```\n\n\u003c/details\u003e\n\n\n## How to use xDebug\nYou could enable or disable xDebug with the next command: `./scripts/switch_mode [fpm|xdebug]`\u003cbr\u003e\n`fpm` - Enable container without xDebug \u003cbr\u003e\n`xdebug` - Enable container with xDebug \u003cbr\u003e\n\n\nAlso, you can open:\u003cbr\u003e\nhttps://traefik.laravel.test - **Traefik Dashboard** (traefik/traefik123 for access)\u003cbr\u003e\nhttps://mail.laravel.test - **Mailpit**\u003cbr\u003e\nhttps://search.laravel.test - **OpenSearch**\u003cbr\u003e\nhttps://dashboard.laravel.test - **OpenSearch Dashboard**\u003cbr\u003e\nhttps://rabbit.laravel.test - **RabbitMQ** (guest/guest for access)\u003cbr\u003e\n\n## Feature Updates\n- v1.0.0 - Initial release\n\n## Branches\n| Name | Laravel |\n|------|---------|\n| main | 11.x    |","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fityetti%2Flaravel-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fityetti%2Flaravel-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fityetti%2Flaravel-docker/lists"}