Compare commits

...

177 Commits

Author SHA1 Message Date
99fb1b4169 Merge pull request #474 from AliveCorpse/master
Fix load of mongodb library
2016-12-12 13:37:13 -05:00
6c9d5866b4 Merge pull request #477 from thebrubaker/patch-1
Update Readme.md
2016-12-12 08:58:27 +08:00
e8ef7ab8c9 Update Readme.md
Very small grammar updates.
2016-12-11 14:41:10 -08:00
5da5d5e29c Merge pull request #476 from jbaron-mx/master
Fix typos and missing commas in docs
2016-12-11 10:34:58 -05:00
19a2110b06 Fix typos and missing commas in docs 2016-12-10 22:22:40 -06:00
2fab33d4e4 Fix load of mongodb library
```
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/20151012/mongodb.so' - /usr/lib/php/20151012/mongodb.so: undefined symbol: php_json_serializable_ce in Unknown on line 0
```
2016-12-09 21:13:04 +02:00
4f819c238c Merge pull request #451 from Blaasvis/master
Update MySQL startup script
2016-11-28 22:53:32 -05:00
d8875cb588 Update startup 2016-11-28 21:25:52 +01:00
bb9f65eb2a Merge pull request #445 from danielabbatt/patch-1
Update README.md
2016-11-26 01:33:50 +08:00
d6508f3bb3 Update README.md
Fixed typo on "environment"
2016-11-25 16:59:13 +00:00
a3288462a8 Merge pull request #434 from dlnsk/Fixes
Fixes for nginx and mysql
2016-11-25 01:51:25 -05:00
225fb8cf4f Merge pull request #384 from LarryEitel/phpstorm-guide
phpstorm-debugging-guide
2016-11-18 16:03:33 -05:00
f67edee5e5 LaraDock-PHPStorm Debugging Guide
-	modified:   README.md
-	new file:   _guides/photos/KiTTY/Connection.png
-	new file:   _guides/photos/KiTTY/ConnectionData.png
-	new file:   _guides/photos/KiTTY/ConnectionSSH.png
-	new file:   _guides/photos/KiTTY/ConnectionSSHAuth.png
-	new file:   _guides/photos/KiTTY/Session.png
-	new file:   _guides/photos/KiTTY/Terminal.png
-	new file:   _guides/photos/KiTTY/TerminalKeyboard.png
-	new file:   _guides/photos/KiTTY/TerminalShell.png
-	new file:   _guides/photos/KiTTY/Window.png
-	new file:   _guides/photos/KiTTY/WindowAppearance.png
-	new file:   _guides/photos/PHPStorm/DebugRemoteOn.png
-	new file:   _guides/photos/PHPStorm/RemoteDebuggingSuccess.png
-	new file:   _guides/photos/PHPStorm/RemoteHost.png
-	new file:   _guides/photos/PHPStorm/RemoteTestDebuggingSuccess.png
-	new file:   _guides/photos/PHPStorm/RemoteWebDebuggingSuccess.png
-	new file:   _guides/photos/PHPStorm/Settings/BuildDeploymentConnection.png
-	new file:   _guides/photos/PHPStorm/Settings/BuildDeploymentConnectionMappings.png
-	new file:   _guides/photos/PHPStorm/Settings/BuildDeploymentDebugger.png
-	new file:   _guides/photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png
-	new file:   _guides/photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png
-	new file:   _guides/photos/PHPStorm/Settings/LangsPHPDebug.png
-	new file:   _guides/photos/PHPStorm/Settings/LangsPHPInterpreters.png
-	new file:   _guides/photos/PHPStorm/Settings/LangsPHPPHPUnit.png
-	new file:   _guides/photos/PHPStorm/Settings/LangsPHPServers.png
-	new file:   _guides/photos/PHPStorm/Settings/WindowsFirewallAllowedApps.png
-	new file:   _guides/photos/PHPStorm/Settings/WindowsHyperVManager.png
-	new file:   _guides/photos/PHPStorm/Settings/hosts.png
-	new file:   _guides/photos/SimpleHostsEditor/AddHost_laravel.png
-	new file:   _guides/phpstorm.md
2016-11-18 14:12:10 -06:00
e5a8fb9c95 Merge pull request #437 from philtrep/fix-mysql-change-env
Added proper creation of mysql user, removal of default homestead user
2016-11-18 10:12:37 -05:00
4ef5db3713 Added proper creation of mysql user, removal of default homestead user 2016-11-17 16:37:51 -05:00
6bbd1fbe19 Use mysql 5.7 with disabled option ONLY_FULL_GROUP_BY (which causes many problem to people) 2016-11-16 16:16:52 +07:00
d703c82c46 Exclude sites configuration from image and just use volume 2016-11-16 15:58:42 +07:00
ecc4e06740 Merge pull request #432 from philtrep/port-already-allocated
Added 'port is already allocated' error to the docs debugging section
2016-11-15 09:20:37 -05:00
8b09149b15 Added 'port is already allocated' error to the docs debugging section 2016-11-14 20:48:59 -05:00
380178e6fa Merge pull request #429 from philtrep/mysql-bind-port
Added mysql change port bind documentation
2016-11-14 11:34:02 -05:00
be64b54606 Merge pull request #428 from laradock/appleboy-patch-1
fixed #420 remove phpmyadmin volume setting.
2016-11-14 11:32:55 -05:00
cbeeb48aa1 Added mysql change port binnd documentation 2016-11-14 11:24:28 -05:00
7e2814168a fixed #420 remove phpmyadmin volume setting. 2016-11-14 23:45:52 +08:00
5e9ae56a7f Merge pull request #419 from laradock/yarn
Revert #418 and fix install yarn package management.
2016-11-10 09:32:19 -05:00
5d98e78dba Revert #418 and fix install yarn package management.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-11-10 10:23:49 +08:00
c5d1116333 Merge pull request #418 from moxar/yarn
Fix a bug that prevents yarn from installing #415
2016-11-09 15:17:42 -05:00
5594c53e03 Fix bug in PATH 2016-11-09 17:55:35 +01:00
44045f85e6 Fix a bug that prevents yarn from installing 2016-11-09 16:14:49 +01:00
fc31a2415c Merge pull request #414 from joaojoyce/postgis-support
Postgis Support
2016-11-08 09:45:31 -05:00
a42f62c626 Postgis 2016-11-08 13:17:23 +00:00
3e4a5edc64 Merge pull request #407 from michaeljhopkins/patch-2
Add solution to mysql connection issues
2016-11-05 18:52:53 -04:00
9289c1b6c0 Add solution to mysql connection issues
Adding in a more "docker conventional" solution to the mysql connection issues
2016-11-05 06:42:19 -06:00
3f157a3277 Merge pull request #403 from darthrevan13/patch-1
Fix for mariadb local path
2016-11-03 23:02:16 +08:00
f732bb283b update the workspace container version 2016-11-03 09:50:21 -04:00
ca4aeada08 add missing step to the docs 2016-11-03 09:50:10 -04:00
3d54d68aa1 Fix for mariadb local path
When running docker-compose with mariadb the following message will appear:

ERROR: for mariadb  Cannot create container for service mariadb: Invalid volume spec "mariadb": Invalid volume destination path: 'mariadb' mount path must be absolute.
ERROR: Encountered errors while bringing up the project.

This commit fixes the issue.
2016-11-03 15:45:59 +02:00
a0153810c6 remove laradock logo on zh document.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-11-02 13:43:45 +08:00
4fe15ad5cf update docs 2016-11-01 10:07:21 -04:00
146f8ea6f4 rename volumes_source to applications 2016-11-01 10:05:10 -04:00
9ab6d8fa15 remove volumes container 2016-11-01 10:03:47 -04:00
f6d9ac6853 Merge pull request #401 from dsampaolo/fix-phpunit-path-missing
fix #395 adds phpunit path to non-root user's .bashrc
2016-11-01 15:51:10 +08:00
470994fc23 fix #395 adds phpunit path to non-root user's .bashrc 2016-11-01 07:19:58 +01:00
1b05dfd1e2 replace var/www/laravel with var/www 2016-10-31 21:45:50 -04:00
03bba8d2de Merge pull request #400 from LaraDock/appleboy-patch-1
fix phpunit path for multiple project.
2016-10-31 21:32:33 -04:00
b6c7746a0d fix workdir path.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-11-01 09:23:40 +08:00
e7baf3cfc3 fix phpunit path 2016-11-01 09:00:19 +08:00
f630970151 remove ./databases:/docker-entrypoint-initdb.d until it works 2016-10-31 20:46:02 -04:00
3070eac7b7 Merge pull request #399 from LaraDock/multiple-projects
Multiple projects
2016-10-31 20:32:44 -04:00
66723c0278 update the doc to support multiple projects 2016-10-31 20:30:34 -04:00
dbee864d44 rename laravel.conf to default and add sample conf 2016-10-31 19:50:30 -04:00
739cc31f4c change app mapping directory from www/laravel to www
also add sample to show facilitate setup for multiple sites
2016-10-31 19:49:48 -04:00
28130c5907 delete site_a and site_b nginx config samples 2016-10-31 19:31:15 -04:00
658d4e7532 add root access section to mysql docs 2016-10-31 19:30:12 -04:00
5da4058613 delete the drupal sample nginx config file 2016-10-31 19:28:47 -04:00
2ed09f42ca change workspace and php-fpm work directories
making them compatible with multiple projects
2016-10-31 19:28:25 -04:00
6ee790c26d Add support for Codeigniter 2016-10-31 12:21:01 -04:00
a1ade52cd6 Merge pull request #369 from LaraDock/patch
fixed #363 PHP_IDE_CONFIG variable.
2016-10-31 08:08:48 -04:00
05f4f371fe Merge pull request #396 from LaraDock/appleboy-patch-1
Update caddy version and fix format.
2016-10-31 08:05:45 -04:00
33e99ca9cf update format. 2016-10-31 14:58:39 +08:00
e913fd941e Update caddy version and fix format. 2016-10-31 14:36:44 +08:00
5286fd654a remove redundant spaces 2016-10-31 14:33:57 +08:00
499342ea39 Merge pull request #391 from hopewise/master
clarified where to run xdebugPhpFpm command
2016-10-26 19:59:09 -04:00
17442db357 clarified where to run xdebugPhpFpm command
As users might run the command `xdebugPhpFpm`  in the php-fpm container rather than from outside.
2016-10-26 15:21:18 +03:00
4f7b0ec0c3 Merge pull request #390 from LaraDock/elasticsearch
Add install elasticsearch plugin section.
2016-10-26 11:16:00 +08:00
a0981aa836 Add install elasticsearch plugin section.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-26 09:40:53 +08:00
6a3137fc27 Merge pull request #388 from philtrep/ssh-documentation
Added Documentation for using ssh on workspace
2016-10-24 16:47:59 -04:00
4d5e3e5e4a Added Documentation for using ssh on workspace 2016-10-24 16:11:52 -04:00
aa7c52c42e Merge pull request #386 from dilone/master
update Workspace port to 2222
2016-10-24 14:44:08 -04:00
6eed8199df update port to 2222 - no conflict linux 2016-10-24 03:58:03 -04:00
c02f17417f Merge pull request #375 from calebfavor/apache-php-double-quote-fix
Removing double quotes for apache php fpm configuration.
2016-10-17 19:34:35 -04:00
91bae76527 No longer using env variable to set the apache php socket config variable. 2016-10-17 16:05:35 -07:00
891911ddc3 Removing double quotes for apache php fpm configuration. 2016-10-17 14:17:23 -07:00
89fac4bdbe Merge pull request #371 from imamassi/master
Quick steps to resolve connection refused error
2016-10-16 22:59:19 -04:00
22a3bbc0b0 Quick steps to resolve connection refused error 2016-10-16 07:51:49 +07:00
89a21ccf1b fixed #363 PHP_IDE_CONFIG variable.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-15 08:50:17 +08:00
15892dba51 Merge pull request #367 from aletundo/Fix_mysql_dockerfile
Fixed mysql tag dockerfile
2016-10-14 16:12:19 -04:00
1fa1dc9a1c Fixed mysql tag dockerfile
Signed-off-by: Alessandro Tundo <alessandrotundo94@gmail.com>
2016-10-14 21:04:24 +02:00
c4cd3ed2ac Merge pull request #365 from geocine/nginx-charset-utf8
use utf8 charset on nginx
2016-10-14 14:31:56 -04:00
ffe45fed50 use utf8 charset on nginx 2016-10-15 01:01:59 +08:00
bd1f6ebd8a Merge pull request #364 from LaraDock/downgrade-mysql
downgrade MySQL to 5.6 (stable)
2016-10-14 12:28:42 -04:00
f35e5501db downgrade MySQL to 5.6 (stable) 2016-10-14 12:26:11 -04:00
8d1ba2e802 Merge pull request #361 from LaraDock/yarn
Support Yarn package manager for JavaScript
2016-10-13 20:04:19 -05:00
c9415b12c0 Add YARN flag in production mode..
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-14 09:01:50 +08:00
8544de7ea1 update readme.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-13 14:48:00 +08:00
62e0f0443c Support Yarn MANAGEMENT tool.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-13 12:06:30 +08:00
a2847316c4 Merge pull request #358 from appleboy/patch-22
convert tab to spaces.
2016-10-11 12:49:43 -04:00
9d212afc8c convert tab to spaces.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-10-11 20:17:21 +08:00
89a77bee24 Merge pull request #354 from philtrep/change-timezone
Added timezone arguments to workspace build
2016-10-10 10:44:30 -04:00
fb26035e5c Added timezone arguments to workspace build 2016-10-10 09:44:25 -04:00
c7a76dd683 add LaraDock v4 Video link :D 2016-10-10 08:57:52 -04:00
781f5ff972 add missing info to the readme 2016-10-10 07:32:01 -04:00
5c0e55204e add folder structures to the README 2016-10-10 04:30:15 -04:00
dd3ab5ade1 add warning to the readme asking people to rebuild their containers 2016-10-10 03:50:44 -04:00
2e5d2a743c disable xdebug remote by default 2016-10-09 20:47:08 -04:00
5635b47c6f refactor the workspace docker file 2016-10-09 20:27:03 -04:00
56f422ade0 replace true parameters by false as the default 2016-10-09 20:05:33 -04:00
58d6d8e745 Merge pull request #352 from LaraDock/revert-db-ports
Revert ports fowarding for MySQL and MariaDB
2016-10-09 16:52:29 -04:00
7ecb712e76 Revert ports fowarding for MySQL and MariaDB
Include production docker compose file
2016-10-09 16:51:18 -04:00
3abb6152c8 Merge pull request #351 from philtrep/readme-mysql-host-access
Added instructions for forward the MySQL/MariaDB port to README
2016-10-09 13:57:57 -04:00
5221544b98 Added instructions for forward the MySQL/MariaDB port to README 2016-10-09 13:52:33 -04:00
2396b4799c Merge pull request #350 from geocine/cannot-open-nvm-sh-fix
fix for issue #347
2016-10-09 13:12:19 -04:00
08fa1bc95c fix for issue #347 2016-10-10 01:06:10 +08:00
2415566230 general updates to the readme 2016-10-09 02:26:50 -04:00
5fea003ffe update installation. 2016-10-09 11:19:50 +08:00
e9af2a4fb3 Merge branch 'master' of https://github.com/LaraDock/laradock
* 'master' of https://github.com/LaraDock/laradock:
  Fix typo in README: Giude -> Guide
  Added laravel cronjob
  Added cron files copying to workspace crontab
  Remove port fowarding for MySQL and MariaDB
  Added NVM binaries in root bashrc
2016-10-06 17:57:18 -04:00
d0dea21cc5 update readme credits section 2016-10-06 17:55:41 -04:00
942d1cfbed Merge pull request #340 from philtrep/workspace-cron
Simple cron jobs
2016-10-03 23:24:31 -04:00
57ec81ed52 Merge pull request #341 from rogeriopradoj/patch-1
Fix typo in README: Giude -> Guide
2016-10-03 23:23:33 -04:00
8d62070773 Fix typo in README: Giude -> Guide 2016-10-03 23:51:48 -03:00
8933b827b3 Added laravel cronjob 2016-10-03 20:29:45 -04:00
6f435584a9 Added cron files copying to workspace crontab 2016-10-03 20:21:28 -04:00
a1fd2aabcd Merge pull request #339 from philtrep/expose-database-ports
Remove port fowarding for MySQL and MariaDB
2016-10-03 17:01:37 -04:00
3e2b413094 Merge pull request #338 from philtrep/master
Added NVM binaries in root bashrc
2016-10-03 15:43:43 -04:00
ec3ebb9701 Remove port fowarding for MySQL and MariaDB 2016-10-03 13:25:34 -04:00
cfc48b3791 Added NVM binaries in root bashrc 2016-10-03 13:10:31 -04:00
3725ad4c46 edit readme: adding Admins list 2016-09-27 19:10:20 -04:00
a0b75bac46 Merge pull request #328 from lukasoppermann/patch-1
Fixing typo
2016-09-26 21:11:46 -04:00
489740848f Fixing typo
Software has no different plural form.
2016-09-24 08:57:47 +02:00
b2aa38877b Merge pull request #315 from mjcriswell/my-fix-branch
Windows Powershell command to enter container
2016-09-19 12:43:38 -04:00
51703f00fc Windows Powershell command to enter container
Allows a Windows Powershell user to enter a running container to avoid the following error message.
Interactive mode is not yet supported on Windows.
Please pass the -d flag when using `docker-compose exec`.
2016-09-16 13:51:19 -07:00
f1716a2767 update readme, add more awesome contributors 2016-09-15 10:48:20 -04:00
5640bd963d Activating OpCache
Closes #307
2016-09-15 10:47:58 -04:00
8bb69beb84 t fetch Merge branch 'master' of https://github.com/LaraDock/laradock
* 'master' of https://github.com/LaraDock/laradock:
  Fixes #305
  add mysql custom configuration file.
  fix php warning "Unable to load dynamic library '/usr/lib/php/20151012/aerospike.so'" when aerospike set not install at workspace
  add build options MAX_ALLOWED_PACKET to mysql
  update readme for ElasticSearch.
  Support ElasticSearch Container.
  Add vue-cli on workspace npm global installers
  modify words in Chinese
  Add aerospike extension installation on phpfpm-56 as well
2016-09-15 10:24:51 -04:00
76afeedc33 Merge pull request #308 from francislavoie/patch-3
Fixes #305
2016-09-15 10:16:01 -04:00
16b6223ba9 Fixes #305 2016-09-13 21:40:03 -04:00
1b88c2c9d8 Merge pull request #303 from appleboy/patch-20
Revert #297 add mysql custom configuration file.
2016-09-11 03:14:18 -04:00
b254d4a9c9 add mysql custom configuration file.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-09-11 08:39:25 +08:00
2ed475f1ef Merge pull request #300 from lialosiu/master
fix php warning in Workspace: "Unable to load dynamic library aerospike"
2016-09-10 17:48:24 -04:00
3a5100097a fix php warning "Unable to load dynamic library '/usr/lib/php/20151012/aerospike.so'" when aerospike set not install at workspace 2016-09-10 16:53:15 +08:00
15b3fe65c1 Merge pull request #297 from lialosiu/master
add build options MAX_ALLOWED_PACKET to mysql
2016-09-09 13:04:49 -04:00
da6face95e add build options MAX_ALLOWED_PACKET to mysql 2016-09-09 10:21:33 +08:00
a31cef6eb1 Merge pull request #294 from appleboy/patch-11
Support ElasticSearch Container
2016-09-07 09:42:09 -04:00
a005281f4f Merge pull request #291 from luciano-jr/feature/vue-cli-workspace
Feature/vue cli workspace
2016-09-07 09:42:03 -04:00
907c694834 update readme for ElasticSearch.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-09-07 16:44:33 +08:00
8c392e94f2 Support ElasticSearch Container.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-09-07 15:18:54 +08:00
d538274a0f Add vue-cli on workspace npm global installers 2016-09-06 23:43:03 +01:00
beeea8dc0e Merge pull request #12 from LaraDock/master
Update fork
2016-09-06 22:14:21 +01:00
53b0507eb2 Merge pull request #289 from Easter1021/patch-2
modify words in Chinese
2016-09-06 07:24:46 -04:00
a1a5b3d49f modify words in Chinese
let words look like smooth and replace wrong word in Chinese.
2016-09-06 17:46:14 +08:00
4f5dfbcb13 Merge pull request #287 from luciano-jr/bugfix/php-fpm5.6-aerospike
Bugfix/php fpm5.6 aerospike
2016-09-05 21:58:09 -04:00
f275f88396 Merge pull request #11 from luciano-jr/bugfix/php-fpm5.6-aerospike
Add aerospike extension installation on phpfpm-56 as well
2016-09-04 14:55:12 +01:00
6cc58de67e Add aerospike extension installation on phpfpm-56 as well 2016-09-04 14:50:03 +01:00
b2da8aeb3f Merge pull request #10 from LaraDock/master
Update fork
2016-09-04 14:36:12 +01:00
1345164ac3 refactor RabbitMQ Dockerfile 2016-09-04 06:33:08 -04:00
a9ecdd0008 Merge pull request #284 from appleboy/patch-1
Update postgres share volume path
2016-09-04 05:26:40 -04:00
1dab0c48d8 Merge pull request #283 from appleboy/patch-10
Add pgAdmin container
2016-09-04 05:26:10 -04:00
91f1d4347c Merge pull request #278 from LarryEitel/remove-port-22-from-docker-compose-php-fpm
remove port 22 from php-fpm because of conflict
2016-09-04 05:22:30 -04:00
4013553dbb Update postgres share volume path 2016-09-04 09:04:18 +08:00
07e4bd174e Add pgAdmin doc.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-09-03 21:32:02 +08:00
7999399e9a Add pgAdmin container.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-09-03 21:24:36 +08:00
d684cb4742 remove port 22 from php-fpm because of conflict 2016-09-02 10:38:15 -06:00
3c27c14b99 Merge pull request #9 from LaraDock/master
Update fork
2016-09-02 10:45:20 +01:00
3473b788cf Merge pull request #275 from luciano-jr/feature/aerospike-cache
Feature/aerospike cache
2016-09-01 23:53:36 +03:00
1a5c7a7b3f Update documentation 2016-09-01 15:24:39 +01:00
616e9c7d92 Merge pull request #8 from luciano-jr/feature/aerospike-cache
Feature/aerospike cache
2016-09-01 13:24:30 +01:00
a3039958e3 Fix conflicts 2016-09-01 13:23:40 +01:00
b01bae59fc Fix volumes aerospike section 2016-09-01 13:21:21 +01:00
92dc3be3b1 Remove duplicate argument on aerospike section 2016-09-01 13:05:53 +01:00
650f6a89c6 Remove own namespace from conf file 2016-09-01 12:58:10 +01:00
041d134f69 Merge pull request #7 from LaraDock/master
Just update the fork
2016-09-01 12:56:35 +01:00
79ff092105 Merge pull request #273 from LarryEitel/fix-xdebugPhpFpm
fix-xdebugPhpFpm
2016-09-01 11:47:33 +03:00
ffce0f93d5 Fix: ERROR: expr: syntax error #272 2016-08-31 05:52:03 -06:00
a2d154c30a Merge branch 'master' of github.com:LarryEitel/laradock 2016-08-31 05:46:36 -06:00
59a22aedac Merge pull request #270 from LarryEitel/add_apt-get_update_to_workspace_install_xdebug_block
fix workspace xdebug install bug - need to add apt-get update.
2016-08-30 20:30:37 +03:00
b42ad1ae7e fix workspace xdebug install bug - need to add apt-get update. 2016-08-30 11:26:54 -06:00
07d6ec85ca Merge branch 'master' of github.com:LarryEitel/laradock 2016-08-30 08:40:28 -06:00
05e0e9c817 Merge pull request #264 from LarryEitel/expose-port-22-in-workspace-add-insecure_id_rsa_ppk
expose-port-22-in-workspace-add-insecure_id_rsa_ppk
2016-08-30 11:06:16 +03:00
d441427852 Expose port 22 for workspace ssh. Add private key for PHPStorm Windows users. 2016-08-27 17:22:36 -06:00
9aa8813a3d Add aerospike.conf 2016-08-24 16:29:29 +01:00
58af86a582 Merge pull request #6 from LaraDock/master
Update fork
2016-08-24 12:36:52 +01:00
1afad7f14c Add configuration to install aerospike php extension 2016-08-20 19:05:38 +01:00
00d48fff51 Merge pull request #5 from LaraDock/master
Just update
2016-08-20 12:32:32 +01:00
9bd70aadc8 Added aerospike cache service 2016-08-20 12:28:45 +01:00
5210ca7ccf Merge pull request #4 from LaraDock/master
Just update
2016-08-15 07:34:40 +01:00
5ebb061b70 Merge pull request #3 from LaraDock/master
Merge
2016-06-24 15:19:12 +01:00
ad49981dd6 Merge pull request #2 from LaraDock/master
Just update fork
2016-05-25 23:11:49 +01:00
e135fbb970 Merge pull request #1 from LaraDock/master
Pull new commits from forked
2016-05-13 09:29:06 +01:00
66 changed files with 1526 additions and 525 deletions

View File

@ -5,7 +5,7 @@ Your contribution is more than welcome. Let's keep LaraDock amazing.
### Got a Question or Problem?
If you have questions about how to use LaraDock, please direct your questions to the discussion on [Gitter](https://gitter.im/LaraDock/laradock). If you beleave your question could help others, then consider opening an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as Question).
If you have questions about how to use LaraDock, please direct your questions to the discussion on [Gitter](https://gitter.im/LaraDock/laradock). If you believe your question could help others, then consider opening an [Issue](https://github.com/laradock/laradock/issues) (it will be labeled as Question).
### Found an Issue?
If you find a bug in the source code or a mistake in the documentation, you can help us by

View File

@ -7,9 +7,7 @@
LaraDock能够帮你在**Docker**上快速搭建**Laravel**应用。
<br>
就像Laravel Homestead一样但是Docker替换了Vagrant。
>先在Docker上使用LaraDock然后再学习它们。
![](https://s31.postimg.org/nbettdki3/lara_dock_poster_new.jpg)
> 先在使用 LaraDock然后再学习它们。
<br>
## 目录
@ -219,7 +217,7 @@ docker-compose up -d nginx mysql
`nginx`, `hhvm`, `php-fpm`, `mysql`, `redis`, `postgres`, `mariadb`, `neo4j`, `mongo`, `apache2`, `caddy`, `memcached`, `beanstalkd`, `beanstalkd-console`, `workspace`.
**说明**: `workspace``php-fpm` 将运行在大部分实例中, 所有不用在命令中 `up`加上它们.
**说明**: `workspace``php-fpm` 将运行在大部分实例中, 所以不需要在 `up` 命令中加上它们.
@ -471,13 +469,13 @@ composer create-project laravel/laravel my-cool-app "5.2.*"
系统默认LaraDock假定Laravel应用在LaraDock的父级目录中
By default LaraDock assumes the Laravel application is living in the parent directory of the laradock folder.
自新Laravel应用在 `my-cool-app` 目录中, 我们需要用 `../my-cool-app/:/var/www/laravel`替换 `../:/var/www/laravel` , 如下:
自新Laravel应用在 `my-cool-app` 目录中, 我们需要用 `../my-cool-app/:/var/www`替换 `../:/var/www` , 如下:
```yaml
application:
build: ./application
volumes:
- ../my-cool-app/:/var/www/laravel
- ../my-cool-app/:/var/www
```
4 - 进入目录下继续工作..
@ -957,21 +955,6 @@ Docker或Laravel的特别帮助你可以在[Codementor.io](https://www.codeme
- [Mahmoud Zalt](https://github.com/Mahmoudz) (Twitter [@Mahmoud_Zalt](https://twitter.com/Mahmoud_Zalt))
**主要 贡献者:**
- [Zhqagp](https://github.com/zhqagp)
- [Suteepat (tianissimo)](https://github.com/tianissimo)
- [David (davidavz)](https://github.com/davidavz)
- [Lialosiu](https://github.com/lialosiu)
- [Eric Pfeiffer (computerfr33k)](https://github.com/computerfr33k)
- [Orette](https://github.com/orette)
- [Jack Fletcher (Kauhat)](https://github.com/Kauhat)
- [Bo-Yi Wu (appleboy)](https://github.com/appleboy)
- [Amin Mkh (AminMkh)](https://github.com/AminMkh)
- [Matthew Tonkin Dunn (mattythebatty)](https://github.com/mattythebatty)
- [Zhivitsa Kirill (zhikiri)](https://github.com/zhikiri)
- [Benmag](https://github.com/benmag)
**优秀的人:**
- [Contributors](https://github.com/LaraDock/laradock/graphs/contributors)

837
README.md

File diff suppressed because it is too large Load Diff

View File

@ -58,10 +58,10 @@ docker-compose exec workspace bash
#### Install laravel Dependencies, Add .env , generate Key and give proper permission certain folder
```
$ root@0e77851d27d3:/var/www/laravel# composer install
$ root@0e77851d27d3:/var/www/laravel# cp .env.example .env
$ root@0e77851d27d3:/var/www/laravel# php artisan key:generate
$ root@0e77851d27d3:/var/www/laravel# exit
$ root@0e77851d27d3:/var/www# composer install
$ root@0e77851d27d3:/var/www# cp .env.example .env
$ root@0e77851d27d3:/var/www# php artisan key:generate
$ root@0e77851d27d3:/var/www# exit
$root@midascode:~/laravel/laradock# cd ..
$root@midascode:~/laravel# sudo chmod -R 777 storage bootstrap/cache
```
@ -141,13 +141,13 @@ Remove 0.0.0.0:80
```
0.0.0.0:80
root /var/www/laravel/public
root /var/www/public
```
and replace with your https://yourdomain.com
```
https://yourdomain.com
root /var/www/laravel/public
root /var/www/public
```
uncomment tls

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

302
_guides/phpstorm.md Normal file
View File

@ -0,0 +1,302 @@
# PHPStorm Debugging Guide
- [Intro](#Intro)
- [Installation](#Installation)
- [Customize laradock/docker-compose.yml](#CustomizeDockerCompose)
- [Clean House](#InstallCleanHouse)
- [LaraDock Dial Tone](#InstallLaraDockDialTone)
- [hosts](#AddToHosts)
- [Firewall](#FireWall)
- [Enable xDebug on php-fpm](#enablePhpXdebug)
- [PHPStorm Settings](#InstallPHPStorm)
- [Configs](#InstallPHPStormConfigs)
- [Usage](#Usage)
- [Laravel](#UsageLaravel)
- [Run ExampleTest](#UsagePHPStormRunExampleTest)
- [Debug ExampleTest](#UsagePHPStormDebugExampleTest)
- [Debug Web Site](#UsagePHPStormDebugSite)
- [SSH into workspace](#SSHintoWorkspace)
- [KiTTY](#InstallKiTTY)
<a name="Intro"></a>
## Intro
Wiring up [Laravel](https://laravel.com/), [LaraDock](https://github.com/LaraDock/laradock) [Laravel+Docker] and [PHPStorm](https://www.jetbrains.com/phpstorm/) to play nice together complete with remote xdebug'ing as icing on top! Although this guide is based on `PHPStorm Windows`,
you should be able to adjust accordingly. This guide was written based on Docker for Windows Native.
<a name="Installation"></a>
## Installation
- This guide assumes the following:
- you have already installed and are familiar with Laravel, LaraDock and PHPStorm.
- you have installed Laravel as a parent of `laradock`. This guide assumes `/c/_dk/laravel`.
<a name="AddToHosts"></a>
## hosts
- Add `laravel` to your hosts file located on Windows 10 at `C:\Windows\System32\drivers\etc\hosts`. It should be set to the IP of your running container. Mine is: `10.0.75.2`
On Windows you can find it by opening Windows `Hyper-V Manager`.
- ![Windows Hyper-V Manager](photos/PHPStorm/Settings/WindowsHyperVManager.png)
- [Hosts File Editor](https://github.com/scottlerch/HostsFileEditor) makes it easy to change your hosts file.
- Set `laravel` to your docker host IP. See [Example](photos/SimpleHostsEditor/AddHost_laravel.png).
<a name="FireWall"></a>
## Firewall
Your PHPStorm will need to be able to receive a connection from PHP xdebug either your running workspace or php-fpm containers on port 9000. This means that your Windows Firewall should either enable connections from the Application PHPStorm OR the port.
- It is important to note that if the Application PHPStorm is NOT enabled in the firewall, you will not be able to recreate a rule to override that.
- Also be aware that if you are installing/upgrade different versions of PHPStorm, you MAY have orphaned references to PHPStorm in your Firewall! You may decide to remove orphaned references however in either case, make sure that they are set to receive public TCP traffic.
### Edit laradock/docker-compose.yml
Set the following variables:
```
### Workspace Utilities Container ###########################
workspace:
build:
context: ./workspace
args:
- INSTALL_XDEBUG=true
- INSTALL_WORKSPACE_SSH=true
...
### PHP-FPM Container #######################################
php-fpm:
build:
context: ./php-fpm
args:
- INSTALL_XDEBUG=true
...
```
### Edit xdebug.ini files
- `laradock/workspace/xdebug.ini`
- `laradock/php-fpm/xdebug.ini`
Set the following variables:
```
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.cli_color=1
```
<a name="InstallCleanHouse"></a>
### Need to clean house first?
Make sure you are starting with a clean state. For example, do you have other LaraDock containers and images?
Here are a few things I use to clean things up.
- Delete all containers using `grep laradock_` on the names, see: [Remove all containers based on docker image name](https://linuxconfig.org/remove-all-containners-based-on-docker-image-name).
`docker ps -a | awk '{ print $1,$2 }' | grep laradock_ | awk '{print $1}' | xargs -I {} docker rm {}`
- Delete all images containing `laradock`.
`docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}`
**Note:** This will only delete images that were built with `LaraDock`, **NOT** `laradock/*` which are pulled down by `LaraDock` such as `laradock/workspace`, etc.
**Note:** Some may fail with:
`Error response from daemon: conflict: unable to delete 3f38eaed93df (cannot be forced) - image has dependent child images`
- I added this to my `.bashrc` to remove orphaned images.
```
dclean() {
processes=`docker ps -q -f status=exited`
if [ -n "$processes" ]; thend
docker rm $processes
fi
images=`docker images -q -f dangling=true`
if [ -n "$images" ]; then
docker rmi $images
fi
}
```
- If you frequently switch configurations for LaraDock, you may find that adding the following and added to your `.bashrc` or equivalent useful:
```
# remove laravel* containers
# remove laravel_* images
dcleanlaradockfunction()
{
echo 'Removing ALL containers associated with laradock'
docker ps -a | awk '{ print $1,$2 }' | grep laradock | awk '{print $1}' | xargs -I {} docker rm {}
# remove ALL images associated with laradock_
# does NOT delete laradock/* which are hub images
echo 'Removing ALL images associated with laradock_'
docker images | awk '{print $1,$2,$3}' | grep laradock_ | awk '{print $3}' | xargs -I {} docker rmi {}
echo 'Listing all laradock docker hub images...'
docker images | grep laradock
echo 'dcleanlaradock completed'
}
# associate the above function with an alias
# so can recall/lookup by typing 'alias'
alias dcleanlaradock=dcleanlaradockfunction
```
<a name="InstallLaraDockDialTone"></a>
#### Let's get a dial-tone with Laravel
```
# barebones at this point
docker-compose up -d nginx mysql
# run
docker-compose ps
# Should see:
Name Command State Ports
-----------------------------------------------------------------------------------------------------------
laradock_mysql_1 docker-entrypoint.sh mysqld Up 0.0.0.0:3306->3306/tcp
laradock_nginx_1 nginx Up 0.0.0.0:443->443/tcp, 0.0.0.0:80->80/tcp
laradock_php-fpm_1 php-fpm Up 9000/tcp
laradock_volumes_data_1 true Exit 0
laradock_volumes_source_1 true Exit 0
laradock_workspace_1 /sbin/my_init Up 0.0.0.0:2222->22/tcp
```
<a name="enablePhpXdebug"></a>
#### Enable xDebug on php-fpm
In a host terminal sitting in the laradock folder, run: `./xdebugPhpFpm status`
You should see something like the following:
```
xDebug status
laradock_php-fpm_1
PHP 7.0.9 (cli) (built: Aug 10 2016 19:45:48) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
```
Other commands include `./xdebugPhpFpm start | stop`.
If you have enabled `xdebug=true` in `docker-compose.yml/php-fpm`, `xdebug` will already be running when
`php-fpm` is started and listening for debug info on port 9000.
<a name="InstallPHPStormConfigs"></a>
#### PHPStorm Settings
- Here are some settings that are known to work:
- `Settings/BuildDeploymentConnection`
- ![Settings/BuildDeploymentConnection](photos/PHPStorm/Settings/BuildDeploymentConnection.png)
- `Settings/BuildDeploymentConnectionMappings`
- ![Settings/BuildDeploymentConnectionMappings](photos/PHPStorm/Settings/BuildDeploymentConnectionMappings.png)
- `Settings/BuildDeploymentDebugger`
- ![Settings/BuildDeploymentDebugger](photos/PHPStorm/Settings/BuildDeploymentDebugger.png)
- `Settings/EditRunConfigurationRemoteWebDebug`
- ![Settings/EditRunConfigurationRemoteWebDebug](photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png)
- `Settings/EditRunConfigurationRemoteExampleTestDebug`
- ![Settings/EditRunConfigurationRemoteExampleTestDebug](photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png)
- `Settings/LangsPHPDebug`
- ![Settings/LangsPHPDebug](photos/PHPStorm/Settings/LangsPHPDebug.png)
- `Settings/LangsPHPInterpreters`
- ![Settings/LangsPHPInterpreters](photos/PHPStorm/Settings/LangsPHPInterpreters.png)
- `Settings/LangsPHPPHPUnit`
- ![Settings/LangsPHPPHPUnit](photos/PHPStorm/Settings/LangsPHPPHPUnit.png)
- `Settings/LangsPHPServers`
- ![Settings/LangsPHPServers](photos/PHPStorm/Settings/LangsPHPServers.png)
- `RemoteHost`
To switch on this view, go to: `Menu/Tools/Deployment/Browse Remote Host`.
- ![RemoteHost](photos/PHPStorm/RemoteHost.png)
- `RemoteWebDebug`
- ![DebugRemoteOn](photos/PHPStorm/DebugRemoteOn.png)
- `EditRunConfigurationRemoteWebDebug`
Go to: `Menu/Run/Edit Configurations`.
- ![EditRunConfigurationRemoteWebDebug](photos/PHPStorm/Settings/EditRunConfigurationRemoteWebDebug.png)
- `EditRunConfigurationRemoteExampleTestDebug`
Go to: `Menu/Run/Edit Configurations`.
- ![EditRunConfigurationRemoteExampleTestDebug](photos/PHPStorm/Settings/EditRunConfigurationRemoteExampleTestDebug.png)
- `WindowsFirewallAllowedApps`
Go to: `Control Panel\All Control Panel Items\Windows Firewall\Allowed apps`.
- ![WindowsFirewallAllowedApps.png](photos/PHPStorm/Settings/WindowsFirewallAllowedApps.png)
- `hosts`
Edit: `C:\Windows\System32\drivers\etc\hosts`.
- ![WindowsFirewallAllowedApps.png](photos/PHPStorm/Settings/hosts.png)
- [Enable xDebug on php-fpm](#enablePhpXdebug)
<a name="Usage"></a>
## Usage
<a name="UsagePHPStormRunExampleTest"></a>
### Run ExampleTest
- right-click on `tests/ExampleTest.php`
- Select: `Run 'ExampleTest.php'` or `Ctrl+Shift+F10`.
- Should pass!! You just ran a remote test via SSH!
<a name="UsagePHPStormDebugExampleTest"></a>
### Debug ExampleTest
- Open to edit: `tests/ExampleTest.php`
- Add a BreakPoint on line 16: `$this->visit('/')`
- right-click on `tests/ExampleTest.php`
- Select: `Debug 'ExampleTest.php'`.
- Should have stopped at the BreakPoint!! You are now debugging locally against a remote Laravel project via SSH!
- ![Remote Test Debugging Success](photos/PHPStorm/RemoteTestDebuggingSuccess.png)
<a name="UsagePHPStormDebugSite"></a>
### Debug WebSite
- In case xDebug is disabled, from the `laradock` folder run:
`./xdebugPhpFpm start`.
- To switch xdebug off, run:
`./xdebugPhpFpm stop`
- Start Remote Debugging
- ![DebugRemoteOn](photos/PHPStorm/DebugRemoteOn.png)
- Open to edit: `bootstrap/app.php`
- Add a BreakPoint on line 14: `$app = new Illuminate\Foundation\Application(`
- Reload [Laravel Site](http://laravel/)
- Should have stopped at the BreakPoint!! You are now debugging locally against a remote Laravel project via SSH!
- ![Remote Debugging Success](photos/PHPStorm/RemoteDebuggingSuccess.png)
<a name="SSHintoWorkspace"></a>
#### Let's shell into workspace
Assuming that you are in laradock folder, type:
`ssh -i workspace/insecure_id_rsa -p2222 root@laravel`
**Cha Ching!!!!**
- `workspace/insecure_id_rsa.ppk` may become corrupted. In which case:
- fire up `puttygen`
- import `workspace/insecure_id_rsa`
- save private key to `workspace/insecure_id_rsa.ppk`
<a name="InstallKiTTY"></a>
##### KiTTY
[Kitty](http://www.9bis.net/kitty/) KiTTY is a fork from version 0.67 of PuTTY.
- Here are some settings that are working for me:
- ![Session](photos/KiTTY/Session.png)
- ![Terminal](photos/KiTTY/Terminal.png)
- ![Window](photos/KiTTY/Window.png)
- ![WindowAppearance](photos/KiTTY/WindowAppearance.png)
- ![Connection](photos/KiTTY/Connection.png)
- ![ConnectionData](photos/KiTTY/ConnectionData.png)
- ![ConnectionSSH](photos/KiTTY/ConnectionSSH.png)
- ![ConnectionSSHAuth](photos/KiTTY/ConnectionSSHAuth.png)
- ![TerminalShell](photos/KiTTY/TerminalShell.png)

7
aerospike/Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM aerospike:latest
MAINTAINER Luciano Jr <luciano@lucianojr.com.br>
RUN rm /etc/aerospike/aerospike.conf
ADD aerospike.conf /etc/aerospike/aerospike.conf

77
aerospike/aerospike.conf Normal file
View File

@ -0,0 +1,77 @@
# Aerospike database configuration file.
# This stanza must come first.
service {
user root
group root
paxos-single-replica-limit 1 # Number of nodes where the replica count is automatically reduced to 1.
pidfile /var/run/aerospike/asd.pid
service-threads 4
transaction-queues 4
transaction-threads-per-queue 4
proto-fd-max 15000
}
logging {
# Log file must be an absolute path.
file /var/log/aerospike/aerospike.log {
context any info
}
# Send log messages to stdout
console {
context any critical
}
}
network {
service {
address any
port 3000
# Uncomment the following to set the `access-address` parameter to the
# IP address of the Docker host. This will the allow the server to correctly
# publish the address which applications and other nodes in the cluster to
# use when addressing this node.
# access-address <IPADDR>
}
heartbeat {
# mesh is used for environments that do not support multicast
mode mesh
port 3002
# use asinfo -v 'tip:host=<ADDR>;port=3002' to inform cluster of
# other mesh nodes
mesh-port 3002
interval 150
timeout 10
}
fabric {
port 3001
}
info {
port 3003
}
}
namespace test {
replication-factor 2
memory-size 1G
default-ttl 5d # 5 days, use 0 to never expire/evict.
# storage-engine memory
# To use file storage backing, comment out the line above and use the
# following lines instead.
storage-engine device {
file /opt/aerospike/data/test.dat
filesize 4G
data-in-memory true # Store data in memory in addition to file.
}
}

View File

@ -2,15 +2,15 @@ FROM webdevops/apache:ubuntu-16.04
MAINTAINER Eric Pfeiffer <computerfr33k@users.noreply.github.com>
ARG PHP_SOCKET="php-fpm:9000"
ARG PHP_SOCKET=php-fpm:9000
ENV WEB_PHP_SOCKET=$PHP_SOCKET
ENV WEB_DOCUMENT_ROOT=/var/www/laravel/public
ENV WEB_DOCUMENT_ROOT=/var/www/public
EXPOSE 80 443
WORKDIR /var/www/laravel/public
WORKDIR /var/www/public
ENTRYPOINT ["/opt/docker/bin/entrypoint.sh"]

View File

@ -1,6 +1,6 @@
# Docs: https://caddyserver.com/docs/caddyfile
0.0.0.0:80
root /var/www/laravel/public
root /var/www/public
fastcgi / php-fpm:9000 php {
index index.php
}

View File

@ -2,7 +2,7 @@ FROM alpine:3.4
MAINTAINER Eric Pfeiffer <computerfr33k@users.noreply.github.com>
ENV caddy_version=0.9.1
ENV caddy_version=0.9.3
LABEL caddy_version="$caddy_version" architecture="amd64"
@ -11,14 +11,14 @@ RUN apk update \
&& apk add tar curl
RUN curl --silent --show-error --fail --location \
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
"https://github.com/mholt/caddy/releases/download/v$caddy_version/caddy_linux_amd64.tar.gz" \
| tar --no-same-owner -C /usr/bin/ -xz caddy_linux_amd64 \
&& mv /usr/bin/caddy_linux_amd64 /usr/bin/caddy \
&& chmod 0755 /usr/bin/caddy
--header "Accept: application/tar+gzip, application/x-gzip, application/octet-stream" -o - \
"https://github.com/mholt/caddy/releases/download/v$caddy_version/caddy_linux_amd64.tar.gz" \
| tar --no-same-owner -C /usr/bin/ -xz caddy_linux_amd64 \
&& mv /usr/bin/caddy_linux_amd64 /usr/bin/caddy \
&& chmod 0755 /usr/bin/caddy
EXPOSE 80 443 2015
WORKDIR /var/www/laravel/public
WORKDIR /var/www/public
CMD ["/usr/bin/caddy", "-conf", "/etc/Caddyfile"]

View File

@ -2,6 +2,14 @@ version: '2'
services:
### Applications Code Container #############################
applications:
image: tianon/true
volumes:
- ../:/var/www
# - ../sample/:/var/www/sample
### Workspace Utilities Container ###########################
workspace:
@ -11,19 +19,22 @@ services:
- INSTALL_XDEBUG=false
- INSTALL_MONGO=false
- INSTALL_NODE=false
- INSTALL_YARN=false
- INSTALL_DRUSH=false
- INSTALL_AEROSPIKE_EXTENSION=false
- COMPOSER_GLOBAL_INSTALL=false
- INSTALL_WORKSPACE_SSH=false
- PUID=1000
- PGID=1000
- NODE_VERSION=stable
- TZ=UTC
volumes_from:
- volumes_source
- applications
extra_hosts:
# IMPORTANT: Replace with your Docker Host IP (will be appended to /etc/hosts)
- "dockerhost:10.0.75.1"
ports:
- "22:22"
- "2222:22"
tty: true
### PHP-FPM Container #######################################
@ -37,9 +48,11 @@ services:
- INSTALL_ZIP_ARCHIVE=false
- INSTALL_MEMCACHED=false
- INSTALL_OPCACHE=false
- INSTALL_AEROSPIKE_EXTENSION=false
- CODEIGNITER=false
dockerfile: Dockerfile-70
volumes_from:
- volumes_source
- applications
expose:
- "9000"
links:
@ -49,7 +62,7 @@ services:
- "dockerhost:10.0.75.1"
environment:
# IMPORTANT: Set the Remote Interpreter entry matching name to `laravel`
- PHP_IDE_CONFIG="serverName=laravel"
- PHP_IDE_CONFIG=serverName=laravel
### Nginx Server Container ##################################
@ -59,24 +72,25 @@ services:
args:
- PHP_UPSTREAM=php-fpm
volumes_from:
- volumes_source
- applications
volumes:
- ./logs/nginx/:/var/log/nginx
- ./nginx/sites/:/etc/nginx/sites-available
ports:
- "80:80"
- "443:443"
links:
- php-fpm
### Apache Server Container ##################################
### Apache Server Container #################################
apache2:
build:
context: ./apache2
args:
- PHP_SOCKET="php-fpm:9000"
- PHP_SOCKET=php-fpm:9000
volumes_from:
- volumes_source
- applications
volumes:
- ./logs/apache2:/var/log/apache2
ports:
@ -90,7 +104,7 @@ services:
hhvm:
build: ./hhvm
volumes_from:
- volumes_source
- applications
expose:
- "9000"
links:
@ -99,9 +113,24 @@ services:
### MySQL Container #########################################
mysql:
build: ./mysql
volumes_from:
- volumes_data
build:
context: ./mysql
args:
- MYSQL_DATABASE=homestead
- MYSQL_USER=homestead
- MYSQL_PASSWORD=secret
- MYSQL_ROOT_PASSWORD=root
volumes:
- mysql:/var/lib/mysql
ports:
- "3306:3306"
### MariaDB Container #######################################
mariadb:
build: ./mariadb
volumes:
- mysql:/var/lib/mysql
ports:
- "3306:3306"
environment:
@ -114,8 +143,8 @@ services:
postgres:
build: ./postgres
volumes_from:
- volumes_data
volumes:
- postgres:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
@ -123,19 +152,18 @@ services:
POSTGRES_USER: homestead
POSTGRES_PASSWORD: secret
### MariaDB Container #######################################
### PostgreSQL PostGis Container ############################
mariadb:
build: ./mariadb
volumes_from:
- volumes_data
postgres-postgis:
build: ./postgres-postgis
volumes:
- postgres:/var/lib/postgresql/data
ports:
- "3306:3306"
- "5432:5432"
environment:
MYSQL_DATABASE: homestead
MYSQL_USER: homestead
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: root
POSTGRES_DB: homestead
POSTGRES_USER: homestead
POSTGRES_PASSWORD: secret
### Neo4j Container #########################################
@ -146,8 +174,8 @@ services:
- "1337:1337"
environment:
- NEO4J_AUTH=homestead:secret
volumes_from:
- volumes_data
volumes:
- neo4j:/var/lib/neo4j/data
### MongoDB Container #######################################
@ -155,24 +183,39 @@ services:
build: ./mongo
ports:
- "27017:27017"
volumes_from:
- volumes_data
volumes:
- mongo:/data/db
### Redis Container #########################################
redis:
build: ./redis
volumes_from:
- volumes_data
volumes:
- redis:/data
ports:
- "6379:6379"
### Aerospike c Container ###################################
aerospike:
build: ./aerospike
volumes_from:
- workspace
volumes:
- aerospike:/opt/aerospike/data
ports:
- "3000:3000"
- "3001:3001"
- "3002:3002"
- "3003:3003"
### Memcached Container #####################################
memcached:
build: ./memcached
volumes_from:
- volumes_data
volumes:
- memcached:/var/lib/memcached
ports:
- "11211:11211"
links:
@ -188,7 +231,7 @@ services:
links:
- php-fpm
### RabbitMQ Container ####################################
### RabbitMQ Container ######################################
rabbitmq:
build: ./rabbitmq
@ -217,7 +260,9 @@ services:
caddy:
build: ./caddy
volumes_from:
- volumes_source
- applications
volumes:
- caddy:/root/.caddy
ports:
- "80:80"
- "443:443"
@ -228,7 +273,7 @@ services:
links:
- php-fpm
### phpMyAdmin Container ##################################
### phpMyAdmin Container ####################################
phpmyadmin:
build: ./phpmyadmin
@ -237,8 +282,6 @@ services:
MYSQL_USER: homestead
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: root
volumes_from:
- volumes_data
ports:
- "8080:80"
links:
@ -247,27 +290,54 @@ services:
# for mariadb container
# - "mariadb:db"
### Laravel Application Code Container ######################
### pgAdmin Container #######################################
volumes_source:
image: tianon/true
pgadmin:
build: ./pgadmin
ports:
- "5050:5050"
links:
- postgres
### ElasticSearch Container #################################
elasticsearch:
build: ./elasticsearch
volumes:
- ../:/var/www/laravel
# Demonstration of how to mount multiple sites
# - ../../site_a/:/var/www/site_a
# - ../../site_b/:/var/www/site_b
- elasticsearch-data:/usr/share/elasticsearch/data
- elasticsearch-pkugins:/usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
links:
- php-fpm
### Databases Data Container ################################
### Volumes Setup ###########################################
volumes_data:
image: tianon/true
volumes:
- ./data/mysql:/var/lib/mysql
- ./data/postgres:/var/lib/postgres
- ./data/memcached:/var/lib/memcached
- ./data/redis:/data
- ./data/neo4j:/var/lib/neo4j/data
- ./data/mongo:/data/db
- ./data/sessions:/sessions
### Add more Containers below ###############################
volumes:
mysql:
driver: "local"
postgres:
driver: "local"
memcached:
driver: "local"
redis:
driver: "local"
neo4j:
driver: "local"
mariadb:
driver: "local"
mongo:
driver: "local"
phpmyadmin:
driver: "local"
aerospike:
driver: "local"
caddy:
driver: "local"
elasticsearch-data:
driver: "local"
elasticsearch-pkugins:
driver: "local"
sessions: ## nothing is connected to this (- ./data/sessions:/sessions)
driver: "local"

5
elasticsearch/Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM elasticsearch:latest
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
EXPOSE 9200 9300

View File

@ -10,13 +10,13 @@ RUN apt-get update -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /var/www/laravel
RUN mkdir -p /var/www
ADD server.ini /etc/hhvm/server.ini
RUN usermod -u 1000 www-data
WORKDIR /var/www/laravel
WORKDIR /var/www
CMD ["/usr/bin/hhvm", "-m", "server", "-c", "/etc/hhvm/server.ini"]

View File

@ -12,7 +12,7 @@ hhvm.log.level = Error
hhvm.log.header = true
hhvm.log.access[default][file] = /var/log/hhvm/access.log
hhvm.log.access[default][format] = "%h %l %u %t \"%r\" %>s %b"
hhvm.server.source_root=/var/www/laravel/public
hhvm.server.source_root=/var/www/public
hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc
; Uncomment to log to files instead of STDOUT

View File

@ -1,7 +1,27 @@
FROM mysql:latest
FROM mysql:5.7
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
CMD ["mysqld"]
ADD startup /etc/mysql/startup
RUN chown -R mysql:root /var/lib/mysql/
ARG MYSQL_DATABASE=homestead
ARG MYSQL_USER=homestead
ARG MYSQL_PASSWORD=secret
ARG MYSQL_ROOT_PASSWORD=root
ENV MYSQL_DATABASE=$MYSQL_DATABASE
ENV MYSQL_USER=$MYSQL_USER
ENV MYSQL_PASSWORD=$MYSQL_PASSWORD
ENV MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD
RUN sed -i 's/MYSQL_DATABASE/'$MYSQL_DATABASE'/g' /etc/mysql/startup && \
sed -i 's/MYSQL_USER/'$MYSQL_USER'/g' /etc/mysql/startup && \
sed -i 's/MYSQL_PASSWORD/'$MYSQL_PASSWORD'/g' /etc/mysql/startup
ADD my.cnf /etc/mysql/conf.d/my.cnf
CMD ["mysqld", "--init-file=/etc/mysql/startup"]
EXPOSE 3306

9
mysql/my.cnf Normal file
View File

@ -0,0 +1,9 @@
# The MySQL Client configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[mysql]
[mysqld]
sql-mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

4
mysql/startup Normal file
View File

@ -0,0 +1,4 @@
DROP USER IF EXISTS 'MYSQL_USER';
CREATE USER 'MYSQL_USER'@'%';
CREATE DATABASE IF NOT EXISTS MYSQL_DATABASE;
GRANT ALL ON MYSQL_DATABASE.* TO 'MYSQL_USER'@'%' IDENTIFIED BY 'MYSQL_PASSWORD';

View File

@ -3,7 +3,6 @@ FROM nginx:alpine
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
ADD nginx.conf /etc/nginx/
COPY sites/*.conf /etc/nginx/sites-available/
ARG PHP_UPSTREAM=php-fpm

View File

@ -26,4 +26,5 @@ http {
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-available/*;
open_file_cache max=100;
charset UTF-8;
}

2
nginx/sites/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
*.conf
!default.conf

View File

@ -3,8 +3,8 @@ server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name laravel;
root /var/www/laravel/public;
server_name laradock;
root /var/www/public;
index index.php index.html index.htm;
location / {

View File

@ -1,57 +0,0 @@
server {
listen 80;
listen [::]:80;
#domain name
server_name drupal8.dev;
#file document root. This has to match one of the volumes in docer-composer.yml
root /var/www/drupal8;
# This is the full path to your index file
index index.php index.html index.htm;
## serve imagecache files directly or redirect to drupal if they do not exist.
location ~* files/styles {
access_log off;
expires 30d;
try_files $uri @drupal;
}
## serve imagecache files directly or redirect to drupal if they do not exist.
location ~* ^.+.(xsl|xml)$ {
access_log off;
expires 1d;
try_files $uri @drupal;
}
## Images and static content is treated different
location ~* ^.+.(jpg|jpeg|gif|css|png|js|ico|xml)$ {
access_log off;
expires 30d;
}
location / {
index index.php;
# This is cool because no php is touched for static content
try_files $uri $uri/ @rewrite;
expires max;
}
location @drupal {
rewrite ^/(.*)$ /index.php?q=$1 last;
}
location @rewrite {
# Some modules enforce no slash (/) at the end of the URL
# Else this rewrite block wouldn&#39;t be needed (GlobalRedirect)
rewrite ^/(.*)$ /index.php?q=$1;
}
location ~ .php$ {
fastcgi_pass php-upstream;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}

View File

@ -3,8 +3,8 @@ server {
listen 80;
listen [::]:80;
server_name site_a;
root /var/www/site_a/public;
server_name sample.dev;
root /var/www/sample/public;
index index.php index.html index.htm;
location / {

View File

@ -1,28 +0,0 @@
server {
listen 80;
listen [::]:80;
server_name site_b;
root /var/www/site_b/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass php-upstream;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
}

5
pgadmin/Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM fenglc/pgadmin4
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
EXPOSE 5050

View File

@ -40,7 +40,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
# xDebug:
#####################################
ARG INSTALL_XDEBUG=true
ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Install the xdebug extension
pecl install xdebug && \
@ -54,7 +54,7 @@ COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
# MongoDB:
#####################################
ARG INSTALL_MONGO=true
ARG INSTALL_MONGO=false
RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension
pecl install mongodb && \
@ -65,7 +65,7 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
# ZipArchive:
#####################################
ARG INSTALL_ZIP_ARCHIVE=true
ARG INSTALL_ZIP_ARCHIVE=false
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
# Install the zip extension
pecl install zip && \
@ -76,22 +76,59 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
# PHP Memcached:
#####################################
ARG INSTALL_MEMCACHED=true
ARG INSTALL_MEMCACHED=false
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
# Install the php memcached extension
pecl install memcached && \
docker-php-ext-enable memcached \
;fi
#####################################
# PHP Aerospike:
#####################################
ARG INSTALL_AEROSPIKE_EXTENSION=false
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
# Copy aerospike configration for remote debugging
COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
# Install the php aerospike extension
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \
&& mkdir -p aerospike-client-php \
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
&& ( \
cd aerospike-client-php/src/aerospike \
&& phpize \
&& ./build.sh \
&& make install \
) \
&& rm /tmp/aerospike-client-php.tar.gz \
;fi
#####################################
# Opcache:
#####################################
ARG INSTALL_OPCACHE=true
ARG INSTALL_OPCACHE=false
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
docker-php-ext-install opcache && \
docker-php-ext-enable opcache \
;fi
# Copy opcache configration
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini
#####################################
# Codeigniter Modifications:
#####################################
ARG CODEIGNITER=false
RUN if [ ${CODEIGNITER} = true ]; then \
# Install Codeigniter PHP extentions requirements
docker-php-ext-install mysqli && \
docker-php-ext-install tokenizer \
;fi
#
#--------------------------------------------------------------------------
# Final Touch
@ -105,7 +142,7 @@ RUN rm -r /var/lib/apt/lists/*
RUN usermod -u 1000 www-data
WORKDIR /var/www/laravel
WORKDIR /var/www
CMD ["php-fpm"]

View File

@ -34,13 +34,14 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
# in the `docker-compose.yml` before the build.
# Example:
# - INSTALL_ZIP_ARCHIVE=true
# - ...
#
#####################################
# xDebug:
#####################################
ARG INSTALL_XDEBUG=true
ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Install the xdebug extension
pecl install xdebug && \
@ -54,7 +55,7 @@ COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
# MongoDB:
#####################################
ARG INSTALL_MONGO=true
ARG INSTALL_MONGO=false
RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension
pecl install mongodb && \
@ -65,7 +66,7 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
# ZipArchive:
#####################################
ARG INSTALL_ZIP_ARCHIVE=true
ARG INSTALL_ZIP_ARCHIVE=false
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
# Install the zip extension
pecl install zip && \
@ -76,7 +77,7 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
# PHP Memcached:
#####################################
ARG INSTALL_MEMCACHED=true
ARG INSTALL_MEMCACHED=false
RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
# Install the php memcached extension
curl -L -o /tmp/memcached.tar.gz "https://github.com/php-memcached-dev/php-memcached/archive/php7.tar.gz" \
@ -94,16 +95,50 @@ RUN if [ ${INSTALL_MEMCACHED} = true ]; then \
&& docker-php-ext-enable memcached \
;fi
#####################################
# PHP Aerospike:
#####################################
ARG INSTALL_AEROSPIKE_EXTENSION=false
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
# Copy aerospike configration for remote debugging
COPY ./aerospike.ini /usr/local/etc/php/conf.d/aerospike.ini
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
# Install the php aerospike extension
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \
&& mkdir -p aerospike-client-php \
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
&& ( \
cd aerospike-client-php/src/aerospike \
&& phpize \
&& ./build.sh \
&& make install \
) \
&& rm /tmp/aerospike-client-php.tar.gz \
;fi
#####################################
# Opcache:
#####################################
ARG INSTALL_OPCACHE=true
ARG INSTALL_OPCACHE=false
RUN if [ ${INSTALL_OPCACHE} = true ]; then \
docker-php-ext-install opcache && \
docker-php-ext-enable opcache \
;fi
# Copy opcache configration
COPY ./opcache.ini /usr/local/etc/php/conf.d/opcache.ini
#####################################
# Codeigniter Modifications:
#####################################
ARG CODEIGNITER=false
RUN if [ ${CODEIGNITER} = true ]; then \
# Install Codeigniter PHP extentions requirements
docker-php-ext-install mysqli && \
docker-php-ext-install tokenizer \
;fi
#
#--------------------------------------------------------------------------
@ -118,7 +153,7 @@ RUN rm -r /var/lib/apt/lists/*
RUN usermod -u 1000 www-data
WORKDIR /var/www/laravel
WORKDIR /var/www
CMD ["php-fpm"]

3
php-fpm/aerospike.ini Normal file
View File

@ -0,0 +1,3 @@
extension=aerospike.so
aerospike.udf.lua_system_path=/usr/local/aerospike/lua
aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua

7
php-fpm/opcache.ini Normal file
View File

@ -0,0 +1,7 @@
extension=opcache.so
opcache.enable="1"
opcache.memory_consumption="256"
opcache.use_cwd="0"
opcache.fast_shutdown="1"
opcache.max_file_size="0"
opcache.validate_timestamps="0"

View File

@ -1,9 +1,10 @@
; NOTE: The actual debug.so extention is NOT SET HERE but rather (/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini)
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.cli_color=1
xdebug.remote_autostart=0
xdebug.remote_enable=0
xdebug.remote_connect_back=0
xdebug.cli_color=0
xdebug.profiler_enable=0
xdebug.remote_handler=dbgp
xdebug.remote_mode=req

View File

@ -0,0 +1,5 @@
FROM mdillon/postgis:latest
CMD ["postgres"]
EXPOSE 5432

View File

@ -0,0 +1,62 @@
version: '2'
services:
### Workspace Utilities Container ###########################
workspace:
build:
context: ./workspace
args:
- INSTALL_XDEBUG=false
- INSTALL_MONGO=false
- INSTALL_NODE=false
- INSTALL_YARN=false
- INSTALL_DRUSH=false
- INSTALL_AEROSPIKE_EXTENSION=false
- COMPOSER_GLOBAL_INSTALL=false
- INSTALL_WORKSPACE_SSH=false
- PUID=1000
- PGID=1000
- NODE_VERSION=stable
volumes_from:
- volumes_source
ports:
- "22:22"
tty: true
### PHP-FPM Container #######################################
php-fpm:
build:
context: ./php-fpm
args:
- INSTALL_XDEBUG=false
- INSTALL_MONGO=false
- INSTALL_ZIP_ARCHIVE=false
- INSTALL_MEMCACHED=false
- INSTALL_OPCACHE=false
- INSTALL_AEROSPIKE_EXTENSION=false
dockerfile: Dockerfile-70
volumes_from:
- volumes_source
expose:
- "9000"
links:
- workspace
### Application Code Container ######################
volumes_source:
image: tianon/true
volumes:
- ../:/var/www
### Databases Data Container ################################
volumes_data:
image: tianon/true
volumes:
# - ./data/mysql:/var/lib/mysql
### Add All your Software Containers below ###############################

View File

@ -1,10 +1,3 @@
#
# RabbitMQ Dockerfile
#
# https://github.com/dockerfile/rabbitmq
#
# Pull base image.
FROM rabbitmq
RUN rabbitmq-plugins enable --offline rabbitmq_management

View File

@ -10,7 +10,7 @@
# https://hub.docker.com/r/laradock/workspace/tags/
#
FROM laradock/workspace:1.1
FROM laradock/workspace:1.2
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
@ -32,64 +32,10 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
#
# Optional Software's will only be installed if you set them to `true`
# in the `docker-compose.yml` before the build.
# Example:
# - INSTALL_NODE=false
# - ...
#
# - INSTALL_XDEBUG= false
# - INSTALL_MONGO= false
# - COMPOSER_GLOBAL_INSTALL= false
# - INSTALL_NODE= false
# - INSTALL_DRUSH= false
#
#####################################
# xDebug:
#####################################
# Check if xDebug needs to be installed
ARG INSTALL_XDEBUG=true
ENV INSTALL_XDEBUG ${INSTALL_XDEBUG}
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Load the xdebug extension only with phpunit commands
apt-get install -y --force-yes php7.0-xdebug && \
sed -i 's/^/;/g' /etc/php/7.0/cli/conf.d/20-xdebug.ini && \
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/laravel/vendor/bin/phpunit'" >> ~/.bashrc \
;fi
# ADD for REMOTE debugging
COPY ./xdebug.ini /etc/php/7.0/cli/conf.d/xdebug.ini
#####################################
# ssh:
#####################################
# Check if ssh needs to be installed
# See: https://github.com/phusion/baseimage-docker#enabling_ssh
ADD insecure_id_rsa /tmp/id_rsa
ADD insecure_id_rsa.pub /tmp/id_rsa.pub
ARG INSTALL_WORKSPACE_SSH=true
ENV INSTALL_WORKSPACE_SSH ${INSTALL_WORKSPACE_SSH}
RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
rm -f /etc/service/sshd/down && \
cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys \
&& cat /tmp/id_rsa.pub >> /root/.ssh/id_rsa.pub \
&& cat /tmp/id_rsa >> /root/.ssh/id_rsa \
&& rm -f /tmp/id_rsa* \
&& chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \
&& chmod 400 /root/.ssh/id_rsa \
;fi
#####################################
# MongoDB:
#####################################
# Check if Mongo needs to be installed
ARG INSTALL_MONGO=true
ENV INSTALL_MONGO ${INSTALL_MONGO}
RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension
pecl install mongodb && \
echo "extension=mongodb.so" >> /etc/php/7.0/cli/php.ini \
;fi
#####################################
# Non-Root User:
@ -101,6 +47,14 @@ ARG PGID=1000
RUN groupadd -g $PGID laradock && \
useradd -u $PUID -g laradock -m laradock
#####################################
# Set Timezone
#####################################
ARG TZ=UTC
ENV TZ ${TZ}
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
#####################################
# Composer:
#####################################
@ -113,19 +67,73 @@ RUN chown -R laradock:laradock /home/laradock/.composer
USER laradock
# Check if global install need to be ran
ARG COMPOSER_GLOBAL_INSTALL=true
ARG COMPOSER_GLOBAL_INSTALL=false
ENV COMPOSER_GLOBAL_INSTALL ${COMPOSER_GLOBAL_INSTALL}
RUN if [ ${COMPOSER_GLOBAL_INSTALL} = true ]; then \
# run the install
composer global install \
;fi
#####################################
# Crontab
#####################################
USER root
COPY ./crontab /var/spool/cron/crontabs
#####################################
# xDebug:
#####################################
ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Load the xdebug extension only with phpunit commands
apt-get update && \
apt-get install -y --force-yes php7.0-xdebug && \
sed -i 's/^/;/g' /etc/php/7.0/cli/conf.d/20-xdebug.ini && \
echo "alias phpunit='php -dzend_extension=xdebug.so /var/www/vendor/bin/phpunit'" >> ~/.bashrc \
;fi
# ADD for REMOTE debugging
COPY ./xdebug.ini /etc/php/7.0/cli/conf.d/xdebug.ini
#####################################
# ssh:
#####################################
ARG INSTALL_WORKSPACE_SSH=false
ENV INSTALL_WORKSPACE_SSH ${INSTALL_WORKSPACE_SSH}
ADD insecure_id_rsa /tmp/id_rsa
ADD insecure_id_rsa.pub /tmp/id_rsa.pub
RUN if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
rm -f /etc/service/sshd/down && \
cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys \
&& cat /tmp/id_rsa.pub >> /root/.ssh/id_rsa.pub \
&& cat /tmp/id_rsa >> /root/.ssh/id_rsa \
&& rm -f /tmp/id_rsa* \
&& chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \
&& chmod 400 /root/.ssh/id_rsa \
;fi
#####################################
# MongoDB:
#####################################
# Check if Mongo needs to be installed
ARG INSTALL_MONGO=false
ENV INSTALL_MONGO ${INSTALL_MONGO}
RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension
pecl install mongodb && \
echo "extension=mongodb.so" >> /etc/php/7.0/cli/conf.d/30-mongodb.ini \
;fi
#####################################
# Drush:
#####################################
USER root
ENV DRUSH_VERSION 8.1.2
ARG INSTALL_DRUSH=true
ARG INSTALL_DRUSH=false
ENV INSTALL_DRUSH ${INSTALL_DRUSH}
RUN if [ ${INSTALL_DRUSH} = true ]; then \
# Install Drush 8 with the phar file.
@ -143,17 +151,17 @@ USER laradock
# Check if NVM needs to be installed
ARG NODE_VERSION=stable
ENV NODE_VERSION ${NODE_VERSION}
ARG INSTALL_NODE=true
ARG INSTALL_NODE=false
ENV INSTALL_NODE ${INSTALL_NODE}
ENV NVM_DIR /home/laradock/.nvm
RUN if [ ${INSTALL_NODE} = true ]; then \
# Install nvm (A Node Version Manager)
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.6/install.sh | bash && \
. ~/.nvm/nvm.sh && \
. $NVM_DIR/nvm.sh && \
nvm install ${NODE_VERSION} && \
nvm use ${NODE_VERSION} && \
nvm alias ${NODE_VERSION} && \
npm install -g gulp bower \
npm install -g gulp bower vue-cli \
;fi
# Wouldn't execute when added to the RUN statement in the above block
@ -164,6 +172,79 @@ RUN if [ ${INSTALL_NODE} = true ]; then \
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
;fi
# Add NVM binaries to root's .bashrc
USER root
RUN if [ ${INSTALL_NODE} = true ]; then \
echo "" >> ~/.bashrc && \
echo 'export NVM_DIR="/home/laradock/.nvm"' >> ~/.bashrc && \
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> ~/.bashrc \
;fi
#####################################
# YARN:
#####################################
USER laradock
ARG INSTALL_YARN=false
ENV INSTALL_YARN ${INSTALL_YARN}
RUN if [ ${INSTALL_YARN} = true ]; then \
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" && \
curl -o- -L https://yarnpkg.com/install.sh | bash && \
echo "" >> ~/.bashrc && \
echo 'export PATH="$HOME/.yarn/bin:$PATH"' >> ~/.bashrc \
;fi
# Add YARN binaries to root's .bashrc
USER root
RUN if [ ${INSTALL_YARN} = true ]; then \
echo "" >> ~/.bashrc && \
echo 'export YARN_DIR="/home/laradock/.yarn"' >> ~/.bashrc && \
echo 'export PATH="$YARN_DIR/bin:$PATH"' >> ~/.bashrc \
;fi
#####################################
# PHP Aerospike:
#####################################
USER root
ARG INSTALL_AEROSPIKE_EXTENSION=true
ENV INSTALL_AEROSPIKE_EXTENSION ${INSTALL_AEROSPIKE_EXTENSION}
# Copy aerospike configration for remote debugging
COPY ./aerospike.ini /etc/php/7.0/cli/conf.d/aerospike.ini
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = true ]; then \
# Install the php aerospike extension
curl -L -o /tmp/aerospike-client-php.tar.gz "https://github.com/luciano-jr/aerospike-client-php/archive/master.tar.gz" \
&& mkdir -p aerospike-client-php \
&& tar -C aerospike-client-php -zxvf /tmp/aerospike-client-php.tar.gz --strip 1 \
&& ( \
cd aerospike-client-php/src/aerospike \
&& phpize \
&& ./build.sh \
&& make install \
) \
&& rm /tmp/aerospike-client-php.tar.gz \
;fi
RUN if [ ${INSTALL_AEROSPIKE_EXTENSION} = false ]; then \
rm /etc/php/7.0/cli/conf.d/aerospike.ini \
;fi
#####################################
# Non-root user : PHPUnit path
#####################################
# add ./vendor/bin to non-root user's bashrc (needed for phpunit)
USER laradock
RUN echo "" >> ~/.bashrc && \
echo 'export PATH="/var/www/vendor/bin:$PATH"' >> ~/.bashrc
#
#--------------------------------------------------------------------------
# Final Touch
@ -176,4 +257,4 @@ RUN apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Set default work directory
WORKDIR /var/www/laravel
WORKDIR /var/www

3
workspace/aerospike.ini Normal file
View File

@ -0,0 +1,3 @@
extension=aerospike.so
aerospike.udf.lua_system_path=/usr/local/aerospike/lua
aerospike.udf.lua_user_path=/usr/local/aerospike/usr-lua

1
workspace/crontab/root Normal file
View File

@ -0,0 +1 @@
* * * * * php /var/www/artisan schedule:run >> /dev/null 2>&1

View File

@ -1,9 +1,10 @@
; NOTE: The actual debug.so extention is NOT SET HERE but rather (/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini)
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.cli_color=1
xdebug.remote_autostart=0
xdebug.remote_enable=0
xdebug.remote_connect_back=0
xdebug.cli_color=0
xdebug.profiler_enable=0
xdebug.remote_handler=dbgp
xdebug.remote_mode=req

View File

@ -6,12 +6,21 @@
# Grab full name of php-fpm container
PHP_FPM_CONTAINER=$(docker-compose ps | grep php-fpm | cut -d" " -f 1)
# Grab OS type
if [[ "$(uname)" == "Darwin" ]]; then
OS_TYPE="OSX"
else
OS_TYPE=$(expr substr $(uname -s) 1 5)
fi
xdebug_status ()
{
echo 'xDebug status'
# If running on Windows, need to prepend with winpty :(
if [[ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]]; then
if [[ $OS_TYPE == "MINGW" ]]; then
winpty docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
else
@ -20,6 +29,7 @@ xdebug_status ()
}
xdebug_start ()
{
echo 'Start xDebug'
@ -30,7 +40,7 @@ xdebug_start ()
# If running on Windows, need to prepend with winpty :(
if [[ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]]; then
if [[ $OS_TYPE == "MINGW" ]]; then
winpty docker exec -it $PHP_FPM_CONTAINER bash -c "${ON_CMD}"
docker restart $PHP_FPM_CONTAINER
winpty docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
@ -40,9 +50,9 @@ xdebug_start ()
docker restart $PHP_FPM_CONTAINER
docker exec -it $PHP_FPM_CONTAINER bash -c 'php -v'
fi
}
xdebug_stop ()
{
echo 'Stop xDebug'
@ -52,7 +62,7 @@ xdebug_stop ()
# If running on Windows, need to prepend with winpty :(
if [[ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]]; then
if [[ $OS_TYPE == "MINGW" ]]; then
# This is the equivalent of:
# winpty docker exec -it laradock_php-fpm_1 bash -c 'bla bla bla'
# Thanks to @michaelarnauts at https://github.com/docker/compose/issues/593