Skip to content

Commit

Permalink
add dev-docker for php-fpm 8.2 + nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpozdeev committed Mar 24, 2023
1 parent 176b1e9 commit 74e59f1
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 15 deletions.
5 changes: 5 additions & 0 deletions docker/dev/_nginx/Dockerfile-nginx-alpine
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM nginx:alpine

COPY default.conf /etc/nginx/conf.d/

VOLUME /var/www/html
1 change: 0 additions & 1 deletion docker/dev/mtt-php81-nginx/.env

This file was deleted.

11 changes: 0 additions & 11 deletions docker/dev/mtt-php81-nginx/Dockerfile-fpm

This file was deleted.

1 change: 1 addition & 0 deletions docker/dev/mtt-php82-nginx/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PLATFORM_NAME=mtt-dev-php82-nginx-alpine
12 changes: 12 additions & 0 deletions docker/dev/mtt-php82-nginx/Dockerfile-fpm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM php:8.2-fpm-alpine

RUN docker-php-ext-install pdo_mysql && \
mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" && \
mkdir /var/www/phpinfo && \
echo "<?php phpinfo();" > /var/www/phpinfo/phpinfo.php

#COPY php-mtt.ini /usr/local/etc/php/conf.d/
#COPY php-opcache.ini /usr/local/etc/php/conf.d/
COPY php-fpm-www.conf /usr/local/etc/php-fpm.d/www.conf

VOLUME /var/www/html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ services:
web:
build:
context: ../_nginx
dockerfile: Dockerfile-nginx
image: mtt-dev/nginx
dockerfile: Dockerfile-nginx-alpine
image: mtt-dev/nginx:alpine
container_name: ${PLATFORM_NAME}-web
ports:
- "8080:80"
Expand All @@ -24,12 +24,13 @@ services:
build:
context: .
dockerfile: Dockerfile-fpm
image: mtt-dev/php:8.1-fpm
image: mtt-dev/php:8.2-fpm-alpine
container_name: ${PLATFORM_NAME}-fpm
hostname: php-fpm
environment:
- MTT_ENABLE_DEBUG=YES
- MTT_DB_TYPE=sqlite
- MTT_API_USE_PATH_INFO=YES
volumes:
- ../../../src:/var/www/html
- ./php-mtt.ini:/usr/local/etc/php/conf.d/php-mtt.ini
Expand Down
12 changes: 12 additions & 0 deletions docker/dev/mtt-php82-nginx/php-fpm-www.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[www]
user = www-data
group = www-data
listen = 127.0.0.1:9000
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
pm.max_requests = 500

access.format = "%R - %u [%t] \"%m %r\" %s %f"
File renamed without changes.
File renamed without changes.

0 comments on commit 74e59f1

Please sign in to comment.