Skip to content

Commit 3b70920

Browse files
committed
*Initial commit
1 parent 0cfb44e commit 3b70920

File tree

8 files changed

+518
-0
lines changed

8 files changed

+518
-0
lines changed

Dockerfile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
FROM wordpress
2+
3+
RUN apt-get update && apt-get install -y git wget subversion cvs bzr
4+
5+
RUN wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -O /usr/local/bin/wp
6+
7+
RUN pecl install xdebug
8+
9+
RUN sed -i "s/WP_DEBUG', false/WP_DEBUG', true/" /usr/src/wordpress/wp-config-sample.php
10+
11+
RUN docker-php-ext-install opcache
12+
13+
COPY php/php.ini /usr/local/etc/php/php.ini
14+
15+
COPY php/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini
16+
17+
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
18+
19+
COPY php/opcache.ini /usr/local/etc/php/conf.d/opcache.ini
20+
21+
COPY php/mailcatcher.ini /usr/local/etc/php/conf.d/mailcatcher.ini

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
### What WPStack includes ###
2+
3+
* Latest wordpress on mod_php
4+
* PHP 5.6 with xdebug and opcache
5+
* MariaDB
6+
* phpMyAdmin
7+
* Git
8+
* Subversion
9+
* CVS
10+
* Bazaar
11+
12+
### Default Ports ###
13+
14+
* WEB: 8080
15+
* PhpMyAdmin: 8081
16+
17+
### Default Database Root Password ###
18+
19+
`wpstack`
20+
21+
### How to Build From Source ###
22+
23+
`docker-compose -f docker-compose-build.yml`
24+
25+
### How to Build From Image ###
26+
27+
`docker-compose`

docker-compose-build.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
wordpress:
2+
build: .
3+
environment:
4+
WORDPRESS_DB_PASSWORD: password
5+
MYSQL_PORT_3306_TCP: 1
6+
links:
7+
- db:mysql
8+
ports:
9+
- 8080:80
10+
- 9000:9000
11+
volumes:
12+
- web/:/var/www/html
13+
db:
14+
image: mariadb
15+
environment:
16+
MYSQL_ROOT_PASSWORD: password
17+
expose:
18+
- 3306
19+
phpmyadmin:
20+
image: nazarpc/phpmyadmin
21+
links:
22+
- db:mysql
23+
expose:
24+
- 8081:80

docker-compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
wordpress:
2+
build: pcfreak30/wpstack
3+
image:
4+
extends:
5+
file: docker-compose.yml
6+
service: wordpress
7+
db:
8+
extends:
9+
file: docker-compose.yml
10+
service: db
11+
phpmyadmin:
12+
extends:
13+
file: docker-compose.yml
14+
service: phpmyadmin

php/mailcatcher.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sendmail_path = "/usr/local/rvm/bin/catchmail -f admin@local.dev"

php/opcache.ini

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
[opcache]
2+
; Determines if Zend OPCache is enabled
3+
opcache.enable=1
4+
5+
; Determines if Zend OPCache is enabled for the CLI version of PHP
6+
;opcache.enable_cli=0
7+
8+
; The OPcache shared memory storage size.
9+
opcache.memory_consumption=128
10+
11+
; The amount of memory for interned strings in Mbytes.
12+
;opcache.interned_strings_buffer=4
13+
14+
; The maximum number of keys (scripts) in the OPcache hash table.
15+
; Only numbers between 200 and 100000 are allowed.
16+
;opcache.max_accelerated_files=2000
17+
18+
; The maximum percentage of "wasted" memory until a restart is scheduled.
19+
;opcache.max_wasted_percentage=5
20+
21+
; When this directive is enabled, the OPcache appends the current working
22+
; directory to the script key, thus eliminating possible collisions between
23+
; files with the same name (basename). Disabling the directive improves
24+
; performance, but may break existing applications.
25+
;opcache.use_cwd=1
26+
27+
; When disabled, you must reset the OPcache manually or restart the
28+
; webserver for changes to the filesystem to take effect.
29+
;opcache.validate_timestamps=1
30+
31+
; How often (in seconds) to check file timestamps for changes to the shared
32+
; memory storage allocation. ("1" means validate once per second, but only
33+
; once per request. "0" means always validate)
34+
;opcache.revalidate_freq=2
35+
36+
; Enables or disables file search in include_path optimization
37+
;opcache.revalidate_path=0
38+
39+
; If disabled, all PHPDoc comments are dropped from the code to reduce the
40+
; size of the optimized code.
41+
;opcache.save_comments=1
42+
43+
; If disabled, PHPDoc comments are not loaded from SHM, so "Doc Comments"
44+
; may be always stored (save_comments=1), but not loaded by applications
45+
; that don't need them anyway.
46+
;opcache.load_comments=1
47+
48+
; If enabled, a fast shutdown sequence is used for the accelerated code
49+
;opcache.fast_shutdown=0
50+
51+
; Allow file existence override (file_exists, etc.) performance feature.
52+
;opcache.enable_file_override=0
53+
54+
; A bitmask, where each bit enables or disables the appropriate OPcache
55+
; passes
56+
;opcache.optimization_level=0xffffffff
57+
58+
;opcache.inherited_hack=1
59+
;opcache.dups_fix=0
60+
61+
; The location of the OPcache blacklist file (wildcards allowed).
62+
; Each OPcache blacklist file is a text file that holds the names of files
63+
; that should not be accelerated. The file format is to add each filename
64+
; to a new line. The filename may be a full path or just a file prefix
65+
; (i.e., /var/www/x blacklists all the files and directories in /var/www
66+
; that start with 'x'). Line starting with a ; are ignored (comments).
67+
;opcache.blacklist_filename=
68+
69+
; Allows exclusion of large files from being cached. By default all files
70+
; are cached.
71+
;opcache.max_file_size=0
72+
73+
; Check the cache checksum each N requests.
74+
; The default value of "0" means that the checks are disabled.
75+
;opcache.consistency_checks=0
76+
77+
; How long to wait (in seconds) for a scheduled restart to begin if the cache
78+
; is not being accessed.
79+
;opcache.force_restart_timeout=180
80+
81+
; OPcache error_log file name. Empty string assumes "stderr".
82+
;opcache.error_log=
83+
84+
; All OPcache errors go to the Web server log.
85+
; By default, only fatal errors (level 0) or errors (level 1) are logged.
86+
; You can also enable warnings (level 2), info messages (level 3) or
87+
; debug messages (level 4).
88+
;opcache.log_verbosity_level=1
89+
90+
; Preferred Shared Memory back-end. Leave empty and let the system decide.
91+
;opcache.preferred_memory_model=
92+
93+
; Protect the shared memory from unexpected writing during script execution.
94+
; Useful for internal debugging only.
95+
;opcache.protect_memory=0

php/php.ini

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
; Much of the default text has been stripped from this config file in order to
2+
; improve readability. If you'd like to explore various configurations of PHP
3+
; by using this file, see http://www.php.net/manual/en/ini.core.php
4+
[PHP]
5+
6+
; Recommended that short tags - <? and ?> - are not used.
7+
short_open_tag = Off
8+
9+
; Issue warning if you pass a value by reference at function call time.
10+
allow_call_time_pass_reference = Off
11+
12+
; Maximum execution time of each script, in seconds. (Hard coded at 0 for CLI)
13+
max_execution_time = 30
14+
15+
; Maximum amount of memory a script may consume.
16+
memory_limit = 128M
17+
18+
; Show all errors except for notices.
19+
error_reporting = E_ALL | E_STRICT
20+
21+
; Display errors to STDOUT
22+
display_errors = On
23+
24+
; Log errors in addition to displaying them.
25+
log_errors = On
26+
27+
; Set maximum length of log_errors.
28+
log_errors_max_len = 1024
29+
30+
; Log repeated messages.
31+
ignore_repeated_errors = Off
32+
ignore_repeated_source = Off
33+
34+
; Store the last error/warning message in $php_errormsg (boolean).
35+
track_errors = Off
36+
37+
; Display HTML links to docs related to the error?
38+
html_errors = 1
39+
40+
; Log errors to specified file.
41+
error_log = /srv/log/php_errors.log
42+
43+
; Maximum size of POST data that PHP will accept.
44+
post_max_size = 50M
45+
46+
; Maximum allowed size for uploaded files.
47+
upload_max_filesize = 50M
48+
49+
; Maximum number of files that can be uploaded via a single request
50+
max_file_uploads = 20
51+
52+
; Default timeout for socket based streams (seconds)
53+
default_socket_timeout = 60

0 commit comments

Comments
 (0)