Compare commits

...

206 Commits

Author SHA1 Message Date
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
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
adfb559521 Merge pull request #269 from LarryEitel/expose-port-22-and-add-insecure_id_rsa_ppk
expose-port-22-and-add-insecure_id_rsa_ppk
2016-08-30 17:29:51 +03: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
ab53db1897 Merge pull request #268 from appleboy/patch-10
fix #267 phpmyadmin is not working on linux.
2016-08-30 11:05:08 +03:00
6dcb174012 Merge pull request #266 from bktz/master
Added support for RabbitMQ
2016-08-30 11:03:57 +03:00
38eeae8791 Merge pull request #265 from computerfr33k/remove-env-commands-from-php-fpm
Remove env commands from php fpm
2016-08-30 11:03:27 +03:00
de914d106f Merge pull request #262 from computerfr33k/260-reduce-data-only-volume-size
use docker image which only supplies true & echo binaries.
2016-08-30 11:01:33 +03:00
6c71d6d84f Merge pull request #261 from appleboy/patch-4
support specific node version
2016-08-30 10:59:50 +03:00
7b2ff6dab8 fix #267 phpmyadmin is not working on linux.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-08-30 13:16:18 +08:00
1e5d604470 Added support for RabbitMQ 2016-08-28 18:12:55 +10:00
314e43bb79 Update Dockerfile-56 2016-08-28 00:04:52 -05:00
ea047e2587 remove unnecessary env commands
These environment variables are not needed since they are only being used at build time and we are already specifying them using the ARG command, no need to specify it twice since it increases build time and size.
2016-08-28 00:04:19 -05:00
d441427852 Expose port 22 for workspace ssh. Add private key for PHPStorm Windows users. 2016-08-27 17:22:36 -06:00
227c8da17c Expose port 22 for workspace ssh. Add private key for PHPStorm Windows users. 2016-08-27 17:00:01 -06:00
14b97caa57 Merge branch 'master' of github.com:LarryEitel/laradock 2016-08-27 14:52:28 -06:00
6ba76da709 use docker image which only supplies true & echo binaries. 2016-08-27 13:18:13 -05:00
294fe31a80 update nvm version.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-08-27 22:54:59 +08:00
78be0b577e support specific node version
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-08-27 19:38:44 +08:00
5a980b1c97 add debugging steps for thr 404 windows error 2016-08-27 10:00:09 +03:00
3ad474a2d9 move contributing to the root 2016-08-27 09:06:22 +03:00
0ad1e58bf0 Merge branch 'master' of https://github.com/LaraDock/laradock
* 'master' of https://github.com/LaraDock/laradock:
  fix caddy Dockerfile from previous commit.
  caddy log to file. enable gzip compression.
  update caddy to v0.9.1
  Laravel 5.3 is published officially
  Create README-zh.md
2016-08-27 08:57:15 +03:00
0cf12c7383 update the readme 2016-08-27 08:57:03 +03:00
4e0af7e0cb Merge pull request #259 from computerfr33k/master
Update caddy server and log to file
2016-08-27 08:54:35 +03:00
d6b091df96 Merge pull request #258 from helsont/patch-1
Laravel 5.3 is published officially
2016-08-27 08:53:53 +03:00
506fe598cd Merge pull request #257 from zhqagp/master
Create README-zh.md
2016-08-27 08:46:16 +03:00
b252558560 fix caddy Dockerfile from previous commit. 2016-08-26 14:01:48 -05:00
29d714a849 caddy log to file. enable gzip compression. 2016-08-26 13:26:22 -05:00
f9fd391879 update caddy to v0.9.1 2016-08-26 13:25:31 -05:00
740b4647a3 Laravel 5.3 is published officially
No need for development branch switch.

Ran into the same error posted by this guy here https://laracasts.com/discuss/channels/laravel/laravel-53-cant-do-php-artisan-optimize.

I didn't switch to the development branch and the setup worked perfectly.
2016-08-26 11:29:32 -04:00
f8d3c58d6a Create README-zh.md
中文翻译版README
2016-08-26 12:38:51 +08:00
509cb9ac2e replace the phpmyadmin guide in the readme 2016-08-25 00:19:58 +03:00
f2aea63d64 Merge pull request #250 from appleboy/patch-3
add phpMyAdmin document.
2016-08-25 00:10:52 +03: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
12ba6bbbae add phpMyAdmin document.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-08-24 14:25:42 +08:00
9fb50b2c6b fix phpmyadmin port. closes #247 2016-08-24 00:43:11 +03:00
df1a019f75 Merge pull request #246 from appleboy/patch-2
update readme for phpMyAdmin.
2016-08-24 00:38:21 +03:00
c68f70d2a7 fix typo
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-08-23 16:56:23 +08:00
002b147b23 update readme for phpMyAdmin.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-08-23 16:56:14 +08:00
314034255a Merge pull request #245 from appleboy/patch-1
Support phpMyAdmin container.
2016-08-22 22:32:52 +03:00
3c8861d1d2 remove empty data folder for mariadb.
ref:
d969a465ee/10.1/Dockerfile (L83)

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-08-22 11:02:21 +08:00
2d51548879 support phpmyadmin container.
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2016-08-22 11:01:34 +08:00
4aa3902f32 Merge pull request #242 from LarryEitel/install-and-startup-workspace-ssh
Install and start workspace ssh
2016-08-22 03:30:17 +03: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
7a13e4a343 Fix variable name 2016-08-17 19:53:01 -06:00
4e7e003e87 ssh keys 2016-08-17 19:24:00 -06:00
208b2e7c0a ReTweak README re xdebug 2016-08-17 07:56:38 -06:00
9611fdb58f Indent - Start/Stop xDebug in TOC 2016-08-17 07:56:38 -06: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
70 changed files with 2654 additions and 482 deletions

966
README-zh.md Normal file
View File

@ -0,0 +1,966 @@
# LaraDock
[![forthebadge](http://forthebadge.com/images/badges/built-by-developers.svg)](http://zalt.me)
[![Gitter](https://badges.gitter.im/LaraDock/laradock.svg)](https://gitter.im/LaraDock/laradock?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
LaraDock能够帮你在**Docker**上快速搭建**Laravel**应用。
<br>
就像Laravel Homestead一样但是Docker替换了Vagrant。
> 先在使用 LaraDock然后再学习它们。
<br>
## 目录
- [Intro](#Intro)
- [Features](#features)
- [Supported Software's](#Supported-Containers)
- [What is Docker](#what-is-docker)
- [What is Laravel](#what-is-laravel)
- [Why Docker not Vagrant](#why-docker-not-vagrant)
- [LaraDock VS Homestead](#laradock-vs-homestead)
- [Demo Video](#Demo)
- [Requirements](#Requirements)
- [Installation](#Installation)
- [Usage](#Usage)
- [Documentation](#Documentation)
- [Docker](#Docker)
- [List current running Containers](#List-current-running-Containers)
- [Close all running Containers](#Close-all-running-Containers)
- [Delete all existing Containers](#Delete-all-existing-Containers)
- [Enter a Container (SSH into a running Container)](#Enter-Container)
- [Edit default container configuration](#Edit-Container)
- [Edit a Docker Image](#Edit-a-Docker-Image)
- [Build/Re-build Containers](#Build-Re-build-Containers)
- [Add more Software's (Docker Images)](#Add-Docker-Images)
- [View the Log files](#View-the-Log-files)
- [Laravel](#Laravel):
- [Install Laravel from a Docker Container](#Install-Laravel)
- [Run Artisan Commands](#Run-Artisan-Commands)
- [Use Redis](#Use-Redis)
- [Use Mongo](#Use-Mongo)
- [PHP](#PHP)
- [Install PHP Extensions](#Install-PHP-Extensions)
- [Change the PHP-FPM Version](#Change-the-PHP-FPM-Version)
- [Change the PHP-CLI Version](#Change-the-PHP-CLI-Version)
- [Install xDebug](#Install-xDebug)
- [Misc](#Misc)
- [Use custom Domain](#Use-custom-Domain)
- [Enable Global Composer Build Install](#Enable-Global-Composer-Build-Install)
- [Install Prestissimo](#Install-Prestissimo)
- [Install Node + NVM](#Install-Node)
- [Debugging](#debugging)
- [Upgrading LaraDock](#upgrading-laradock)
- [Help & Questions](#Help)
<a name="Intro"></a>
## 介绍
LaraDock努力简化创建开发环境过程。
它包含预包装Docker镜像提供你一个美妙的开发环境而不需要安装PHP,NGINX,MySQL和其他任何软件在你本地机器上。
**使用概览:**
让我们了解使用它安装`NGINX`, `PHP`, `Composer`, `MySQL``Redis`,然后运行`Laravel`
1. 将LaraDock放到你的Laravel项目中
<br>
`git clone https://github.com/LaraDock/laradock.git`.
2. 进入LaraDock目录然后运行这些容器。
<br>
`docker-compose up -d nginx mysql redis`
3. 打开你的`.env`文件,然后设置`mysql``DB_HOST``redis``REDIS_HOST`
4. 打开浏览器访问localhost
<a name="features"></a>
### 特点
- 在PHP版本7.05.6.5.5...之中可以简单切换。
- 可选择你最喜欢的数据库引擎比如MySQL, Postgres, MariaDB...
- 可运行自己的软件组合比如Memcached, HHVM, Beanstalkd...
- 所有软件运行在不同的容器之中比如PHP-FPM, NGINX, PHP-CLI...
- 通过简单的编写`dockerfile`容易定制任何容器。
- 所有镜像继承自一个官方基础镜像Trusted base Images
- 可预配置Laravel的Nginx环境
- 容易应用容器中的配置
- 干净的结构化的Docker配置文件`dockerfile`
- 最新的Docker Compose 版本(`docker-compose`
- 所有的都是可视化和可编辑的
- 快速的镜像构建
- 每周都会有更新...
<a name="Supported-Containers"></a>
### 支持的软件 (容器)
- **数据库引擎:**
- MySQL
- PostgreSQL
- MariaDB
- MongoDB
- Neo4j
- **缓存引擎:**
- Redis
- Memcached
- **PHP 服务器:**
- NGINX
- Apache2
- Caddy
- **PHP 编译工具:**
- PHP-FPM
- HHVM
- **消息队列系统:**
- Beanstalkd (+ Beanstalkd Console)
- **工具:**
- Workspace (PHP7-CLI, Composer, Git, Node, Gulp, SQLite, Vim, Nano, cURL...)
>如果你找不到你需要的软件,构建它然后把它添加到这个列表。你的贡献是受欢迎的。
<a name="what-is-docker"></a>
### Docker是什么?
[Docker](https://www.docker.com) 是一个开源项目,自动化部署应用程序软件的容器,在Linux, Mac OS and Windows提供一个额外的抽象层和自动化的[操作系统级的虚拟化](https://en.wikipedia.org/wiki/Operating-system-level_virtualization)
<a name="what-is-laravel"></a>
### Laravel是什么?
额,这很认真的!!!
<a name="why-docker-not-vagrant"></a>
### 为什么使用Docker而不是Vagrant!?
[Vagrant](https://www.vagrantup.com)构建虚拟机需要几分钟然而Docker构建虚拟容器只需要几秒钟。
而不是提供一个完整的虚拟机,就像你用Vagrant,Docker为您提供**轻量级**虚拟容器,共享相同的内核和允许安全执行独立的进程。
除了速度,Docker提供大量的Vagrant无法实现的功能。
最重要的是Docker可以运行在开发和生产(相同环境无处不在)。Vagrant是专为开发,(所以在生产环境你必须每一次重建您的服务器)。
<a name="laradock-vs-homestead"></a>
### LaraDock Homestead 对比
LaraDock and [Homestead](https://laravel.com/docs/master/homestead) 给你一个完整的虚拟开发环境。(不需要安装和配置软件在你自己的每一个操作系统)。
Homestead 是一个工具,为你控制虚拟机(使用Homestead特殊命令)。Vagrant可以管理你的管理虚容器。
运行一个虚拟容器比运行一整个虚拟机快多了**LaraDock 比 Homestead快多了**
<a name="Demo"></a>
## 演示视频
还有什么比**演示视频**好:
- LaraDock v4.0 (即将到来的...)
- LaraDock [v2.2](https://www.youtube.com/watch?v=-DamFMczwDA)
- LaraDock [v0.3](https://www.youtube.com/watch?v=jGkyO6Is_aI)
- LaraDock [v0.1](https://www.youtube.com/watch?v=3YQsHe6oF80)
<a name="Requirements"></a>
## 依赖
- [Git](https://git-scm.com/downloads)
- [Docker](https://www.docker.com/products/docker/)
<a name="Installation"></a>
## 安装
1 - 克隆 `LaraDock` 仓库:
**A)** 如果你已经有一个Laravel项目,克隆这个仓库在到`Laravel`根目录
```bash
git submodule add https://github.com/LaraDock/laradock.git
```
>如果你不是使用Git管理Laravel项目,您可以使用 `git clone` 而不是`git submodule`
**B)** 如果你没有一个Laravel项目,你想Docker安装Laravel,克隆这个源在您的机器任何地方上:
```bash
git clone https://github.com/LaraDock/laradock.git
```
<a name="Usage"></a>
## 使用
**请在开始之前阅读:**
如果你正在使用**Docker Toolbox** (VM),选择以下任何一个方法:
- 更新到Docker [Native](https://www.docker.com/products/docker) Mac/Windows版本 (建议). 查看 [Upgrading Laradock](#upgrading-laradock)
- 使用 LaraDock v3.* (访问 `LaraDock-ToolBox` [分支](https://github.com/LaraDock/laradock/tree/LaraDock-ToolBox)).
如果您使用的是**Docker Native**(Mac / Windows版本)甚至是Linux版本,通常可以继续阅读这个文档LaraDock v4以上版本将仅支持**Docker Native**。
<br>
<br>
1 - 运行容器: *(在运行`docker-compose`命令之前,确认你在 `laradock` 目录中*
**例子:** 运行 NGINX 和 MySQL:
```bash
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` 命令中加上它们.
<br>
2 - 进入 Workspace 容器, 执行像 (Artisan, Composer, PHPUnit, Gulp, ...)等命令
```bash
docker-compose exec workspace bash
```
<br />
增加 `--user=laradock` (例如 `docker-compose exec --user=laradock workspace bash`) 作为您的主机的用户创建的文件. (你可以从 `docker-compose.yml`修改 PUID (User id) 和 PGID (group id) 值 ).
<br>
3 - 编辑 Laravel 的配置.
如果你还没有安装Laravel项目请查看 [How to Install Laravel in a Docker Container](#Install-Laravel).
打开 Laravel的 `.env` 文件 然后 配置 你的`mysql``DB_HOST`:
```env
DB_HOST=mysql
```
<br>
4 - 打开浏览器访问localhost (`http://localhost/`).
<br>
**调试**: 如果你碰到任何问题,请查看 [调试](#debugging) 章节
如果你需要特别支持,请联系我,更多细节在[帮助 & 问题](#Help)章节
<br>
<a name="Documentation"></a>
## 文档
<a name="Docker"></a>
### [Docker]
<a name="List-current-running-Containers"></a>
### 列出正在运行的容器
```bash
docker ps
```
你也可以使用以下命令查看某项目的容器
```bash
docker-compose ps
```
<br>
<a name="Close-all-running-Containers"></a>
### 关闭所有容器
```bash
docker-compose stop
```
停止某个容器:
```bash
docker-compose stop {容器名称}
```
<br>
<a name="Delete-all-existing-Containers"></a>
### 删除所有容器
```bash
docker-compose down
```
小心这个命令,因为它也会删除你的数据容器。(如果你想保留你的数据你应该在上述命令后列出容器名称删除每个容器本身):*
<br>
<a name="Enter-Container"></a>
### 进入容器 (通过SSH 进入一个运行中的容器)
1 - 首先使用 `docker ps`命令查看正在运行的容器
2 - 进入某个容器使用:
```bash
docker-compose exec {container-name} bash
```
*例如: 进入 MySQL 容器*
```bash
docker-compose exec mysql bash
```
3 - 退出容器, 键入 `exit`.
<br>
<a name="Edit-Container"></a>
### 编辑默认容器配置
打开 `docker-compose.yml` 然后 按照你想的修改.
例如:
修改 MySQL 数据库名称:
```yml
environment:
MYSQL_DATABASE: laradock
```
修改 Redis 默认端口为 1111:
```yml
ports:
- "1111:6379"
```
<br>
<a name="Edit-a-Docker-Image"></a>
### 编辑Docker镜像
1 - 找到你想修改的镜像的 `dockerfile` ,
<br>
例如: `mysql``mysql/Dockerfile`.
2 - 按你所要的编辑文件.
3 - 重新构建容器:
```bash
docker-compose build mysql
```
更多信息在容器重建中 [点击这里](#Build-Re-build-Containers).
<br>
<a name="Build-Re-build-Containers"></a>
### 建立/重建容器
如果你做任何改变`dockerfile`确保你运行这个命令,可以让所有修改更改生效:
```bash
docker-compose build
```
选择你可以指定哪个容器重建(而不是重建所有的容器):
```bash
docker-compose build {container-name}
```
如果你想重建整个容器,你可能需要使用 `--no-cache` 选项 (`docker-compose build --no-cache {container-name}`).
<br>
<a name="Add-Docker-Images"></a>
### 增加更多软件 (Docker 镜像)
为了增加镜像(软件), 编辑 `docker-compose.yml` 添加容器细节, 你需要熟悉 [docker compose 文件语法](https://docs.docker.com/compose/compose-file/).
<br>
<a name="View-the-Log-files"></a>
### 查看日志文件
Nginx的日志在 `logs/nginx` 目录
然后查看其它容器日志(MySQL, PHP-FPM,...) 你可以运行:
```bash
docker logs {container-name}
```
<br>
<a name="Laravel"></a>
### [Laravel]
<a name="Install-Laravel"></a>
### 从Docker镜像安装Laravel
1 - 首先你需要进入 Workspace 容器.
2 - 安装 Laravel.
例如 使用 Composer
```bash
composer create-project laravel/laravel my-cool-app "5.2.*"
```
> 我们建议使用 `composer create-project` 替换Laravel 安装器去安装Laravel.
关于更多Laravel安装内容请 [点击这儿](https://laravel.com/docs/master#installing-laravel).
3 - 编辑 `docker-compose.yml` 映射新的应用目录:
系统默认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`替换 `../:/var/www` , 如下:
```yaml
application:
build: ./application
volumes:
- ../my-cool-app/:/var/www
```
4 - 进入目录下继续工作..
```bash
cd my-cool-app
```
5 - 回到LaraDock安装步骤,看看如何编辑`env`的文件。
<br>
<a name="Run-Artisan-Commands"></a>
### 运行 Artisan 命令
你可以从Workspace容器运行artisan命令和其他终端命令
1 - 确认Workspace容器已经运行.
```bash
docker-compose up -d workspace // ..and all your other containers
```
2 - 找到Workspace容器名称:
```bash
docker-compose ps
```
3 - 进入Workspace容器:
```bash
docker-compose exec workspace bash
```
增加 `--user=laradock` (例如 `docker-compose exec --user=laradock workspace bash`) 作为您的主机的用户创建的文件.
4 - 运行任何你想的 :)
```bash
php artisan
```
```bash
Composer update
```
```bash
phpunit
```
<br>
<a name="Use-Redis"></a>
### 使用 Redis
1 - 首先务必用 `docker-compose up` 命令运行 (`redis`)容器.
```bash
docker-compose up -d redis
```
2 - 打开你的Laravel的 `.env` 文件 然后 配置`redis``REDIS_HOST`
```env
REDIS_HOST=redis
```
如果在你的`.env` 文件没有找到`REDIS_HOST`变量。打开数据库配置文件`config/database.php`然后用`redis`替换默认IP`127.0.0.1`,例如:
```php
'redis' => [
'cluster' => false,
'default' => [
'host' => 'redis',
'port' => 6379,
'database' => 0,
],
],
```
3 - 启用Redis缓存或者开启Session管理也在`.env`文件中用`redis`替换默认`file`设置`CACHE_DRIVER``SESSION_DRIVER`
```env
CACHE_DRIVER=redis
SESSION_DRIVER=redis
```
4 - 最好务必通过Compose安装 `predis/predis``(~1.0)`:
```bash
composer require predis/predis:^1.0
```
5 - 你可以用以下代码在Laravel中手动测试
```php
\Cache::store('redis')->put('LaraDock', 'Awesome', 10);
```
<br>
<a name="Use-Mongo"></a>
### 使用 Mongo
1 - 首先在Workspace和PHP-FPM容器中安装`mongo`:
<br>
a) 打开 `docker-compose.yml` 文件
<br>
b) 在Workspace容器中找到`INSTALL_MONGO`选项:
<br>
c) 设置为 `true`
<br>
d) 在PHP-FPM容器中找到`INSTALL_MONGO` <br>
e) 设置为 `true`
相关配置项如下:
```yml
workspace:
build:
context: ./workspace
args:
- INSTALL_MONGO=true
...
php-fpm:
build:
context: ./php-fpm
args:
- INSTALL_MONGO=true
...
```
2 - 重建`Workspace、PHP-FPM`容器 `docker-compose build workspace php-fpm`
3 - 使用`docker-compose up` 命令运行MongoDB容器 (`mongo`)
```bash
docker-compose up -d mongo
```
4 - 在`config/database.php` 文件添加MongoDB的配置项:
```php
'connections' => [
'mongodb' => [
'driver' => 'mongodb',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', 27017),
'database' => env('DB_DATABASE', 'database'),
'username' => '',
'password' => '',
'options' => [
'database' => '',
]
],
// ...
],
```
5 - 打开Laravel的 `.env` 文件 然后 更新以下字段:
- 设置 `DB_HOST``mongo`的主机IP.
- 设置 `DB_PORT``27017`.
- 设置 `DB_DATABASE``database`.
6 - 最后务必通过Composer安装`jenssegers/mongodb`添加服务提供者Laravel Service Provider
```bash
composer require jenssegers/mongodb
```
更多细节内容 [点击这儿](https://github.com/jenssegers/laravel-mongodb#installation).
7 - 测试:
- 首先让你的模型继承Mongo的Eloquent Model. 查看 [文档](https://github.com/jenssegers/laravel-mongodb#eloquent).
- 进入Workspace容器.
- 迁移数据库 `php artisan migrate`.
<br>
<a name="PHP"></a>
### [PHP]
<a name="Install-PHP-Extensions"></a>
### 安装PHP拓展
安装PHP扩展之前,你必须决定你是否需要`FPM``CLI`,因为他们安装在不同的容器上,如果你需要两者,则必须编辑两个容器。
PHP-FPM拓展务必安装在 `php-fpm/Dockerfile-XX`. *(用你PHP版本号替换 XX)*.
<br>
PHP-CLI拓展应该安装到`workspace/Dockerfile`.
<br>
<a name="Change-the-PHP-FPM-Version"></a>
### 修改PHP-FPM版本
默认运行**PHP-FPM 7.0**版本.
>PHP-FPM负责服务你的应用代码,如果你是计划运行您的应用程序在不同PHP-FPM版本上则不需要更改PHP-CLI版本。
#### A) 切换版本 PHP `7.0` 到 PHP `5.6`
1 - 打开 `docker-compose.yml`
2 - 在PHP容器的 `Dockerfile-70`文件。
3 - 修改版本号, 用`Dockerfile-56`替换 `Dockerfile-70` , 例如:
```txt
php-fpm:
build:
context: ./php-fpm
dockerfile: Dockerfile-70
```
4 - 最后重建PHP容器
```bash
docker-compose build php
```
> 更多关于PHP基础镜像, 请访问 [PHP Docker官方镜像](https://hub.docker.com/_/php/).
#### B) 切换版本 PHP `7.0` 或 `5.6` 到 PHP `5.5`
我们已不在本地支持PHP5.5,但是你按照以下步骤获取:
1 - 克隆 `https://github.com/LaraDock/php-fpm`.
3 - 重命名 `Dockerfile-56``Dockerfile-55`.
3 - 编辑文件 `FROM php:5.6-fpm``FROM php:5.5-fpm`.
4 - 从 `Dockerfile-55`构建镜像.
5 - 打开 `docker-compose.yml` 文件.
6 - 将 `php-fpm` 指向你的 `Dockerfile-55` 文件.
<br>
<a name="Change-the-PHP-CLI-Version"></a>
### 修改 PHP-CLI 版本
默认运行**PHP-CLI 7.0**版本
>说明: PHP-CLI只用于执行Artisan和Composer命令不服务于你的应用代码这是PHP-FPM的工作所以编辑PHP-CLI的版本不是很重要。
PHP-CLI安装在Workspace容器改变PHP-CLI版本你需要编辑`workspace/Dockerfile`.
现在你必须手动修改PHP-FPM的`Dockerfile`或者创建一个新的。 (可以考虑贡献功能).
<br>
<a name="Install-xDebug"></a>
### 安装 xDebug
1 - 首先在Workspace和PHP-FPM容器安装 `xDebug`:
<br>
a) 打开 `docker-compose.yml` 文件
<br>
b) 在Workspace容器中找到 `INSTALL_XDEBUG` 选项
<br>
c) 改为 `true`
<br>
d) 在PHP-FPM容器中找到 `INSTALL_XDEBUG ` 选项<br>
e) 改为 `true`
例如:
```yml
workspace:
build:
context: ./workspace
args:
- INSTALL_XDEBUG=true
...
php-fpm:
build:
context: ./php-fpm
args:
- INSTALL_XDEBUG=true
...
```
2 - 重建容器 `docker-compose build workspace php-fpm`
<br>
<a name="Misc"></a>
### [Misc]
<br>
<a name="Use-custom-Domain"></a>
### 使用自定义域名 (替换Docker的IP)
假定你的自定义域名是 `laravel.dev`
1 - 打开 `/etc/hosts` 文件 添加以下内容映射你的localhost 地址 `127.0.0.1``laravel.dev` 域名
```bash
127.0.0.1 laravel.dev
```
2 - 打开你的浏览器访问 `{http://laravel.dev}`
你可以在nginx配置文件自定义服务器名称,如下:
```conf
server_name laravel.dev;
```
<br>
<a name="Enable-Global-Composer-Build-Install"></a>
### 安装全局Composer命令
为启用全局Composer Install在容器构建中允许你安装composer的依赖然后构建完成后就是可用的。
1 - 打开 `docker-compose.yml` 文件
2 - 在Workspace容器找到 `COMPOSER_GLOBAL_INSTALL` 选项并设置为 `true`
例如:
```yml
workspace:
build:
context: ./workspace
args:
- COMPOSER_GLOBAL_INSTALL=true
...
```
3 - 现在特价你的依赖关系到 `workspace/composer.json`
4 - 重建Workspace容器 `docker-compose build workspace`
<br>
<a name="Install-Prestissimo"></a>
### 安装 Prestissimo
[Prestissimo](https://github.com/hirak/prestissimo) 是一个平行安装功能的composer插件。
1 - 在安装期间使全局Composer Install 正在运行:
点击这个 [启用全局Composer构建安装](#Enable-Global-Composer-Build-Install) 然后继续步骤1、2.
2 - 添加 prestissimo 依赖到 Composer:
a - 现在打开 `workspace/composer.json` 文件
b - 添加 `"hirak/prestissimo": "^0.3"` 依赖
c - 重建Workspace容器 `docker-compose build workspace`
<br>
<a name="Install-Node"></a>
### 安装 Node + NVM
在Workspace 容器安装 NVM 和 NodeJS
1 - 打开 `docker-compose.yml` 文件
2 - 在Workspace容器找到 `INSTALL_NODE` 选项设为 `true`
例如:
```yml
workspace:
build:
context: ./workspace
args:
- INSTALL_NODE=true
...
```
3 - 重建容器 `docker-compose build workspace`
<br>
<a name="debugging"></a>
### Debugging
*这里是你可能面临的常见问题列表,以及可能的解决方案.*
#### 看到空白页而不是Laravel的欢迎页面!
在Laravel根目录运行下列命令:
```bash
sudo chmod -R 777 storage bootstrap/cache
```
#### 看到 "Welcome to nginx" 而不是 Laravel 应用!
在浏览器使用 `http://127.0.0.1` 替换 `http://localhost`.
#### 看到包含 `address already in use` 的错误
确保你想运行的服务端口(80, 3306, etc.)不是已经被其他程序使用,例如`apache`/`httpd`服务或其他安装的开发工具
<br>
<a name="upgrading-laradock"></a>
### LaraDock 升级
从Docker Toolbox (VirtualBox)移动到Docker Native (for Mac/Windows),需要从 LaraDock v3.* 升级到 v4.*:
1. 停止Docker虚拟机 `docker-machine stop {default}`
2. 安装 Docker [Mac](https://docs.docker.com/docker-for-mac/) 或 [Windows](https://docs.docker.com/docker-for-windows/).
3. 升级 LaraDock 到 `v4.*.*` (`git pull origin master`)
4. 像之前一样使用LaraDock: `docker-compose up -d nginx mysql`.
**说明:** 如果你面临任何上面的问题的最后一步:重建你所有的容器
`docker-compose build --no-cache`
"警告:容器数据可能会丢失!"
<br>
## 贡献
这个小项目是由一个有一个全职工作和很多的职责的人建立的,所以如果你喜欢这个项目,并且发现它需要一个bug修复或支持或新软件或升级任何容器,或其他任何. . 你是非常欢迎,欢迎毫不不犹豫地贡献吧:)
#### 阅读我们的 [贡献说明](https://github.com/LaraDock/laradock/blob/master/CONTRIBUTING.md)
<a name="Help"></a>
## 帮助 & 问题
从聊天室 [Gitter](https://gitter.im/LaraDock/laradock) 社区获取帮助和支持.
你也可以打开Github上的 [issue](https://github.com/laradock/laradock/issues) (将被贴上问题和答案) 或与大家讨论 [Gitter](https://gitter.im/LaraDock/laradock).
Docker或Laravel的特别帮助你可以在[Codementor.io](https://www.codementor.io/mahmoudz)上直接和项目创始人在线沟通
## 关于作者
**创始人:**
- [Mahmoud Zalt](https://github.com/Mahmoudz) (Twitter [@Mahmoud_Zalt](https://twitter.com/Mahmoud_Zalt))
**优秀的人:**
- [Contributors](https://github.com/LaraDock/laradock/graphs/contributors)
- [Supporters](https://github.com/LaraDock/laradock/issues?utf8=%E2%9C%93&q=)
## 许可证
[MIT License](https://github.com/laradock/laradock/blob/master/LICENSE) (MIT)

836
README.md

File diff suppressed because it is too large Load Diff

View File

@ -32,7 +32,6 @@ $root@midascode:~# docker
$root@midascode:~# apt-get install git
$root@midascode:~# git clone https://github.com/laravel/laravel
$root@midascode:~# cd laravel
$root@midascode:~/laravel# git checkout develop
$root@midascode:~/laravel/ git submodule add https://github.com/LaraDock/laradock.git
$root@midascode:~/laravel/ cd laradock
```
@ -59,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
```
@ -142,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
}
@ -9,9 +9,10 @@ rewrite {
ext /
to /index.php?{query}
}
gzip
browse
log stdout
errors stderr
log /var/log/caddy/access.log
errors /var/log/caddy/error.log
# Uncomment to enable TLS (HTTPS)
# Change the first list to listen on port 443 when enabling TLS
#tls self_signed

View File

@ -2,24 +2,23 @@ FROM alpine:3.4
MAINTAINER Eric Pfeiffer <computerfr33k@users.noreply.github.com>
LABEL caddy_version="0.9.0" architecture="amd64"
ENV caddy_version=0.9.3
LABEL caddy_version="$caddy_version" architecture="amd64"
RUN apk update \
&& apk upgrade \
&& 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/v0.9.0/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 \
&& /usr/bin/caddy -version
--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
ENTRYPOINT ["caddy"]
CMD ["-conf", "/etc/Caddyfile"]
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,15 +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:
- "2222:22"
tty: true
### PHP-FPM Container #######################################
@ -33,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:
@ -45,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 ##################################
@ -55,7 +72,7 @@ services:
args:
- PHP_UPSTREAM=php-fpm
volumes_from:
- volumes_source
- applications
volumes:
- ./logs/nginx/:/var/log/nginx
ports:
@ -64,15 +81,15 @@ services:
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:
@ -86,7 +103,7 @@ services:
hhvm:
build: ./hhvm
volumes_from:
- volumes_source
- applications
expose:
- "9000"
links:
@ -95,9 +112,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:
@ -110,8 +142,8 @@ services:
postgres:
build: ./postgres
volumes_from:
- volumes_data
volumes:
- postgres:/var/lib/postgresql/data
ports:
- "5432:5432"
environment:
@ -119,19 +151,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 #########################################
@ -142,8 +173,8 @@ services:
- "1337:1337"
environment:
- NEO4J_AUTH=homestead:secret
volumes_from:
- volumes_data
volumes:
- neo4j:/var/lib/neo4j/data
### MongoDB Container #######################################
@ -151,24 +182,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:
@ -184,6 +230,21 @@ services:
links:
- php-fpm
### RabbitMQ Container ######################################
rabbitmq:
build: ./rabbitmq
ports:
- "5672:5672"
- "15671:15671"
- "8080:15672"
privileged: true
environment:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
links:
- php-fpm
### Beanstalkd Console Container ############################
beanstalkd-console:
@ -198,37 +259,84 @@ services:
caddy:
build: ./caddy
volumes_from:
- volumes_source
- applications
volumes:
- caddy:/root/.caddy
ports:
- "80:80"
- "443:443"
- "2015:2015"
volumes:
- ./caddy/Caddyfile:/etc/Caddyfile
- ./logs/caddy:/var/log/caddy
links:
- php-fpm
### Laravel Application Code Container ######################
### phpMyAdmin Container ####################################
volumes_source:
build: ./volumes/application
phpmyadmin:
build: ./phpmyadmin
environment:
PMA_ARBITRARY: 1
MYSQL_USER: homestead
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: root
ports:
- "8080:80"
links:
# for mysql container
- "mysql:db"
# for mariadb container
# - "mariadb:db"
### pgAdmin Container #######################################
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:
build: ./volumes/data
volumes:
- ./data/mysql:/var/lib/mysql
- ./data/postgres:/var/lib/postgres
- ./data/mariadb:/var/lib/mariadb
- ./data/memcached:/var/lib/memcached
- ./data/redis:/data
- ./data/neo4j:/var/lib/neo4j/data
- ./data/mongo:/data/db
### 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

@ -1,4 +1,4 @@
FROM ubuntu:14.04
FROM ubuntu:14.04
RUN apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0x5a16e7281be7a449
@ -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.6
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

6
mysql/my.cnf Normal file
View File

@ -0,0 +1,6 @@
# The MySQL Client configuration file.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
[mysql]

3
mysql/startup Normal file
View File

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

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;
}

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,8 +40,7 @@ MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
# xDebug:
#####################################
ARG INSTALL_XDEBUG=true
ENV INSTALL_XDEBUG ${INSTALL_XDEBUG}
ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Install the xdebug extension
pecl install xdebug && \
@ -55,8 +54,7 @@ COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
# MongoDB:
#####################################
ARG INSTALL_MONGO=true
ENV INSTALL_MONGO ${INSTALL_MONGO}
ARG INSTALL_MONGO=false
RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension
pecl install mongodb && \
@ -67,8 +65,7 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
# ZipArchive:
#####################################
ARG INSTALL_ZIP_ARCHIVE=true
ENV INSTALL_ZIP_ARCHIVE ${INSTALL_ZIP_ARCHIVE}
ARG INSTALL_ZIP_ARCHIVE=false
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
# Install the zip extension
pecl install zip && \
@ -79,24 +76,59 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
# PHP Memcached:
#####################################
ARG INSTALL_MEMCACHED=true
ENV INSTALL_MEMCACHED ${INSTALL_MEMCACHED}
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
ENV INSTALL_OPCACHE ${INSTALL_OPCACHE}
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
@ -110,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,14 +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
ENV INSTALL_XDEBUG ${INSTALL_XDEBUG}
ARG INSTALL_XDEBUG=false
RUN if [ ${INSTALL_XDEBUG} = true ]; then \
# Install the xdebug extension
pecl install xdebug && \
@ -55,8 +55,7 @@ COPY ./xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
# MongoDB:
#####################################
ARG INSTALL_MONGO=true
ENV INSTALL_MONGO ${INSTALL_MONGO}
ARG INSTALL_MONGO=false
RUN if [ ${INSTALL_MONGO} = true ]; then \
# Install the mongodb extension
pecl install mongodb && \
@ -67,8 +66,7 @@ RUN if [ ${INSTALL_MONGO} = true ]; then \
# ZipArchive:
#####################################
ARG INSTALL_ZIP_ARCHIVE=true
ENV INSTALL_ZIP_ARCHIVE ${INSTALL_ZIP_ARCHIVE}
ARG INSTALL_ZIP_ARCHIVE=false
RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
# Install the zip extension
pecl install zip && \
@ -79,8 +77,7 @@ RUN if [ ${INSTALL_ZIP_ARCHIVE} = true ]; then \
# PHP Memcached:
#####################################
ARG INSTALL_MEMCACHED=true
ENV INSTALL_MEMCACHED ${INSTALL_MEMCACHED}
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" \
@ -98,17 +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
ENV INSTALL_OPCACHE ${INSTALL_OPCACHE}
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
#
#--------------------------------------------------------------------------
@ -123,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

9
phpmyadmin/Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM phpmyadmin/phpmyadmin
MAINTAINER Bo-Yi Wu <appleboy.tw@gmail.com>
# Add volume for sessions to allow session persistence
VOLUME /sessions
# We expose phpMyAdmin on port 80
EXPOSE 80

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 ###############################

5
rabbitmq/Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM rabbitmq
RUN rabbitmq-plugins enable --offline rabbitmq_management
EXPOSE 15671 15672

View File

@ -1,7 +0,0 @@
FROM debian:jessie
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
WORKDIR /var/www/laravel
CMD ["true"]

View File

@ -1,5 +0,0 @@
FROM debian:jessie
MAINTAINER Mahmoud Zalt <mahmoud@zalt.me>
CMD ["true"]

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,42 +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
#####################################
# 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:
@ -78,6 +46,14 @@ ARG PUID=1000
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:
@ -91,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/php.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.
@ -119,17 +149,19 @@ USER laradock
#####################################
# Check if NVM needs to be installed
ARG INSTALL_NODE=true
ARG NODE_VERSION=stable
ENV NODE_VERSION ${NODE_VERSION}
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.3/install.sh | bash && \
. ~/.nvm/nvm.sh && \
nvm install stable && \
nvm use stable && \
nvm alias stable && \
npm install -g gulp bower \
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.6/install.sh | bash && \
. $NVM_DIR/nvm.sh && \
nvm install ${NODE_VERSION} && \
nvm use ${NODE_VERSION} && \
nvm alias ${NODE_VERSION} && \
npm install -g gulp bower vue-cli \
;fi
# Wouldn't execute when added to the RUN statement in the above block
@ -140,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
@ -152,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

51
workspace/insecure_id_rsa Normal file
View File

@ -0,0 +1,51 @@
-----BEGIN RSA PRIVATE KEY-----
MIIJKQIBAAKCAgEA9LX0DVV8VY0k+d58v+Tqe6LfhniBhBgBJ6/ZIGAFyuhqpyf9
1Dn1ihcZeIBLrC4+IaRq0/xiVcdpyBu3fyGkYnyb57Pi2pOFo/te88j0ReeP5onO
mtDAERCR+Wkzi7kivg4Z4U1KgLeJn3R6WJgV1nUwFwwoPID+UC3RpHcS/TPhgZOL
Sog8dYUXx1fbmOnItJbKUK4Zz883li5LUwPLlmGZbrNYL90l1+s1Q9vlwevye2Wq
zXCvYh6DC3XRYIEnZxrOpDSyUHtAwMJ3HXgkIs3HV1dgPTt972mP29ANaG1MbqAo
retvQMMkPQv+9X96wUq34FEm9aTlT5oS0SQ2Xp3/zUvBSFtfeP7ubJb69bun4/4o
gmHLbdDzYNNFAJ5cm1gwyg95eXvCm5derk8Nf+QBHOlpd2gprVmKcERnrnv4Z1Mz
l6/f0o4UC3wfmQgErfNzfrtJFe54uxuf9OM9dXamcJJOsdUgM1hiZ6e+qYsHeAD9
n7vCqjQJlrMhCGZpkeSUhkuYuLBrkhqIOq2VqKdS8CHzY3TixW7Pq5xdKDpqYGUX
qPHx/j5jpKt4h2j0L1ztwo9nedh1cbRyPp9oiow7twsxyD99b36rGSh35qKN3JBV
uMn6z3F8tIELMD49IyVCGyi2+jn7qbVLEOUr5IsFqFuIq5zt5ShfSi6N7e8CAwEA
AQKCAgA1t2M1Mhiy5uLA/re/n85hCWWrrPQxPNu0DIPK+YkL+2y9+KddWMOvZlau
/uqdhyEYXXEdy38CeV2dEYh8HbRp8hR/Dhu0A0IItvsm5GvKlIQgBQwXK8+db1e7
uf4Yo7EeqxW/QSojiyZonDbnD6trghnmVULX1TD+BLDKO2Ett5++w9aFq9YpreeE
WKLZtCfcjGUoxK7h0QjQrKTYOjMMdawqgq/PAep2tSjiFnke0l5N/Ak8Q4ocLbpy
X5BwcKlnlpjZrr+drxCNv6JKE79K7ITfhUyY5GBGl5N+mvL2g1eNyRZk5xNq0es4
g1OaLDuUBoTKdsXokiPMD3Ql+J7+RCoC9PuGutdCAIU2u9CoFAfKJpsKh+sGRyri
zvD5hlS31F78zif7W5ubi9supA6etJYbK+mwcDsJgmtc+q51xsH3T1ODvRcbtzvY
FE8JzuchN4aPtsY+W/waTDVDdymFvPSsYjX7Blq3fnpg2uJKtzWEIQE+rY7gC3rN
oNSE4YFbIAjTM4kIuIFnkVq3o2BmQ7WHjb3USelhFxBPJ67nBMLS3ShXLjyiu22U
8RxKcbOKpEimuCKRSVEdpsNnps3h2y8c2PPWWS7LGzAiCepLjXwqHLe4L/cvx8S9
KZRXQneakkKToguV7N9p0O9prjJckb4jo941iaDepVZIHbuP8QKCAQEA+vABCKnn
8PA4RWixPcIybj6iQpHPzt6uZxv3il3IoY3Anm2+EHbloE9VcH3phQEAoTQsxd+k
octHHqdJi6YxOTmmsHl3jilA3kKg0A7Rin702DObC3c9VSOe7V9rizPQnFewkyDP
mpOoW3by0DYv0DFtA8zNfgSkFeqZEoBnQyMom9lBYcJ9VKriUfdCvPgh3ZV/SzEf
cp6ZtMLRvtEWzOx75cww6kLvUuUekQl/7Ubr36Oz+71B66VN59udSLYPAb+stzhb
QSU7LbNKaLlygBREqnTeXj+VCXGnrxORZS1FfqO9unbxg/FYBDBMt/2jXt6Elz62
YgjDEtGjcTA/rQKCAQEA+aXKW6zufDG88DPsX5psl7Cu2Fwhq1j5ULGvpkuucaVs
snONmFqi4jH7LEZVjEcHg6GhDqGytaaUr1KhXVWttn0om2qZIKFg7BR7E5PR9HKu
Ig0do68pPf/5MKT6TKq1gB1l8B481dVc8tmaHjHbLz9UlIf8uLbXfP1EYyADAqJ4
xtQNtOj7uz0k5ayIgWU6scGC3ElLTzfWusXPJyWFNV5wAtCI0Xu4U/IdNO0rLiBI
8BSC8VC4Maw/a1ZY1nliXBfjmtJ3i7A2s36+YG11vXmi2BKFXa80BM7+L9zptxf2
Pv7H1Yvyx4bfVZ2xCTLCyjtUj4wGGkmHMTC8M0gniwKCAQBYzQYQos/Jm7jOFzZh
vI9MJC4XkLIRawwcwPDgrj+JrDg12HAiM3EfQfPiUyyIPMqUQXp2q6X++4i3eEu2
d6GDtrseSF3emQqznLB78EKG2FadC+YaMKAruOdM6S+Nm1B/gyihaEMPWKGDfJyA
wiw5aMRDS/6MUegfOV3iBj6Eq7R7Mm7IwaLIi5B7oRyk8spJN9ZMLZ4LWcTbCvZe
qG+BJU7TC2dj/zviAeLHQK1csnRWOABBXcAuO9lN65HFYWf+Hm5oiDEC5MIEciYq
2TWDzahfCeyHPcjoBqhodGxHebXWEuvZSK4/GvEiylTb544gzG3vd+ni12bxCe7k
50YhAoIBAQCgG2r3dqYQspl49+P9wH0qn97S1eumB88FqJ99KIZ9Tlmy7Rb/ggl6
xhFPaOBOsfMowY0YZC3IAEjVVEo3IM7i/cwAONJyMe2GGvCAMspxWudA4WaD5r+t
irAXOYdpigYTX0dUQyBDB66v9Uy5VsI6wAQPqlMzZ9g1yfyFEi+8DdUltzP/NXjU
sbcrMYbubazB+dhiTQNmj+pAKMLdWVvgSWvO8kz9BLrH47xFiGGsGHqOtqjv+RPY
j56wyVT6YCjr5UpMrfSLevzqCzwvfaQIW61LpD0yQz46Y0J0Eds2WMDNz/r7guC2
hFJRh2vV+V8h8gEeevAjBcsViir5PKpXAoIBAQC/gAQCLbqo4FylEVST3IP8rxA5
RGbLRDJ2j+ywEzOuy2ufGI/CfxeG/+jF5E0/uBRm8rrnMmaJaNr42hF4r5kjNM5u
ficOVucU3FluQqae73zfUFeAQBft+4tTH+sR8jo+LvEBGinW1wHv7di45I3at2HM
jMtZgWPPIqCBIay0UKysW4eEwXYC9cWg9kPcb2y56zadrKxGZqHOPezH2A1iOuzp
vw0mG0xHUY4Eg5aZxcWB1jMf7bbxTAAMxQiBnw0bPEf5zpWzeKL0obxT/NhCgmV7
/Fqs0GCbXEEgJo0zAVemALOAYRW3pYvt8FoCOopo4ADyfmdWlAvzCy46k7Fo
-----END RSA PRIVATE KEY-----

View File

@ -0,0 +1,46 @@
PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: imported-openssh-key
Public-Lines: 12
AAAAB3NzaC1yc2EAAAADAQABAAACAQD0tfQNVXxVjST53ny/5Op7ot+GeIGEGAEn
r9kgYAXK6GqnJ/3UOfWKFxl4gEusLj4hpGrT/GJVx2nIG7d/IaRifJvns+Lak4Wj
+17zyPRF54/mic6a0MAREJH5aTOLuSK+DhnhTUqAt4mfdHpYmBXWdTAXDCg8gP5Q
LdGkdxL9M+GBk4tKiDx1hRfHV9uY6ci0lspQrhnPzzeWLktTA8uWYZlus1gv3SXX
6zVD2+XB6/J7ZarNcK9iHoMLddFggSdnGs6kNLJQe0DAwncdeCQizcdXV2A9O33v
aY/b0A1obUxuoCit629AwyQ9C/71f3rBSrfgUSb1pOVPmhLRJDZenf/NS8FIW194
/u5slvr1u6fj/iiCYctt0PNg00UAnlybWDDKD3l5e8Kbl16uTw1/5AEc6Wl3aCmt
WYpwRGeue/hnUzOXr9/SjhQLfB+ZCASt83N+u0kV7ni7G5/04z11dqZwkk6x1SAz
WGJnp76piwd4AP2fu8KqNAmWsyEIZmmR5JSGS5i4sGuSGog6rZWop1LwIfNjdOLF
bs+rnF0oOmpgZReo8fH+PmOkq3iHaPQvXO3Cj2d52HVxtHI+n2iKjDu3CzHIP31v
fqsZKHfmoo3ckFW4yfrPcXy0gQswPj0jJUIbKLb6OfuptUsQ5SvkiwWoW4irnO3l
KF9KLo3t7w==
Private-Lines: 28
AAACADW3YzUyGLLm4sD+t7+fzmEJZaus9DE827QMg8r5iQv7bL34p11Yw69mVq7+
6p2HIRhdcR3LfwJ5XZ0RiHwdtGnyFH8OG7QDQgi2+ybka8qUhCAFDBcrz51vV7u5
/hijsR6rFb9BKiOLJmicNucPq2uCGeZVQtfVMP4EsMo7YS23n77D1oWr1imt54RY
otm0J9yMZSjEruHRCNCspNg6Mwx1rCqCr88B6na1KOIWeR7SXk38CTxDihwtunJf
kHBwqWeWmNmuv52vEI2/okoTv0rshN+FTJjkYEaXk36a8vaDV43JFmTnE2rR6ziD
U5osO5QGhMp2xeiSI8wPdCX4nv5EKgL0+4a610IAhTa70KgUB8ommwqH6wZHKuLO
8PmGVLfUXvzOJ/tbm5uL2y6kDp60lhsr6bBwOwmCa1z6rnXGwfdPU4O9Fxu3O9gU
TwnO5yE3ho+2xj5b/BpMNUN3KYW89KxiNfsGWrd+emDa4kq3NYQhAT6tjuALes2g
1IThgVsgCNMziQi4gWeRWrejYGZDtYeNvdRJ6WEXEE8nrucEwtLdKFcuPKK7bZTx
HEpxs4qkSKa4IpFJUR2mw2emzeHbLxzY89ZZLssbMCIJ6kuNfCoct7gv9y/HxL0p
lFdCd5qSQpOiC5Xs32nQ72muMlyRviOj3jWJoN6lVkgdu4/xAAABAQD68AEIqefw
8DhFaLE9wjJuPqJCkc/O3q5nG/eKXcihjcCebb4QduWgT1VwfemFAQChNCzF36Sh
y0cep0mLpjE5OaaweXeOKUDeQqDQDtGKfvTYM5sLdz1VI57tX2uLM9CcV7CTIM+a
k6hbdvLQNi/QMW0DzM1+BKQV6pkSgGdDIyib2UFhwn1UquJR90K8+CHdlX9LMR9y
npm0wtG+0RbM7HvlzDDqQu9S5R6RCX/tRuvfo7P7vUHrpU3n251Itg8Bv6y3OFtB
JTsts0pouXKAFESqdN5eP5UJcaevE5FlLUV+o726dvGD8VgEMEy3/aNe3oSXPrZi
CMMS0aNxMD+tAAABAQD5pcpbrO58MbzwM+xfmmyXsK7YXCGrWPlQsa+mS65xpWyy
c42YWqLiMfssRlWMRweDoaEOobK1ppSvUqFdVa22fSibapkgoWDsFHsTk9H0cq4i
DR2jryk9//kwpPpMqrWAHWXwHjzV1Vzy2ZoeMdsvP1SUh/y4ttd8/URjIAMConjG
1A206Pu7PSTlrIiBZTqxwYLcSUtPN9a6xc8nJYU1XnAC0IjRe7hT8h007SsuIEjw
FILxULgxrD9rVljWeWJcF+Oa0neLsDazfr5gbXW9eaLYEoVdrzQEzv4v3Om3F/Y+
/sfVi/LHht9VnbEJMsLKO1SPjAYaSYcxMLwzSCeLAAABAQC/gAQCLbqo4FylEVST
3IP8rxA5RGbLRDJ2j+ywEzOuy2ufGI/CfxeG/+jF5E0/uBRm8rrnMmaJaNr42hF4
r5kjNM5uficOVucU3FluQqae73zfUFeAQBft+4tTH+sR8jo+LvEBGinW1wHv7di4
5I3at2HMjMtZgWPPIqCBIay0UKysW4eEwXYC9cWg9kPcb2y56zadrKxGZqHOPezH
2A1iOuzpvw0mG0xHUY4Eg5aZxcWB1jMf7bbxTAAMxQiBnw0bPEf5zpWzeKL0obxT
/NhCgmV7/Fqs0GCbXEEgJo0zAVemALOAYRW3pYvt8FoCOopo4ADyfmdWlAvzCy46
k7Fo
Private-MAC: 4ea4cef3fa63f1068dcd512c477c61dd7e85bb38

View File

@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQD0tfQNVXxVjST53ny/5Op7ot+GeIGEGAEnr9kgYAXK6GqnJ/3UOfWKFxl4gEusLj4hpGrT/GJVx2nIG7d/IaRifJvns+Lak4Wj+17zyPRF54/mic6a0MAREJH5aTOLuSK+DhnhTUqAt4mfdHpYmBXWdTAXDCg8gP5QLdGkdxL9M+GBk4tKiDx1hRfHV9uY6ci0lspQrhnPzzeWLktTA8uWYZlus1gv3SXX6zVD2+XB6/J7ZarNcK9iHoMLddFggSdnGs6kNLJQe0DAwncdeCQizcdXV2A9O33vaY/b0A1obUxuoCit629AwyQ9C/71f3rBSrfgUSb1pOVPmhLRJDZenf/NS8FIW194/u5slvr1u6fj/iiCYctt0PNg00UAnlybWDDKD3l5e8Kbl16uTw1/5AEc6Wl3aCmtWYpwRGeue/hnUzOXr9/SjhQLfB+ZCASt83N+u0kV7ni7G5/04z11dqZwkk6x1SAzWGJnp76piwd4AP2fu8KqNAmWsyEIZmmR5JSGS5i4sGuSGog6rZWop1LwIfNjdOLFbs+rnF0oOmpgZReo8fH+PmOkq3iHaPQvXO3Cj2d52HVxtHI+n2iKjDu3CzHIP31vfqsZKHfmoo3ckFW4yfrPcXy0gQswPj0jJUIbKLb6OfuptUsQ5SvkiwWoW4irnO3lKF9KLo3t7w== insecure@laradock

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