Remove Docker image stuff
Ref #15 See autonomic-cooperative/wordpress-docker-composer
This commit is contained in:
parent
5f6f8d65e6
commit
73d38d46ba
13
.drone.yml
13
.drone.yml
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
name: publish docker image
|
|
||||||
steps:
|
|
||||||
- name: build and publish
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
username:
|
|
||||||
from_secret: docker_reg_username_coopcloud
|
|
||||||
password:
|
|
||||||
from_secret: docker_reg_passwd_coopcloud
|
|
||||||
repo: thecoopcloud/wordpress
|
|
||||||
tag: 5.8.2-php7.4-fpm-bedrock
|
|
13
Dockerfile
13
Dockerfile
@ -1,13 +0,0 @@
|
|||||||
FROM wordpress:5.8.2-php7.4-fpm
|
|
||||||
# TODO: use renovate-bot to send pull requests on upstream image updates
|
|
||||||
|
|
||||||
COPY --from=composer:2.1 /usr/bin/composer /usr/bin/composer
|
|
||||||
# TODO: use renovate-bot to send pull requests on upstream image updates
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
|
||||||
git \
|
|
||||||
unzip && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Upstream Wordpress entrypoint, adapted for Composer use
|
|
||||||
COPY docker-entrypoint.sh /usr/local/bin/
|
|
@ -1,102 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -Eeuo pipefail
|
|
||||||
|
|
||||||
if [[ "$1" == apache2* ]] || [ "$1" = 'php-fpm' ]; then
|
|
||||||
uid="$(id -u)"
|
|
||||||
gid="$(id -g)"
|
|
||||||
if [ "$uid" = '0' ]; then
|
|
||||||
case "$1" in
|
|
||||||
apache2*)
|
|
||||||
user="${APACHE_RUN_USER:-www-data}"
|
|
||||||
group="${APACHE_RUN_GROUP:-www-data}"
|
|
||||||
|
|
||||||
# strip off any '#' symbol ('#1000' is valid syntax for Apache)
|
|
||||||
pound='#'
|
|
||||||
user="${user#$pound}"
|
|
||||||
group="${group#$pound}"
|
|
||||||
;;
|
|
||||||
*) # php-fpm
|
|
||||||
user='www-data'
|
|
||||||
group='www-data'
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
else
|
|
||||||
user="$uid"
|
|
||||||
group="$gid"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if [ ! -e index.php ] && [ ! -e wp-includes/version.php ]; then
|
|
||||||
# # if the directory exists and WordPress doesn't appear to be installed AND the permissions of it are root:root, let's chown it (likely a Docker-created directory)
|
|
||||||
# if [ "$uid" = '0' ] && [ "$(stat -c '%u:%g' .)" = '0:0' ]; then
|
|
||||||
# chown "$user:$group" .
|
|
||||||
# fi
|
|
||||||
#
|
|
||||||
# echo >&2 "WordPress not found in $PWD - copying now..."
|
|
||||||
# if [ -n "$(find -mindepth 1 -maxdepth 1 -not -name wp-content)" ]; then
|
|
||||||
# echo >&2 "WARNING: $PWD is not empty! (copying anyhow)"
|
|
||||||
# fi
|
|
||||||
# sourceTarArgs=(
|
|
||||||
# --create
|
|
||||||
# --file -
|
|
||||||
# --directory /usr/src/wordpress
|
|
||||||
# --owner "$user" --group "$group"
|
|
||||||
# )
|
|
||||||
# targetTarArgs=(
|
|
||||||
# --extract
|
|
||||||
# --file -
|
|
||||||
# )
|
|
||||||
# if [ "$uid" != '0' ]; then
|
|
||||||
# # avoid "tar: .: Cannot utime: Operation not permitted" and "tar: .: Cannot change mode to rwxr-xr-x: Operation not permitted"
|
|
||||||
# targetTarArgs+=( --no-overwrite-dir )
|
|
||||||
# fi
|
|
||||||
# # loop over "pluggable" content in the source, and if it already exists in the destination, skip it
|
|
||||||
# # https://github.com/docker-library/wordpress/issues/506 ("wp-content" persisted, "akismet" updated, WordPress container restarted/recreated, "akismet" downgraded)
|
|
||||||
# for contentPath in \
|
|
||||||
# /usr/src/wordpress/.htaccess \
|
|
||||||
# /usr/src/wordpress/wp-content/*/*/ \
|
|
||||||
# ; do
|
|
||||||
# contentPath="${contentPath%/}"
|
|
||||||
# [ -e "$contentPath" ] || continue
|
|
||||||
# contentPath="${contentPath#/usr/src/wordpress/}" # "wp-content/plugins/akismet", etc.
|
|
||||||
# if [ -e "$PWD/$contentPath" ]; then
|
|
||||||
# echo >&2 "WARNING: '$PWD/$contentPath' exists! (not copying the WordPress version)"
|
|
||||||
# sourceTarArgs+=( --exclude "./$contentPath" )
|
|
||||||
# fi
|
|
||||||
# done
|
|
||||||
# tar "${sourceTarArgs[@]}" . | tar "${targetTarArgs[@]}"
|
|
||||||
# echo >&2 "Complete! WordPress has been successfully copied to $PWD"
|
|
||||||
# fi
|
|
||||||
#
|
|
||||||
# wpEnvs=( "${!WORDPRESS_@}" )
|
|
||||||
# if [ ! -s wp-config.php ] && [ "${#wpEnvs[@]}" -gt 0 ]; then
|
|
||||||
# for wpConfigDocker in \
|
|
||||||
# wp-config-docker.php \
|
|
||||||
# /usr/src/wordpress/wp-config-docker.php \
|
|
||||||
# ; do
|
|
||||||
# if [ -s "$wpConfigDocker" ]; then
|
|
||||||
# echo >&2 "No 'wp-config.php' found in $PWD, but 'WORDPRESS_...' variables supplied; copying '$wpConfigDocker' (${wpEnvs[*]})"
|
|
||||||
# # using "awk" to replace all instances of "put your unique phrase here" with a properly unique string (for AUTH_KEY and friends to have safe defaults if they aren't specified with environment variables)
|
|
||||||
# awk '
|
|
||||||
# /put your unique phrase here/ {
|
|
||||||
# cmd = "head -c1m /dev/urandom | sha1sum | cut -d\\ -f1"
|
|
||||||
# cmd | getline str
|
|
||||||
# close(cmd)
|
|
||||||
# gsub("put your unique phrase here", str)
|
|
||||||
# }
|
|
||||||
# { print }
|
|
||||||
# ' "$wpConfigDocker" > wp-config.php
|
|
||||||
# if [ "$uid" = '0' ]; then
|
|
||||||
# # attempt to ensure that wp-config.php is owned by the run user
|
|
||||||
# # could be on a filesystem that doesn't allow chown (like some NFS setups)
|
|
||||||
# chown "$user:$group" wp-config.php || true
|
|
||||||
# fi
|
|
||||||
# break
|
|
||||||
# fi
|
|
||||||
# done
|
|
||||||
# fi
|
|
||||||
if [ -f composer.json ]; then
|
|
||||||
composer install
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "$@"
|
|
48
nginx.conf
48
nginx.conf
@ -1,48 +0,0 @@
|
|||||||
server {
|
|
||||||
listen 80 default_server;
|
|
||||||
listen [::]:80 default_server;
|
|
||||||
|
|
||||||
server_name _;
|
|
||||||
|
|
||||||
client_max_body_size 128M;
|
|
||||||
|
|
||||||
gzip on;
|
|
||||||
gzip_proxied any;
|
|
||||||
gzip_types text/plain text/xml text/css application/x-javascript;
|
|
||||||
gzip_vary on;
|
|
||||||
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
|
|
||||||
|
|
||||||
sendfile on;
|
|
||||||
sendfile_max_chunk 512k;
|
|
||||||
|
|
||||||
root /app/web;
|
|
||||||
|
|
||||||
access_log off;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
include /etc/nginx/mime.types;
|
|
||||||
|
|
||||||
root /app/web;
|
|
||||||
index index.html index.htm index.php;
|
|
||||||
|
|
||||||
try_files $uri $uri/ /index.php?q=$uri&$args;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~ .php$ {
|
|
||||||
include fastcgi.conf;
|
|
||||||
|
|
||||||
fastcgi_read_timeout 300;
|
|
||||||
fastcgi_pass php:9000;
|
|
||||||
|
|
||||||
fastcgi_index index.php;
|
|
||||||
fastcgi_param SCRIPT_FILENAME /app/web/$fastcgi_script_name;
|
|
||||||
fastcgi_param PATH_INFO $fastcgi_script_name;
|
|
||||||
|
|
||||||
fastcgi_param PHP_VALUE "error_log=/var/log/nginx/application_php_errors.log";
|
|
||||||
fastcgi_buffers 16 16k;
|
|
||||||
fastcgi_buffer_size 32k;
|
|
||||||
|
|
||||||
include fastcgi_params;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Reference in New Issue
Block a user