-
-
Notifications
You must be signed in to change notification settings - Fork 652
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit be1620e
Showing
17 changed files
with
1,865 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Note: | ||
# To effectively apply the changes you will have | ||
# to re-index the git index (if there are already | ||
# commited files) | ||
# | ||
# $ git rm -r --cached . | ||
# $ git add . | ||
# $ git commit -m ".gitignore index rebuild" | ||
# | ||
|
||
|
||
###################################### | ||
# CUSTOM | ||
###################################### | ||
|
||
.env | ||
log/ | ||
run/ | ||
|
||
|
||
|
||
|
||
###################################### | ||
# GENERIC | ||
###################################### | ||
|
||
###### std ###### | ||
.lock | ||
*.log | ||
|
||
###### patches/diffs ###### | ||
*.patch | ||
*.diff | ||
*.orig | ||
*.rej | ||
|
||
|
||
###################################### | ||
# Operating Systems | ||
###################################### | ||
|
||
###### OSX ###### | ||
._* | ||
.DS* | ||
.Spotlight-V100 | ||
.Trashes | ||
|
||
###### Windows ###### | ||
Thumbs.db | ||
ehthumbs.db | ||
Desktop.ini | ||
$RECYCLE.BIN/ | ||
*.lnk | ||
*.shortcut | ||
|
||
###################################### | ||
# Editors | ||
###################################### | ||
|
||
###### Sublime ###### | ||
*.sublime-workspace | ||
*.sublime-project | ||
|
||
###### Eclipse ###### | ||
.classpath | ||
.buildpath | ||
.project | ||
.settings/ | ||
|
||
###### Netbeans ###### | ||
/nbproject/ | ||
|
||
###### Intellij IDE ###### | ||
.idea/ | ||
.idea_modules/ | ||
|
||
###### vim ###### | ||
*.swp | ||
*.swo | ||
*~ | ||
|
||
###### TextMate ###### | ||
.tm_properties | ||
*.tmproj | ||
|
||
###### BBEdit ###### | ||
*.bbprojectd | ||
*.bbproject | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2016 cytopia | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Devilbox | ||
|
||
The ultimate Docker LAMP/LEMP Stack for local development. | ||
|
||
## Specials | ||
|
||
* All logs are available on your Host computer | ||
* MySQL localhost socket is available in PHP container | ||
* MySQL `127.0.0.1:3006` is available in PHP container | ||
* Xdebug is included | ||
|
||
## Run-time Matrix | ||
|
||
You can choose any combination of the following docker images during run-time: | ||
|
||
| Webserver | Database | PHP | | ||
|-----------|----------|-----| | ||
| Apache 2.2 | [MySQL 5.5](https://github.com/cytopia/docker-mysql-5.5) | [PHP 5.5](https://github.com/cytopia/docker-php-fpm-5.5) | | ||
| [Apache 2.4](https://github.com/cytopia/docker-apache-2.4) | MySQL 5.6 | [PHP 5.6](https://github.com/cytopia/docker-php-fpm-5.6) | | ||
| Nginx | MySQL 5.7 | [PHP 7.0](https://github.com/cytopia/docker-php-fpm-7.0) | | ||
| | MariaDB 5 | [PHP 7.1](https://github.com/cytopia/docker-php-fpm-7.1) | | ||
| | MariaDB 10 | | | ||
|
||
|
||
## Start | ||
|
||
1. Copy `env-example` to `.env` | ||
2. Edit `.env` | ||
3. `docker-compose up` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<?php | ||
// Fix DocumentRoot for VirtualDocumentRoot Hosts | ||
$_SERVER['DOCUMENT_ROOT'] = str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['SCRIPT_FILENAME']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
// TODO: logpath could also be passed via CMD argument | ||
// so this script could be more general | ||
$path = "/var/log/apache-2.4"; | ||
$fh_timeout = 30; // 30 sek. | ||
|
||
$fd = fopen("php://stdin", "r"); | ||
|
||
while (!feof($fd)) { | ||
|
||
$row = fgets($fd); | ||
|
||
list($vhost, $h, $l, $u, $t, $r, $s, $b, $referrer, $ua) = explode(";", $row, 10); | ||
|
||
if (!isset(${$vhost})) { | ||
${$vhost} = fopen($path . "/" . $vhost . "_access.log", "a+"); | ||
} | ||
$lastwrite[$vhost] = time(); | ||
fputs (${$vhost}, "$h $l $u $t $r $s $b $referrer $ua"); | ||
|
||
foreach ($lastwrite as $vhost => $time) { | ||
if ((time() - ($time+30)) >=0) { | ||
fclose(${$vhost}); | ||
unset(${$vhost}); | ||
unset($lastwrite[$vhost]); | ||
} | ||
} | ||
} |
Oops, something went wrong.