{"id":13990657,"url":"https://github.com/SpiralOutDotEu/dockervel","last_synced_at":"2025-07-22T13:30:41.018Z","repository":{"id":146251907,"uuid":"48667060","full_name":"SpiralOutDotEu/dockervel","owner":"SpiralOutDotEu","description":"Laravel development environment in Docker containers","archived":false,"fork":false,"pushed_at":"2018-11-24T09:44:53.000Z","size":16,"stargazers_count":30,"open_issues_count":1,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-09T13:17:36.874Z","etag":null,"topics":["artisan-command","docker","docker-compose","docker-container","gulp","laravel","nginx","nodejs","redis"],"latest_commit_sha":null,"homepage":null,"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/SpiralOutDotEu.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}},"created_at":"2015-12-28T01:12:58.000Z","updated_at":"2023-05-12T16:43:17.000Z","dependencies_parsed_at":"2024-01-18T04:55:46.848Z","dependency_job_id":"4023f3e0-4163-44d2-9afa-a154d3d9c48c","html_url":"https://github.com/SpiralOutDotEu/dockervel","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/SpiralOutDotEu%2Fdockervel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpiralOutDotEu%2Fdockervel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpiralOutDotEu%2Fdockervel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SpiralOutDotEu%2Fdockervel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SpiralOutDotEu","download_url":"https://codeload.github.com/SpiralOutDotEu/dockervel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227098914,"owners_count":17730667,"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":["artisan-command","docker","docker-compose","docker-container","gulp","laravel","nginx","nodejs","redis"],"created_at":"2024-08-09T13:03:03.697Z","updated_at":"2024-11-29T10:31:12.505Z","avatar_url":"https://github.com/SpiralOutDotEu.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Dockervel\n\n## A complete Laravel development environment in Docker Containers\n\n### Update (11/18): Now with PHP7 \u0026 Unit test support\n\n* Bring Up a Laravel development environment with a single command easy as `dup`\n* Execute Artisan commands easy as  `dartisan make:auth`\n* Run Composer command easy as `dcomposer update`\n* Run NodeJS script easy as `dnodejs npm install`\n* Run gulp watch easy as `dgulp-watch`\n* Containers managed with docker-compose\n* Lightweight as it is mostly based in Linux Alpine base image of 5MB.\n* Using Docker-composer version 2 (new)\n\n### Containers included\n\n* Nginx 1.14 \u0026 PHP 7.2 running in Alpine\n* MySQL running in Alpine\n* Redis running in Alpine\n* Composer PHP running in Alpine.\n* Artisan running in Alpine\n* NodeJS with gulp, grunt and bower -g installed in official node:4.2.2-slim base image\n* Volumes mounted as containers\n\n## Usage\n\nMake sure you have `docker` `docker-machine` and `docker-compose` installed. See [here for installing them](http://www.spiralout.eu/2015/12/docker-installation-in-linux-mint-and.html)\n\n* clone this repo: `git clone https://github.com/SpiralOutDotEu/dockervel.git`\n* cd in: `cd dockervel`\n* run as su: `sudo su`\n* add aliases: `. ./aliases.sh`\n* run: `dup`\n\nand you have a server running! Hit `localhost` in your browser and you will see nginx fault message becasuse there is no `www/public/index.php`.\n\n* create new Laravel project: `dcomposer-create`\n* or create new Lumen project: `dcomposer-create-lumen`\n* fix permissions: `dpermit`\n* change .env: [see below for options](https://github.com/SpiralOutDotEu/dockervel/blob/master/README.md#configure-laravel-for-mysql)\n* run artisan commands: `dartisan make:auth` , `dartisan migrate`\n* fix permissions: `dpermit`\n\nNow you have a registration system active. Go to `localhost` and register a new user to see that db's are running ok.\n\n* npm install: `dnodejs npm install`\n* gulp install: `dnodejs gulp install`\n* gulp watch: `dulp-watch`\n\nNow there is one container running `gulp watch` and monitors changes on files according your `gulpfile.js`\n\n* Run PhpUnit test with `dunit`\n\n## aliases\n\naliases.sh contains shortcuts to common commands.\nrun dot space dot /aliases.sh to activate aliases for this terminal session.\n\n```bash\n . ./aliases.sh\n```\n\nand now for this terminal session you have aliases like `dartisan`, `dcomposer`, `dnodejs`, `dup`, `dstop`, `dunit`.\n\nIf you don't want to work with aliases, open the script and see the coressponding commands next to each alias.\nIn the following document it is supposed that you have executed `aliashes.sh` as `su` and you have the aliases active.\n\n### Create new Laravel Project\n\n* create new laravel project: `dcomposer-create`\n* type `localhost` in your browser and you see the Laravel welcome screen\n\n### or Create new Lumen Project\n\n* create new laravel project: `dcomposer-create-lumen`\n* type `localhost` in your browser and you see the Lumen welcome screen\n\n### Fix permitions\n\nsince containers have different user in them, you have to change the permisions in www/ folder to be able to write. type:\n\n```bash\n dpermit\n```\n\nit will simply `chmod -R 777 www`\nRemember to run `dpermit` after each time the `www` folder has a new file.\n\n### Configure Laravel for mysql\n\nchange `DB_HOST` in `.env` to point to `mysql`. This is the name that it is used in docker-compose.yml (`link: -mysql:mysql`)\n\n```ini\nDB_HOST=mysql\nDB_DATABASE=homestead\nDB_USERNAME=homestead\nDB_PASSWORD=secret\n```\n\n### Configure Laravel for redis\n\nchange `REDIS_HOST` in `.env` to point to `predis`. This is the name that it is used in docker-compose.yml (`link: -redis:predis`).\n\n```ini\nREDIS_HOST=predis\nREDIS_PASSWORD=null\nREDIS_PORT=6379\n```\n\nin Laravel 5.2 there are some issues with `redis` namespace, so to avoid conflicts `predis` is used.\nAlso you have to change /config/app.php, and replace:\n\n```ini\n'Redis'     =\u003e Illuminate\\Support\\Facades\\Redis::class,\n```\n\nwith\n\n```ini\n'LaravelRedis'     =\u003e Illuminate\\Support\\Facades\\Redis::class,\n```\n\nUse it like:\n\n```php\n$redis= LaravelRedis::connection();\n$redis-\u003eset('name', 'myname');\n$redis-\u003eget('name');\n```\n\n### Running Artisan commands\n\ntype `dartisan` followed by an artisan command\n\n```bash\nexample:\n$ dartisan make:auth\n$ dartisan migrate\n$ dartisan tinker\n```\n\n### Running composer commands\n\ntype `dcomposer` followed by a composer command\n\n```bash\nexample:\n$ dcomposer update\n$ dcomposer require predis/predis\n```\n\n### Nodejs\n\nto install node modules in your project run\n\n```bash\ndnodejs npm install\n```\n\n### Gulp\n\ninstall gulp with:\n\n```bash\ndnodejs gulp install:\n```\n\nrun gulp once:\n\n```bash\ndgulp\n```\n\nadd gulp watch:\n\n```bash\ndgulp-watch\n```\n\n## Credits\n\nThanx to:\n\n* [Josh Sandlin](https://github.com/dydx)\n* [Dylan Lindgren](https://github.com/dylanlindgren)\n* [10Startups](https://github.com/tenstartups)\n* [Tom Sowerby](https://medium.com/@tomsowerby)\n* [Tim de Pater](https://github.com/TrafeX)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSpiralOutDotEu%2Fdockervel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSpiralOutDotEu%2Fdockervel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSpiralOutDotEu%2Fdockervel/lists"}