Utilise php-fpm

php5
Florestan Bredow 7 years ago
parent 5701ed6f97
commit 9e857a9006

@ -0,0 +1,32 @@
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
server {
listen 80;
location / {
root /var/www/html;
autoindex on;
index index.php index.html index.htm;
}
# Pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
root /var/www/html;
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
fastcgi_read_timeout 180;
include fastcgi_params;
}
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,10 @@
[xdebug]
zend_extension = xdebug.so
xdebug.remote_enable=1
xdebug.remote_port=9042
xdebug.remote_host=172.17.0.1
xdebug.remote_connect_back=1 # Not safe for production servers
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_autostart=true
xdebug.remote_log="/var/log/xdebug/xdebug.log"

@ -1,15 +1,47 @@
devphp:
image: daiko/php
mariadb:
image: mariadb:latest
volumes:
- ~/.mysql:/var/lib/mysql
- ~/log/mysql:/var/log/mysql
expose:
- 3306
environment:
- MYSQL_ROOT_PASSWORD=MyPassWord48
php:
build: ./php-fpm
expose:
- 9000
ports:
- "80:80"
- 9042:9042
volumes:
- ~/Public:/var/www
- ~/Public:/var/www/html
- ~/log/php:/var/log/
- ./config/php.ini:/usr/local/etc/php/php.ini
- ./config/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
links:
- mariadb
mariadb:
image: daiko/mariadb
ports:
- "3306:3306"
nginx:
image: nginx:latest
volumes:
- ~/.mysql:/var/lib/mysql
- ~/log/nginx:/var/log/nginx
- ./config/nginx.conf:/etc/nginx/nginx.conf
- ~/Public:/var/www/html
ports:
- 80:80
environment:
- NGINX_HOST=localhost
- NGINX_PORT=80
links:
- php
# smtp:
# build: ./smtp
# volumes:
# - ./config/smtpd.conf:/etc/smtpd.conf
# - ./config/mailname:/etc/mailname
# expose:
# - 25

@ -0,0 +1,25 @@
FROM php:5.6-fpm
RUN cd /tmp/ && \
curl -O https://xdebug.org/files/xdebug-2.4.1.tgz && \
tar zxf xdebug-2.4.1.tgz && \
mkdir -p /usr/src/php/ext/xdebug && \
mv xdebug-2.4.1/* /usr/src/php/ext/xdebug/
RUN apt-get update && apt-get install -y \
ssmtp \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
&& docker-php-ext-install -j$(nproc) iconv mcrypt gd zip \
&& docker-php-ext-install -j$(nproc) mysqli pdo pdo_mysql \
&& docker-php-ext-install -j$(nproc) xdebug\
&& apt-get purge -y --auto-remove $buildDeps \
&& cd /usr/src/php/ext/xdebug/ \
&& make clean \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install xdebug

@ -0,0 +1,8 @@
FROM debian:jessie
RUN echo "deb http://debian.mirrors.ovh.net/debian/ jessie-backports main" >> /etc/apt/sources.list \
&& apt-get update && apt-get install -y \
opensmtpd/jessie-backports \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["/usr/sbin/smtpd", "-d"]
Loading…
Cancel
Save