D7 running, D9 phpinfo ok
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
FROM nginx:latest
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y \
|
||||
vim
|
||||
|
||||
COPY ./default.conf /etc/nginx/conf.d/default.conf
|
||||
COPY ./bashrc /root/.bashrc
|
||||
COPY ./inputrc /root/.inputrc
|
||||
|
3
Docker/nginx/bashrc
Normal file
3
Docker/nginx/bashrc
Normal file
@@ -0,0 +1,3 @@
|
||||
PS1='\e[36m\e[1mNGINX\e[0m:\e[90m\w\e[0m\n$ '
|
||||
bind '"\e[A": history-search-backward'
|
||||
bind '"\e[B": history-search-forward'
|
@@ -1,7 +1,8 @@
|
||||
server {
|
||||
listen 80 default_server;
|
||||
root /var/www/html;
|
||||
listen 80;
|
||||
root /var/www/d7;
|
||||
index index.html index.php;
|
||||
server_name dev.d7.popsu.archi.fr;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
@@ -13,7 +14,7 @@ server {
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
access_log on;
|
||||
error_log /var/log/nginx/error.log error;
|
||||
error_log /var/log/nginx/error-d7.log error;
|
||||
|
||||
sendfile off;
|
||||
|
||||
@@ -21,7 +22,45 @@ server {
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass php:9000;
|
||||
fastcgi_pass php_d7:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_intercept_errors off;
|
||||
fastcgi_buffer_size 16k;
|
||||
fastcgi_buffers 4 16k;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
root /var/www/d9/web;
|
||||
index index.html index.php;
|
||||
server_name dev.d9.popsu.archi.fr;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location = /favicon.ico { access_log off; log_not_found off; }
|
||||
location = /robots.txt { access_log off; log_not_found off; }
|
||||
|
||||
access_log on;
|
||||
error_log /var/log/nginx/error-d9.log error;
|
||||
|
||||
sendfile off;
|
||||
|
||||
client_max_body_size 100m;
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass php_d9:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
2
Docker/nginx/inputrc
Normal file
2
Docker/nginx/inputrc
Normal file
@@ -0,0 +1,2 @@
|
||||
set show-all-if-ambiguous on
|
||||
set completion-ignore-case on
|
@@ -23,3 +23,24 @@ RUN apt-get update && apt-get install -y \
|
||||
composer global require drush/drush:6.5.0 && \
|
||||
composer global install && \
|
||||
ln -s /usr/local/composer/vendor/drush/drush/drush /usr/local/bin/drush
|
||||
|
||||
ARG USER_UID
|
||||
ARG USER_UNAME
|
||||
ARG USER_GID
|
||||
ARG USER_GNAME
|
||||
|
||||
RUN if getent group ${USER_GNAME} ; then groupdel ${USER_GNAME}; fi &&\
|
||||
groupadd -g ${USER_GID} ${USER_GNAME} &&\
|
||||
useradd -l -u ${USER_UID} -g ${USER_GNAME} ${USER_UNAME} &&\
|
||||
install -d -m 0755 -o ${USER_UNAME} -g ${USER_GNAME} /home/${USER_UNAME} &&\
|
||||
chown --changes --silent --no-dereference --recursive \
|
||||
--from=33:33 ${USER_UID}:${USER_GID} \
|
||||
/home/${USER_UNAME}
|
||||
# /.composer \
|
||||
# /var/run/php-fpm \
|
||||
# /var/lib/php/sessions \
|
||||
|
||||
COPY ./bashrc /home/${USER_UNAME}/.bashrc
|
||||
COPY ./inputrc /home/${USER_UNAME}/.inputrc
|
||||
|
||||
USER ${USER_UNAME}
|
4
Docker/php-5.6-fpm/bashrc
Normal file
4
Docker/php-5.6-fpm/bashrc
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
PS1='\e[36m\e[1mPHP-5.6\e[0m:\e[90m\w\e[0m\n$ '
|
||||
bind '"\e[A": history-search-backward'
|
||||
bind '"\e[B": history-search-forward'
|
2
Docker/php-5.6-fpm/inputrc
Normal file
2
Docker/php-5.6-fpm/inputrc
Normal file
@@ -0,0 +1,2 @@
|
||||
set show-all-if-ambiguous on
|
||||
set completion-ignore-case on
|
70
Docker/php-7.3-fpm/Dockerfile
Normal file
70
Docker/php-7.3-fpm/Dockerfile
Normal file
@@ -0,0 +1,70 @@
|
||||
FROM php:7.3-fpm
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libmcrypt-dev \
|
||||
libpng-dev \
|
||||
mariadb-client \
|
||||
zip \
|
||||
libzip-dev && \
|
||||
# docker-php-ext-install -j$(nproc) iconv && \
|
||||
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
|
||||
apt-get install -y imagemagick libmagickwand-dev && \
|
||||
pecl install imagick && docker-php-ext-enable imagick && \
|
||||
docker-php-ext-install -j$(nproc) gd && \
|
||||
docker-php-ext-install pdo_mysql zip && \
|
||||
docker-php-ext-install opcache && \
|
||||
docker-php-ext-install bcmath && \
|
||||
apt-get install -y git vim && \
|
||||
pecl install redis-4.3.0 && \
|
||||
pecl install xdebug-2.7.0 && \
|
||||
docker-php-ext-enable redis xdebug
|
||||
|
||||
RUN export COMPOSER_HOME=/usr/local/composer && \
|
||||
curl -sS https://getcomposer.org/installer \
|
||||
| php -- --install-dir=/usr/local/bin --filename=composer && \
|
||||
curl https://drupalconsole.com/installer \
|
||||
-L -o /usr/local/bin/drupal && \
|
||||
chmod +x /usr/local/bin/drupal && \
|
||||
curl https://github.com/drush-ops/drush-launcher/releases/download/0.6.0/drush.phar \
|
||||
-L -o /usr/local/bin/drush && \
|
||||
chmod +x /usr/local/bin/drush
|
||||
|
||||
RUN apt-get install -y curl && \
|
||||
curl -sL https://deb.nodesource.com/setup_11.x | bash - && \
|
||||
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
||||
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
|
||||
apt-get update && \
|
||||
apt-get install -y nodejs yarn
|
||||
|
||||
RUN apt-get install -y rsyslog
|
||||
COPY ./rsyslog-drupal.conf /etc/rsyslog.d/drupal.conf
|
||||
# ENTRYPOINT ["sh", "-c", "service rsyslog start ; tail -f /dev/null"]
|
||||
|
||||
COPY ./php-custom.ini /usr/local/etc/php/conf.d/php-custom.ini
|
||||
# COPY ./php-fpm-custom.conf /usr/local/etc/php-fpm.d/php-fpm-custom.conf
|
||||
|
||||
# COPY ./bashrc /root/.bashrc
|
||||
# COPY ./inputrc /root/.inputrc
|
||||
|
||||
ARG USER_UID
|
||||
ARG USER_UNAME
|
||||
ARG USER_GID
|
||||
ARG USER_GNAME
|
||||
|
||||
RUN if getent group ${USER_GNAME} ; then groupdel ${USER_GNAME}; fi &&\
|
||||
groupadd -g ${USER_GID} ${USER_GNAME} &&\
|
||||
useradd -l -u ${USER_UID} -g ${USER_GNAME} ${USER_UNAME} &&\
|
||||
install -d -m 0755 -o ${USER_UNAME} -g ${USER_GNAME} /home/${USER_UNAME} &&\
|
||||
chown --changes --silent --no-dereference --recursive \
|
||||
--from=33:33 ${USER_UID}:${USER_GID} \
|
||||
/home/${USER_UNAME}
|
||||
# /.composer \
|
||||
# /var/run/php-fpm \
|
||||
# /var/lib/php/sessions \
|
||||
|
||||
COPY ./bashrc /home/${USER_UNAME}/.bashrc
|
||||
COPY ./inputrc /home/${USER_UNAME}/.inputrc
|
||||
|
||||
USER ${USER_UNAME}
|
4
Docker/php-7.3-fpm/bashrc
Normal file
4
Docker/php-7.3-fpm/bashrc
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
PS1='\e[36m\e[1mPHP-7.3\e[0m:\e[90m\w\e[0m\n$ '
|
||||
bind '"\e[A": history-search-backward'
|
||||
bind '"\e[B": history-search-forward'
|
2
Docker/php-7.3-fpm/inputrc
Normal file
2
Docker/php-7.3-fpm/inputrc
Normal file
@@ -0,0 +1,2 @@
|
||||
set show-all-if-ambiguous on
|
||||
set completion-ignore-case on
|
9
Docker/php-7.3-fpm/php-custom.ini
Normal file
9
Docker/php-7.3-fpm/php-custom.ini
Normal file
@@ -0,0 +1,9 @@
|
||||
memory_limit = 8192M
|
||||
upload_max_filesize = 50M
|
||||
post_max_size = 50M
|
||||
max_execution_time = 150
|
||||
|
||||
; Log level
|
||||
; Possible Values: alert, error, warning, notice, debug
|
||||
; Default Value: notice
|
||||
log_level = debug
|
1
Docker/php-7.3-fpm/php-fpm-custom.conf
Normal file
1
Docker/php-7.3-fpm/php-fpm-custom.conf
Normal file
@@ -0,0 +1 @@
|
||||
request_terminate_timeout = 150
|
1
Docker/php-7.3-fpm/rsyslog-drupal.conf
Normal file
1
Docker/php-7.3-fpm/rsyslog-drupal.conf
Normal file
@@ -0,0 +1 @@
|
||||
local6.* /var/log/drupal.log
|
17
Docker/php-7.3-fpm/rsyslog.service
Normal file
17
Docker/php-7.3-fpm/rsyslog.service
Normal file
@@ -0,0 +1,17 @@
|
||||
[Unit]
|
||||
Description=rsyslog
|
||||
After=docker.service
|
||||
Requires=docker.service
|
||||
|
||||
[Service]
|
||||
ExecStartPre=-/usr/bin/docker rm %n
|
||||
ExecStart=/usr/bin/docker run --rm \
|
||||
--name %n \
|
||||
-h %H \
|
||||
jumanjiman/rsyslog
|
||||
ExecStop=/usr/bin/docker stop %n
|
||||
RestartSec=5s
|
||||
Restart=always
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user