mirror of
https://github.com/maxpozdeev/mytinytodo.git
synced 2026-03-11 08:55:27 +00:00
add docker files for php 7.1
This commit is contained in:
parent
23ddd8cbe2
commit
029e2621df
9 changed files with 123 additions and 0 deletions
1
docker/dev/mtt-php71-apache-mariadb105/.env
Normal file
1
docker/dev/mtt-php71-apache-mariadb105/.env
Normal file
|
|
@ -0,0 +1 @@
|
|||
PLATFORM_NAME=mtt-dev-php71-apache-mariadb105
|
||||
47
docker/dev/mtt-php71-apache-mariadb105/compose.yml
Normal file
47
docker/dev/mtt-php71-apache-mariadb105/compose.yml
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
version: "3.9"
|
||||
|
||||
networks:
|
||||
network:
|
||||
name: "${PLATFORM_NAME}-network"
|
||||
|
||||
services:
|
||||
web:
|
||||
build:
|
||||
context: ../mtt-php71-apache/
|
||||
dockerfile: Dockerfile-web
|
||||
image: mytinytodo-dev:php7.1-apache
|
||||
container_name: ${PLATFORM_NAME}-web
|
||||
ports:
|
||||
- "8080:80"
|
||||
environment:
|
||||
- MTT_ENABLE_DEBUG=YES
|
||||
- MTT_DB_TYPE=mysql
|
||||
- MTT_DB_HOST=db
|
||||
- MTT_DB=mytinytodo
|
||||
- MTT_DB_USER=mtt
|
||||
- MTT_DB_PASSWORD=mtt
|
||||
- MTT_DB_PREFIX=mtt_
|
||||
- MTT_DB_DRIVER=mysqli
|
||||
volumes:
|
||||
- ../../../src:/var/www/html
|
||||
depends_on:
|
||||
- db
|
||||
networks:
|
||||
- network
|
||||
|
||||
db:
|
||||
build:
|
||||
context: ../_mariadb105
|
||||
dockerfile: Dockerfile-db
|
||||
image: mytinytodo-dev:mariadb10.5
|
||||
container_name: ${PLATFORM_NAME}-db
|
||||
#restart: always
|
||||
environment:
|
||||
MARIADB_ROOT_PASSWORD: JustForDev
|
||||
MARIADB_USER: mtt
|
||||
MARIADB_PASSWORD: mtt
|
||||
MARIADB_DATABASE: mytinytodo
|
||||
volumes:
|
||||
- ../_mariadb105/db_data:/var/lib/mysql
|
||||
networks:
|
||||
- network
|
||||
1
docker/dev/mtt-php71-apache/.env
Normal file
1
docker/dev/mtt-php71-apache/.env
Normal file
|
|
@ -0,0 +1 @@
|
|||
PLATFORM_NAME=mtt-dev-php71-apache
|
||||
11
docker/dev/mtt-php71-apache/Dockerfile-web
Normal file
11
docker/dev/mtt-php71-apache/Dockerfile-web
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
|
||||
FROM php:7.1-apache
|
||||
|
||||
RUN docker-php-ext-install mysqli && \
|
||||
mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" && \
|
||||
mkdir /var/www/phpinfo
|
||||
|
||||
COPY php-mtt.ini /usr/local/etc/php/conf.d/
|
||||
COPY php-opcache.ini /usr/local/etc/php/conf.d/
|
||||
COPY phpinfo.conf /etc/apache2/conf-enabled/
|
||||
COPY phpinfo.php /var/www/phpinfo/
|
||||
16
docker/dev/mtt-php71-apache/compose.yml
Normal file
16
docker/dev/mtt-php71-apache/compose.yml
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
version: "3.9"
|
||||
|
||||
services:
|
||||
web:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile-web
|
||||
image: mytinytodo-dev:php7.1-apache
|
||||
container_name: ${PLATFORM_NAME}-web
|
||||
ports:
|
||||
- "8080:80"
|
||||
environment:
|
||||
- MTT_ENABLE_DEBUG=YES
|
||||
- MTT_DB_TYPE=sqlite
|
||||
volumes:
|
||||
- ../../../src:/var/www/html
|
||||
7
docker/dev/mtt-php71-apache/php-mtt.ini
Normal file
7
docker/dev/mtt-php71-apache/php-mtt.ini
Normal file
|
|
@ -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
|
||||
34
docker/dev/mtt-php71-apache/php-opcache.ini
Normal file
34
docker/dev/mtt-php71-apache/php-opcache.ini
Normal file
|
|
@ -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
|
||||
3
docker/dev/mtt-php71-apache/phpinfo.conf
Normal file
3
docker/dev/mtt-php71-apache/phpinfo.conf
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
# mod_alias is required
|
||||
|
||||
Alias "/phpinfo" "/var/www/phpinfo/phpinfo.php"
|
||||
3
docker/dev/mtt-php71-apache/phpinfo.php
Normal file
3
docker/dev/mtt-php71-apache/phpinfo.php
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
|
||||
phpinfo();
|
||||
Loading…
Reference in a new issue