Commit 58182bc6 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Merge branch 'develop' into 'master'

Merge ongoing development to "master"

See merge request !3
parents 73dc5930 bdc210d7
Loading
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -19,12 +19,9 @@ before_script:
  only: &build-only
    changes:
    - Dockerfile
    - entrypoint.sh
    - nginx.conf
    - opcache.ini
    - data/*
    - plugins/*
    - scripts/*
    - wp-config.php
    - wp.sh
  script:
  - docker build .
    --pull=true
+7 −5
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
ARG nginx_version=latest
FROM nginx:${nginx_version} as nginx
LABEL uk.org.kodo.maintainer = "Dom Sekotill <dom.sekotill@kodo.org.uk>"
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY data/nginx.conf /etc/nginx/conf.d/default.conf


FROM php:7.3-fpm-alpine as deps
@@ -20,15 +20,17 @@ ARG wp_version=latest
WORKDIR /app
ENV WORDPRESS_ROOT=/app

COPY wp.sh /usr/local/bin/wp
COPY scripts/wp.sh /usr/local/bin/wp
COPY --from=compile /usr/local/etc/php /usr/local/etc/php
COPY --from=compile /usr/local/lib/php /usr/local/lib/php
RUN --mount=type=bind,source=scripts/install-wp.sh,target=/stage \
    /stage ${wp_version}

COPY opcache.ini /usr/local/etc/php/conf.d/opcache-recommended.ini
COPY wp-config.php /usr/share/wordpress/wp-config.php
COPY entrypoint.sh /bin/entrypoint
COPY plugins/probe.php wp-content/mu-plugins/
COPY data/fpm.conf /usr/local/etc/php-fpm.d/image.conf
COPY data/opcache.ini /usr/local/etc/php/conf.d/opcache-recommended.ini
COPY data/wp-config.php /usr/share/wordpress/wp-config.php
COPY scripts/entrypoint.sh /bin/entrypoint

# PAGER is used by the wp-cli tool, the default 'less' is not installed
ENV PAGER=more

data/fpm.conf

0 → 100644
+1 −0
Original line number Diff line number Diff line
access.format = "[%{%Y-%m-%dT%H:%M:%S%z}t] %{REMOTE_ADDR}e %m %{REQUEST_URI}e %s time=%{mili}d ms;"
+7 −0
Original line number Diff line number Diff line
@@ -3,10 +3,17 @@ map $http_x_forwarded_proto $forwarded_https {
	https on;
}

log_format clear '[$time_iso8601] $remote_addr '
                 '$request_method $request_uri $status '
				 ' sent=$body_bytes_sent bytes;'
				 ' referrer=$http_referer;'
				 ' user-agent=$http_user_agent';

server {
	listen 80;
	server_name _;
	root /app/static;
	access_log /dev/stdout clear;

	# Consider all private IP addresses safe sources for X-Forwarded-For
	set_real_ip_from 10.0.0.0/8;
+0 −0

File moved.

Loading