env can modify size and time of uploads
This commit is contained in:
@@ -1,60 +1,43 @@
|
||||
# debian -----------------------------------------------------
|
||||
|
||||
# FROM debian:buster
|
||||
#
|
||||
# # bash and vim for debug
|
||||
# RUN apt update && apt install -y \
|
||||
# php7.3 \
|
||||
# php7.3-fpm \
|
||||
# php7.3-mysqli \
|
||||
# mariadb-client \
|
||||
# curl \
|
||||
# bash vim
|
||||
# RUN rm -rf /var/lib/apt/lists/*
|
||||
#
|
||||
# # fpm config
|
||||
# COPY ./conf/www.conf /etc/php/7.3/fpm/pool.d/
|
||||
# RUN mkdir /run/php/
|
||||
#
|
||||
# ENV PHP_VERSION="php-fpm7.3"
|
||||
FROM alpine:3.15
|
||||
|
||||
# alpine -----------------------------------------------------
|
||||
# bash and vim for debug
|
||||
RUN apk update && apk add \
|
||||
php7 \
|
||||
php7-fpm \
|
||||
php7-mysqli \
|
||||
php7-phar \
|
||||
php7-json \
|
||||
php7-iconv \
|
||||
mariadb-client \
|
||||
curl \
|
||||
bash vim
|
||||
RUN rm -rf /var/lib/apt/lists/*
|
||||
|
||||
FROM alpine:3.15
|
||||
# fpm config
|
||||
COPY ./conf/www.conf /etc/php7/php-fpm.d/
|
||||
RUN mkdir /run/php/
|
||||
|
||||
# bash and vim for debug
|
||||
RUN apk update && apk add \
|
||||
php7 \
|
||||
php7-fpm \
|
||||
php7-mysqli \
|
||||
php7-phar \
|
||||
php7-json \
|
||||
php7-iconv \
|
||||
mariadb-client \
|
||||
curl \
|
||||
bash vim
|
||||
RUN rm -rf /var/lib/apt/lists/*
|
||||
ARG WP_DIR
|
||||
ARG MAX_UPLOAD_SIZE
|
||||
ARG EXECUTION_TIME
|
||||
|
||||
# fpm config
|
||||
COPY ./conf/www.conf /etc/php7/php-fpm.d/
|
||||
RUN mkdir /run/php/
|
||||
# create wp directory
|
||||
RUN mkdir -p ${WP_DIR}
|
||||
|
||||
# create wp directory
|
||||
ARG WP_DIR
|
||||
RUN mkdir -p ${WP_DIR}
|
||||
# replace max file size upload and execution time
|
||||
RUN sed -i "s/\(upload_max_filesize = \).*\(M\)/\1${MAX_UPLOAD_SIZE}\2/g" /etc/php7/php.ini && \
|
||||
sed -i "s/\(post_max_size = \).*\(M\)/\1${MAX_UPLOAD_SIZE}\2/g" /etc/php7/php.ini && \
|
||||
sed -i "s/\(max_execution_time = \).*/\1${EXECUTION_TIME}/g" /etc/php7/php.ini
|
||||
|
||||
# MAP for creation of map plugin
|
||||
COPY ./conf/map_prof/ ${WP_DIR}/wp-content/plugins/map_prof
|
||||
# modify .htaccess
|
||||
COPY ./conf/htaccess ${WP_DIR}/.htaccess
|
||||
# create www-data user and add to group
|
||||
RUN adduser -S www-data && \
|
||||
adduser www-data www-data
|
||||
|
||||
# create www-data user and add to group
|
||||
RUN adduser -S www-data && \
|
||||
adduser www-data www-data
|
||||
ENV PHP_VERSION="php-fpm7"
|
||||
|
||||
ENV PHP_VERSION="php-fpm7"
|
||||
|
||||
# common -----------------------------------------------------
|
||||
# empty /var/www/html folder to avoid it to rewrite volume
|
||||
#RUN rm -rf ${WP_DIR}/*
|
||||
|
||||
# install wp-cli : https://wp-cli.org/#installing
|
||||
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar &&\
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
php_value upload_max_filesize 640M
|
||||
php_value post_max_size 640M
|
||||
php_value memory_limit 640M
|
||||
php_value max_execution_time 300
|
||||
php_value max_input_time 300
|
||||
@@ -1,76 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* @package map_prof
|
||||
* @version 1.0.0
|
||||
*/
|
||||
/*
|
||||
Plugin Name: map_prof
|
||||
Plugin URI:
|
||||
Description: add/remove locations on map at publication/deletion of posts
|
||||
Author: hugogogo
|
||||
Version: 1.0.0
|
||||
Author URI:
|
||||
*/
|
||||
|
||||
// function hello_dolly_get_lyric() {
|
||||
// /** These are the lyrics to Hello Dolly */
|
||||
// $lyrics = "Hello, Dolly
|
||||
// ...
|
||||
// Dolly'll never go away again";
|
||||
//
|
||||
// // Here we split it into lines.
|
||||
// $lyrics = explode( "\n", $lyrics );
|
||||
//
|
||||
// // And then randomly choose a line.
|
||||
// return wptexturize( $lyrics[ mt_rand( 0, count( $lyrics ) - 1 ) ] );
|
||||
// }
|
||||
//
|
||||
// // This just echoes the chosen line, we'll position it later.
|
||||
// function hello_dolly() {
|
||||
// $chosen = hello_dolly_get_lyric();
|
||||
// $lang = '';
|
||||
// if ( 'en_' !== substr( get_user_locale(), 0, 3 ) ) {
|
||||
// $lang = ' lang="en"';
|
||||
// }
|
||||
//
|
||||
// printf(
|
||||
// '<p id="dolly"><span class="screen-reader-text">%s </span><span dir="ltr"%s>%s</span></p>',
|
||||
// __( 'Quote from Hello Dolly song, by Jerry Herman:' ),
|
||||
// $lang,
|
||||
// $chosen
|
||||
// );
|
||||
// }
|
||||
//
|
||||
// // Now we set that function up to execute when the admin_notices action is called.
|
||||
// add_action( 'admin_notices', 'hello_dolly' );
|
||||
//
|
||||
// // We need some CSS to position the paragraph.
|
||||
// function dolly_css() {
|
||||
// echo "
|
||||
// <style type='text/css'>
|
||||
// #dolly {
|
||||
// float: right;
|
||||
// padding: 5px 10px;
|
||||
// margin: 0;
|
||||
// font-size: 12px;
|
||||
// line-height: 1.6666;
|
||||
// }
|
||||
// .rtl #dolly {
|
||||
// float: left;
|
||||
// }
|
||||
// .block-editor-page #dolly {
|
||||
// display: none;
|
||||
// }
|
||||
// @media screen and (max-width: 782px) {
|
||||
// #dolly,
|
||||
// .rtl #dolly {
|
||||
// float: none;
|
||||
// padding-left: 0;
|
||||
// padding-right: 0;
|
||||
// }
|
||||
// }
|
||||
// </style>
|
||||
// ";
|
||||
// }
|
||||
//
|
||||
// add_action( 'admin_head', 'dolly_css' );
|
||||
Reference in New Issue
Block a user