{"id":18676042,"url":"https://github.com/patricnox/laravel-docker-template","last_synced_at":"2026-03-09T03:31:26.727Z","repository":{"id":38119787,"uuid":"279628823","full_name":"PatricNox/laravel-docker-template","owner":"PatricNox","description":"Template for cleaned up Laravel within Docker, featuring phpcs","archived":false,"fork":false,"pushed_at":"2023-04-19T21:12:05.000Z","size":460,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"laravel10-php8","last_synced_at":"2025-04-12T02:12:00.829Z","etag":null,"topics":["boilerplate","docker","laravel","phpcs"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"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/PatricNox.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":"2020-07-14T15:50:43.000Z","updated_at":"2023-02-14T17:37:06.000Z","dependencies_parsed_at":"2024-11-07T09:42:49.263Z","dependency_job_id":null,"html_url":"https://github.com/PatricNox/laravel-docker-template","commit_stats":null,"previous_names":[],"tags_count":1,"template":true,"template_full_name":null,"purl":"pkg:github/PatricNox/laravel-docker-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatricNox%2Flaravel-docker-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatricNox%2Flaravel-docker-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatricNox%2Flaravel-docker-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatricNox%2Flaravel-docker-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PatricNox","download_url":"https://codeload.github.com/PatricNox/laravel-docker-template/tar.gz/refs/heads/laravel10-php8","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatricNox%2Flaravel-docker-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30281489,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:57:19.223Z","status":"ssl_error","status_checked_at":"2026-03-09T02:56:26.373Z","response_time":61,"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":["boilerplate","docker","laravel","phpcs"],"created_at":"2024-11-07T09:27:26.802Z","updated_at":"2026-03-09T03:31:26.689Z","avatar_url":"https://github.com/PatricNox.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Title\r\nProject description\r\n\r\n## Project\r\nThis project running on Laravel 7.x, using docker as the development\r\nenvironment setup.\r\n\r\n\u003e In order to get the very same environment local as production, and amongst the developers, we use docker to emulate the prod server environment!\r\n\r\nYou can learn more about docker and its possibilities at: [Docker.com](https://store.docker.com/search?type=edition\u0026offering=community)\r\n\r\n\r\n## Information\r\nSpecs:\r\n\r\n- php 7.4\r\n- apache 2.4\r\n- mysql 5.7\r\n\r\n## Requirements\r\n\r\n- [Docker](https://store.docker.com/search?type=edition\u0026offering=community)\r\n- [Docker Compose](https://docs.docker.com/compose/install/)\r\n- Any bash terminal\r\n- Windows 10 / Linux / MacOS\r\n\r\n## Getting started\r\n\r\n### Containers\r\n\r\n**Note**: \r\nIf you are on windows, you need to add the C:\\\\ drive to the resource settings \r\nin docker. See _FAQ_  @ `Windows: \"Filesharing has been cancelled\"`at the bottom of the readme for instructions.\r\n\r\n**To start containers**, simply run:\r\n\r\n`$ docker-compose up -d`\r\n\r\nThe `-d` flag will run the containers as a daemon in the background.\r\n\r\n**To stop**:\r\n\r\n`$ docker-compose stop`\r\n\r\nStopping can be likened to putting the containers to sleep.\r\n\r\n## Dev script\r\nThis project consists of a various set of third-party dependency package managers and et cetera. \r\nSince we run the project in the Docker container, we need to run them all from inside the container. \r\nFor convenience there's a script made to help with this for each package:\r\n\r\n\u003e **Tip**: Create an alias for `dev.sh` in bashrc!\r\n\r\n\r\n\u003e **Windows devs**: If you are on Windows, you need to use a bash terminal in order to run the script.\r\n\r\n\r\n### Composer\r\nDependencies are managed through composer.\r\n\r\n`$ ./dev.sh composer install`\r\n\r\n\r\n### Artisan\r\nArtisan is a CLI tool to help with common Laravel tasks.\r\n\r\n`$ ./dev.sh artisan`\r\n\r\n### PHP CodeSniffer\r\nPHPCS is a package to help enforce clean code base. The rules are specified in `phpcs.xml`\r\nand can be altered at any time.\r\n\r\n`$ ./dev.sh phpcs`\r\n\r\nTo automatic fix all errors:\r\n\r\n`$ ./dev.sh phpcbf`\r\n\r\n\r\n### Container scripts\r\nSometimes you maybe wish to enter the container to verify, check or execute commands\r\nfrom there within instead of using the dev script.\r\n\r\n`$ ./dev.sh bash`\r\n\r\n`$ ./dev.sh root`\r\n\r\n\r\n## Initial Setup\r\nTo install neccesary development tools and first instance of website, run the\r\nsuitable commands:\r\n\r\n\r\n\u003e docker-compose build \u0026\u0026 docker-compose up -d \u0026\u0026 ./dev.sh composer install\r\n\r\n### Laravel\r\n\r\nIn a laravel project you will need to set the `.env` file and generate a key. \r\nThere's an example file of the environment file that has been altered in order to minimize\r\namount of required manual editing. \r\n\r\n`cp laravel/.env.example laravel/.env \u0026\u0026 ./dev.sh artisan key:generate`\r\n\r\n### Done!\r\n\r\nYou can now visit the project at http://localhost/ .\r\n\r\n### Additional\r\n\r\n## Mails within the application on local environment (Mailhog)\r\nThe docker setup includes a Mailhog installation, for you to test the mail functionalities (if any)\r\nwithin your local environment. \r\n\r\n\u003e http://localhost:8025/\r\n\r\n## FAQ\r\n\r\n### How do I connect to the database?\r\nUsing any database GUI software, use the following credentials in order to connect to\r\nthe local database in your environment that's set up from docker.\r\n\r\n* Host: 0.0.0.0 (or localhost)\r\n* User: laravel\r\n* Password: laravel\r\n* Database: laravel\r\n\r\n### Is the production also within a container?\r\nDue to (docker being a performance issue)[https://docs.docker.com/config/containers/runmetrics/], \r\nthe project uses it only for local environments.\r\n\r\n### How do I enter the container?\r\nThe dev.sh script has the answer!\r\n\r\n`./dev.sh bash`\r\n\r\nalternatively, enter as root\r\n\r\n`./dev.sh root`\r\n\r\n### I got permission issues?\r\nDepending on OS, it can give these mysterious problems for some.\r\n\r\nFix it by:\r\n\r\n`./dev.sh root`\r\n\r\n\r\n`$ chown -R www-data:www-data /var/www`\r\n\r\n### Windows: \"Filesharing has been cancelled\"\r\n\r\nAdd the C:\\\\ drive to the resource settings in docker.\r\n\r\n![Windows fileshare issue](help/windows-docker-help.png)\r\n\r\n### On Windows, can I set an alias for the dev script?\r\n\r\nOf course! Using bash, you can simply create an `.bashrc` file with your aliases\r\nwithin. Some good aliases would be `d` for `dev.sh` and `dc` for `docker-compose`.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatricnox%2Flaravel-docker-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatricnox%2Flaravel-docker-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatricnox%2Flaravel-docker-template/lists"}