diff --git a/docker/dev/mtt-php70-apache/Dockerfile b/docker/dev/mtt-php70-apache/Dockerfile new file mode 100644 index 0000000..eabcf3e --- /dev/null +++ b/docker/dev/mtt-php70-apache/Dockerfile @@ -0,0 +1,5 @@ + +FROM php:7.0-apache + +RUN docker-php-ext-install mysqli && \ + mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" diff --git a/docker/dev/mtt-php70-apache/compose.yml b/docker/dev/mtt-php70-apache/compose.yml new file mode 100644 index 0000000..8b454df --- /dev/null +++ b/docker/dev/mtt-php70-apache/compose.yml @@ -0,0 +1,11 @@ +services: + web: + build: ./ + image: mytinytodo-dev:php7.0-apache + container_name: mtt-dev-php70-apache + ports: + - "8080:80" + volumes: + - ../../../src:/var/www/html + - ./php-mtt.ini:/usr/local/etc/php/conf.d/php-mtt.ini + - ./php-opcache.ini:/usr/local/etc/php/conf.d/php-opcache.ini diff --git a/docker/dev/mtt-php70-apache/php-mtt.ini b/docker/dev/mtt-php70-apache/php-mtt.ini new file mode 100644 index 0000000..34d3284 --- /dev/null +++ b/docker/dev/mtt-php70-apache/php-mtt.ini @@ -0,0 +1,7 @@ + +; Since PHP 5.4 E_STRICT is included in E_ALL +error_reporting = E_ALL + +log_errors = On +display_errors = On +display_startup_errors = On diff --git a/docker/dev/mtt-php70-apache/php-opcache.ini b/docker/dev/mtt-php70-apache/php-opcache.ini new file mode 100644 index 0000000..9e1abaa --- /dev/null +++ b/docker/dev/mtt-php70-apache/php-opcache.ini @@ -0,0 +1,34 @@ +;; opcache.ini + +;; check /usr/local/etc/php/conf.d if exists docker-php-ext-opcache.ini + +; To disable opcache just comment this line +zend_extension=opcache.so + +[opcache] +opcache.enable=0 +opcache.enable_cli=0 + +; The size of the shared memory storage used by OPcache, in megabytes. The minimum permissible value is "8", which is enforced if a smaller value is set. +; Default is 128. +opcache.memory_consumption=128 + +; The maximum number of keys (and therefore scripts) in the OPcache hash table. +; The actual value used will be the first number in the set of prime numbers +; { 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793 } +; that is greater than or equal to the configured value. +; The minimum value is 200. The maximum value is 1000000. Values outside of this range are clamped to the permissible range. +; Default is 10000. +opcache.max_accelerated_files=1000 + +; How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request. +; This configuration directive is ignored if opcache.validate_timestamps is disabled. +; Default is 2. +opcache.revalidate_freq=2 + +; If enabled, OPcache will check for updated scripts every opcache.revalidate_freq seconds. +; When this directive is disabled, you must reset OPcache manually via opcache_reset(), opcache_invalidate() +; or by restarting the Web server for changes to the filesystem to take effect. +; Default is 1. +;; Override in docker-compose +opcache.validate_timestamps=1 diff --git a/docker/dev/mtt-php72-apache/Dockerfile b/docker/dev/mtt-php72-apache/Dockerfile new file mode 100644 index 0000000..839909c --- /dev/null +++ b/docker/dev/mtt-php72-apache/Dockerfile @@ -0,0 +1,5 @@ + +FROM php:7.2-apache + +RUN docker-php-ext-install mysqli && \ + mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" diff --git a/docker/dev/mtt-php72-apache/compose.yml b/docker/dev/mtt-php72-apache/compose.yml new file mode 100644 index 0000000..3291170 --- /dev/null +++ b/docker/dev/mtt-php72-apache/compose.yml @@ -0,0 +1,11 @@ +services: + web: + build: ./ + image: mytinytodo-dev:php7.2-apache + container_name: mtt-dev-php72-apache + ports: + - "8080:80" + volumes: + - ../../../src:/var/www/html + - ./php-mtt.ini:/usr/local/etc/php/conf.d/php-mtt.ini + - ./php-opcache.ini:/usr/local/etc/php/conf.d/php-opcache.ini diff --git a/docker/dev/mtt-php72-apache/php-mtt.ini b/docker/dev/mtt-php72-apache/php-mtt.ini new file mode 100644 index 0000000..34d3284 --- /dev/null +++ b/docker/dev/mtt-php72-apache/php-mtt.ini @@ -0,0 +1,7 @@ + +; Since PHP 5.4 E_STRICT is included in E_ALL +error_reporting = E_ALL + +log_errors = On +display_errors = On +display_startup_errors = On diff --git a/docker/dev/mtt-php72-apache/php-opcache.ini b/docker/dev/mtt-php72-apache/php-opcache.ini new file mode 100644 index 0000000..9e1abaa --- /dev/null +++ b/docker/dev/mtt-php72-apache/php-opcache.ini @@ -0,0 +1,34 @@ +;; opcache.ini + +;; check /usr/local/etc/php/conf.d if exists docker-php-ext-opcache.ini + +; To disable opcache just comment this line +zend_extension=opcache.so + +[opcache] +opcache.enable=0 +opcache.enable_cli=0 + +; The size of the shared memory storage used by OPcache, in megabytes. The minimum permissible value is "8", which is enforced if a smaller value is set. +; Default is 128. +opcache.memory_consumption=128 + +; The maximum number of keys (and therefore scripts) in the OPcache hash table. +; The actual value used will be the first number in the set of prime numbers +; { 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793 } +; that is greater than or equal to the configured value. +; The minimum value is 200. The maximum value is 1000000. Values outside of this range are clamped to the permissible range. +; Default is 10000. +opcache.max_accelerated_files=1000 + +; How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request. +; This configuration directive is ignored if opcache.validate_timestamps is disabled. +; Default is 2. +opcache.revalidate_freq=2 + +; If enabled, OPcache will check for updated scripts every opcache.revalidate_freq seconds. +; When this directive is disabled, you must reset OPcache manually via opcache_reset(), opcache_invalidate() +; or by restarting the Web server for changes to the filesystem to take effect. +; Default is 1. +;; Override in docker-compose +opcache.validate_timestamps=1 diff --git a/docker/dev/mtt-php74-apache/Dockerfile b/docker/dev/mtt-php74-apache/Dockerfile new file mode 100644 index 0000000..5a8ac07 --- /dev/null +++ b/docker/dev/mtt-php74-apache/Dockerfile @@ -0,0 +1,5 @@ + +FROM php:7.4-apache + +RUN docker-php-ext-install mysqli && \ + mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" diff --git a/docker/dev/mtt-php74-apache/compose.yml b/docker/dev/mtt-php74-apache/compose.yml new file mode 100644 index 0000000..e1747e6 --- /dev/null +++ b/docker/dev/mtt-php74-apache/compose.yml @@ -0,0 +1,11 @@ +services: + web: + build: ./ + image: mytinytodo-dev:php7.4-apache + container_name: mtt-dev-php74-apache + ports: + - "8080:80" + volumes: + - ../../../src:/var/www/html + - ./php-mtt.ini:/usr/local/etc/php/conf.d/php-mtt.ini + - ./php-opcache.ini:/usr/local/etc/php/conf.d/php-opcache.ini diff --git a/docker/dev/mtt-php74-apache/php-mtt.ini b/docker/dev/mtt-php74-apache/php-mtt.ini new file mode 100644 index 0000000..34d3284 --- /dev/null +++ b/docker/dev/mtt-php74-apache/php-mtt.ini @@ -0,0 +1,7 @@ + +; Since PHP 5.4 E_STRICT is included in E_ALL +error_reporting = E_ALL + +log_errors = On +display_errors = On +display_startup_errors = On diff --git a/docker/dev/mtt-php74-apache/php-opcache.ini b/docker/dev/mtt-php74-apache/php-opcache.ini new file mode 100644 index 0000000..9e1abaa --- /dev/null +++ b/docker/dev/mtt-php74-apache/php-opcache.ini @@ -0,0 +1,34 @@ +;; opcache.ini + +;; check /usr/local/etc/php/conf.d if exists docker-php-ext-opcache.ini + +; To disable opcache just comment this line +zend_extension=opcache.so + +[opcache] +opcache.enable=0 +opcache.enable_cli=0 + +; The size of the shared memory storage used by OPcache, in megabytes. The minimum permissible value is "8", which is enforced if a smaller value is set. +; Default is 128. +opcache.memory_consumption=128 + +; The maximum number of keys (and therefore scripts) in the OPcache hash table. +; The actual value used will be the first number in the set of prime numbers +; { 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793 } +; that is greater than or equal to the configured value. +; The minimum value is 200. The maximum value is 1000000. Values outside of this range are clamped to the permissible range. +; Default is 10000. +opcache.max_accelerated_files=1000 + +; How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request. +; This configuration directive is ignored if opcache.validate_timestamps is disabled. +; Default is 2. +opcache.revalidate_freq=2 + +; If enabled, OPcache will check for updated scripts every opcache.revalidate_freq seconds. +; When this directive is disabled, you must reset OPcache manually via opcache_reset(), opcache_invalidate() +; or by restarting the Web server for changes to the filesystem to take effect. +; Default is 1. +;; Override in docker-compose +opcache.validate_timestamps=1 diff --git a/docker/dev/mtt-php80-apache/Dockerfile b/docker/dev/mtt-php80-apache/Dockerfile new file mode 100644 index 0000000..75a6277 --- /dev/null +++ b/docker/dev/mtt-php80-apache/Dockerfile @@ -0,0 +1,5 @@ + +FROM php:8.0-apache + +RUN docker-php-ext-install mysqli && \ + mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" diff --git a/docker/dev/mtt-php80-apache/compose.yml b/docker/dev/mtt-php80-apache/compose.yml new file mode 100644 index 0000000..f570f3c --- /dev/null +++ b/docker/dev/mtt-php80-apache/compose.yml @@ -0,0 +1,11 @@ +services: + web: + build: ./ + image: mytinytodo-dev:php8.0-apache + container_name: mtt-dev-php80-apache + ports: + - "8080:80" + volumes: + - ../../../src:/var/www/html + - ./php-mtt.ini:/usr/local/etc/php/conf.d/php-mtt.ini + - ./php-opcache.ini:/usr/local/etc/php/conf.d/php-opcache.ini diff --git a/docker/dev/mtt-php80-apache/php-mtt.ini b/docker/dev/mtt-php80-apache/php-mtt.ini new file mode 100644 index 0000000..34d3284 --- /dev/null +++ b/docker/dev/mtt-php80-apache/php-mtt.ini @@ -0,0 +1,7 @@ + +; Since PHP 5.4 E_STRICT is included in E_ALL +error_reporting = E_ALL + +log_errors = On +display_errors = On +display_startup_errors = On diff --git a/docker/dev/mtt-php80-apache/php-opcache.ini b/docker/dev/mtt-php80-apache/php-opcache.ini new file mode 100644 index 0000000..9e1abaa --- /dev/null +++ b/docker/dev/mtt-php80-apache/php-opcache.ini @@ -0,0 +1,34 @@ +;; opcache.ini + +;; check /usr/local/etc/php/conf.d if exists docker-php-ext-opcache.ini + +; To disable opcache just comment this line +zend_extension=opcache.so + +[opcache] +opcache.enable=0 +opcache.enable_cli=0 + +; The size of the shared memory storage used by OPcache, in megabytes. The minimum permissible value is "8", which is enforced if a smaller value is set. +; Default is 128. +opcache.memory_consumption=128 + +; The maximum number of keys (and therefore scripts) in the OPcache hash table. +; The actual value used will be the first number in the set of prime numbers +; { 223, 463, 983, 1979, 3907, 7963, 16229, 32531, 65407, 130987, 262237, 524521, 1048793 } +; that is greater than or equal to the configured value. +; The minimum value is 200. The maximum value is 1000000. Values outside of this range are clamped to the permissible range. +; Default is 10000. +opcache.max_accelerated_files=1000 + +; How often to check script timestamps for updates, in seconds. 0 will result in OPcache checking for updates on every request. +; This configuration directive is ignored if opcache.validate_timestamps is disabled. +; Default is 2. +opcache.revalidate_freq=2 + +; If enabled, OPcache will check for updated scripts every opcache.revalidate_freq seconds. +; When this directive is disabled, you must reset OPcache manually via opcache_reset(), opcache_invalidate() +; or by restarting the Web server for changes to the filesystem to take effect. +; Default is 1. +;; Override in docker-compose +opcache.validate_timestamps=1 diff --git a/docker/dev/readme.md b/docker/dev/readme.md new file mode 100644 index 0000000..30229f7 --- /dev/null +++ b/docker/dev/readme.md @@ -0,0 +1,8 @@ +Docker containers for development and testing purposes. +Not recommended for production usage! + +To run docker container: + + cd mtt-php74-apache + docker-compose build --pull + docker-compose up