Skip to content

Commit

Permalink
*Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
pcfreak30 committed Jul 2, 2015
1 parent 0cfb44e commit 3b70920
Show file tree
Hide file tree
Showing 8 changed files with 518 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM wordpress

RUN apt-get update && apt-get install -y git wget subversion cvs bzr

RUN wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -O /usr/local/bin/wp

RUN pecl install xdebug

RUN sed -i "s/WP_DEBUG', false/WP_DEBUG', true/" /usr/src/wordpress/wp-config-sample.php

RUN docker-php-ext-install opcache

COPY php/php.ini /usr/local/etc/php/php.ini

COPY php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini

RUN echo "zend_extension = /usr/local/lib/php/extensions/$(ls /usr/local/lib/php/extensions | tail -n 1)/xdebug.so" >> /usr/local/etc/php/xdebug.ini

COPY php/opcache.ini /usr/local/etc/php/conf.d/opcache.ini

COPY php/mailcatcher.ini /usr/local/etc/php/conf.d/mailcatcher.ini
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
### What WPStack includes ###

* Latest wordpress on mod_php
* PHP 5.6 with xdebug and opcache
* MariaDB
* phpMyAdmin
* Git
* Subversion
* CVS
* Bazaar

### Default Ports ###

* WEB: 8080
* PhpMyAdmin: 8081

### Default Database Root Password ###

`wpstack`

### How to Build From Source ###

`docker-compose -f docker-compose-build.yml`

### How to Build From Image ###

`docker-compose`
24 changes: 24 additions & 0 deletions docker-compose-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
wordpress:
build: .
environment:
WORDPRESS_DB_PASSWORD: password
MYSQL_PORT_3306_TCP: 1
links:
- db:mysql
ports:
- 8080:80
- 9000:9000
volumes:
- web/:/var/www/html
db:
image: mariadb
environment:
MYSQL_ROOT_PASSWORD: password
expose:
- 3306
phpmyadmin:
image: nazarpc/phpmyadmin
links:
- db:mysql
expose:
- 8081:80
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
wordpress:
build: pcfreak30/wpstack
image:
extends:
file: docker-compose.yml
service: wordpress
db:
extends:
file: docker-compose.yml
service: db
phpmyadmin:
extends:
file: docker-compose.yml
service: phpmyadmin
1 change: 1 addition & 0 deletions php/mailcatcher.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sendmail_path = "/usr/local/rvm/bin/catchmail -f admin@local.dev"
95 changes: 95 additions & 0 deletions php/opcache.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
[opcache]
; Determines if Zend OPCache is enabled
opcache.enable=1

; Determines if Zend OPCache is enabled for the CLI version of PHP
;opcache.enable_cli=0

; The OPcache shared memory storage size.
opcache.memory_consumption=128

; The amount of memory for interned strings in Mbytes.
;opcache.interned_strings_buffer=4

; The maximum number of keys (scripts) in the OPcache hash table.
; Only numbers between 200 and 100000 are allowed.
;opcache.max_accelerated_files=2000

; The maximum percentage of "wasted" memory until a restart is scheduled.
;opcache.max_wasted_percentage=5

; When this directive is enabled, the OPcache appends the current working
; directory to the script key, thus eliminating possible collisions between
; files with the same name (basename). Disabling the directive improves
; performance, but may break existing applications.
;opcache.use_cwd=1

; When disabled, you must reset the OPcache manually or restart the
; webserver for changes to the filesystem to take effect.
;opcache.validate_timestamps=1

; How often (in seconds) to check file timestamps for changes to the shared
; memory storage allocation. ("1" means validate once per second, but only
; once per request. "0" means always validate)
;opcache.revalidate_freq=2

; Enables or disables file search in include_path optimization
;opcache.revalidate_path=0

; If disabled, all PHPDoc comments are dropped from the code to reduce the
; size of the optimized code.
;opcache.save_comments=1

; If disabled, PHPDoc comments are not loaded from SHM, so "Doc Comments"
; may be always stored (save_comments=1), but not loaded by applications
; that don't need them anyway.
;opcache.load_comments=1

; If enabled, a fast shutdown sequence is used for the accelerated code
;opcache.fast_shutdown=0

; Allow file existence override (file_exists, etc.) performance feature.
;opcache.enable_file_override=0

; A bitmask, where each bit enables or disables the appropriate OPcache
; passes
;opcache.optimization_level=0xffffffff

;opcache.inherited_hack=1
;opcache.dups_fix=0

; The location of the OPcache blacklist file (wildcards allowed).
; Each OPcache blacklist file is a text file that holds the names of files
; that should not be accelerated. The file format is to add each filename
; to a new line. The filename may be a full path or just a file prefix
; (i.e., /var/www/x blacklists all the files and directories in /var/www
; that start with 'x'). Line starting with a ; are ignored (comments).
;opcache.blacklist_filename=

; Allows exclusion of large files from being cached. By default all files
; are cached.
;opcache.max_file_size=0

; Check the cache checksum each N requests.
; The default value of "0" means that the checks are disabled.
;opcache.consistency_checks=0

; How long to wait (in seconds) for a scheduled restart to begin if the cache
; is not being accessed.
;opcache.force_restart_timeout=180

; OPcache error_log file name. Empty string assumes "stderr".
;opcache.error_log=

; All OPcache errors go to the Web server log.
; By default, only fatal errors (level 0) or errors (level 1) are logged.
; You can also enable warnings (level 2), info messages (level 3) or
; debug messages (level 4).
;opcache.log_verbosity_level=1

; Preferred Shared Memory back-end. Leave empty and let the system decide.
;opcache.preferred_memory_model=

; Protect the shared memory from unexpected writing during script execution.
; Useful for internal debugging only.
;opcache.protect_memory=0
53 changes: 53 additions & 0 deletions php/php.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
; Much of the default text has been stripped from this config file in order to
; improve readability. If you'd like to explore various configurations of PHP
; by using this file, see http://www.php.net/manual/en/ini.core.php
[PHP]

; Recommended that short tags - <? and ?> - are not used.
short_open_tag = Off

; Issue warning if you pass a value by reference at function call time.
allow_call_time_pass_reference = Off

; Maximum execution time of each script, in seconds. (Hard coded at 0 for CLI)
max_execution_time = 30

; Maximum amount of memory a script may consume.
memory_limit = 128M

; Show all errors except for notices.
error_reporting = E_ALL | E_STRICT

; Display errors to STDOUT
display_errors = On

; Log errors in addition to displaying them.
log_errors = On

; Set maximum length of log_errors.
log_errors_max_len = 1024

; Log repeated messages.
ignore_repeated_errors = Off
ignore_repeated_source = Off

; Store the last error/warning message in $php_errormsg (boolean).
track_errors = Off

; Display HTML links to docs related to the error?
html_errors = 1

; Log errors to specified file.
error_log = /srv/log/php_errors.log

; Maximum size of POST data that PHP will accept.
post_max_size = 50M

; Maximum allowed size for uploaded files.
upload_max_filesize = 50M

; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20

; Default timeout for socket based streams (seconds)
default_socket_timeout = 60
Loading

0 comments on commit 3b70920

Please sign in to comment.