add dev-docker for php 8.2 + angie

This commit is contained in:
maxpozdeev 2023-03-27 15:45:53 +03:00
parent 74e59f1ccf
commit 755d766262
4 changed files with 68 additions and 1 deletions

View file

@ -0,0 +1,23 @@
FROM alpine:latest
RUN set -x \
&& apk add --no-cache ca-certificates curl \
&& curl -o /etc/apk/keys/angie-signing.rsa https://angie.software/keys/angie-signing.rsa \
&& echo "https://download.angie.software/angie/alpine/v$(egrep -o '[0-9]+\.[0-9]+' /etc/alpine-release)/main" >> /etc/apk/repositories \
&& apk add --no-cache angie \
&& rm /etc/apk/keys/angie-signing.rsa \
&& ln -sf /dev/stdout /var/log/angie/access.log \
&& ln -sf /dev/stderr /var/log/angie/error.log
EXPOSE 80
CMD ["angie", "-g", "daemon off;"]
RUN mv /etc/angie/http.d/default.conf /etc/angie/http.d/default.conf.bak \
&& mkdir /var/log/nginx \
&& ln -sf /var/log/angie/access.log /var/log/nginx/access.log
# config from nginx
COPY default.conf /etc/angie/http.d/default.conf
VOLUME /var/www/html

View file

@ -0,0 +1 @@
PLATFORM_NAME=mtt-dev-php82-angie-alpine

View file

@ -0,0 +1,40 @@
version: "3.9"
networks:
network:
name: "${PLATFORM_NAME}-network"
services:
web:
build:
context: ../_nginx
dockerfile: Dockerfile-angie-alpine
image: mtt-dev/angie:alpine
container_name: ${PLATFORM_NAME}-web
ports:
- "8080:80"
volumes:
- ../../../src:/var/www/html
depends_on:
- fpm
networks:
- network
fpm:
build:
context: ../mtt-php82-nginx
dockerfile: Dockerfile-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
- ../../../tests:/var/www/tests
- ../mtt-php82-nginx/php-mtt.ini:/usr/local/etc/php/conf.d/php-mtt.ini
- ../mtt-php82-nginx/php-opcache.ini:/usr/local/etc/php/conf.d/php-opcache.ini
networks:
- network

View file

@ -3,7 +3,10 @@ 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
echo "<?php phpinfo();" > /var/www/phpinfo/phpinfo.php && \
curl -o /usr/local/bin/phpunit -fL "https://phar.phpunit.de/phpunit-10.phar" && \
chmod +x /usr/local/bin/phpunit && \
ln -s html /var/www/src
#COPY php-mtt.ini /usr/local/etc/php/conf.d/
#COPY php-opcache.ini /usr/local/etc/php/conf.d/