Utilise les images officielles mariadb, php et nginx
This commit is contained in:
31
devphp7/config/nginx.conf
Normal file
31
devphp7/config/nginx.conf
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
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 /srv/html/gevaulug.fr;
|
||||||
|
fastcgi_pass php:9000;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
|
||||||
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
1872
devphp7/config/php.ini
Normal file
1872
devphp7/config/php.ini
Normal file
File diff suppressed because it is too large
Load Diff
10
devphp7/config/xdebug.ini
Normal file
10
devphp7/config/xdebug.ini
Normal file
@@ -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:
|
mariadb:
|
||||||
image: daiko/php:7.0
|
image: mariadb:latest
|
||||||
ports:
|
|
||||||
- "80:80"
|
|
||||||
volumes:
|
volumes:
|
||||||
- ~/Public:/var/www
|
- ~/.mysql:/var/lib/mysql
|
||||||
|
- ~/log/mysql:/var/log/mysql
|
||||||
|
expose:
|
||||||
|
- 3306
|
||||||
|
environment:
|
||||||
|
- MYSQL_ROOT_PASSWORD=MyPassWord48
|
||||||
|
|
||||||
|
php:
|
||||||
|
build: ./php-fpm
|
||||||
|
expose:
|
||||||
|
- 9000
|
||||||
|
ports:
|
||||||
|
- 9042:9042
|
||||||
|
volumes:
|
||||||
|
- ~/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:
|
links:
|
||||||
- mariadb
|
- mariadb
|
||||||
|
|
||||||
mariadb:
|
nginx:
|
||||||
image: daiko/mariadb
|
image: nginx:latest
|
||||||
ports:
|
|
||||||
- "3306:3306"
|
|
||||||
volumes:
|
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
|
||||||
|
24
devphp7/php-fpm/Dockerfile
Normal file
24
devphp7/php-fpm/Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
FROM php:7-fpm
|
||||||
|
|
||||||
|
RUN cd /tmp/ && \
|
||||||
|
curl -O http://pecl.php.net/get/xdebug-2.4.0.tgz && \
|
||||||
|
tar zxvf xdebug-2.4.0.tgz && \
|
||||||
|
mv xdebug-2.4.0 /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 \
|
||||||
|
&& make clean \
|
||||||
|
&& apt-get clean \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
|
||||||
|
RUN docker-php-ext-install xdebug
|
8
devphp7/smtp/Dockerfile
Normal file
8
devphp7/smtp/Dockerfile
Normal file
@@ -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"]
|
Reference in New Issue
Block a user