update
This commit is contained in:
		| @@ -2,7 +2,7 @@ version: "3.7" | |||||||
|  |  | ||||||
| services: | services: | ||||||
|   nginx-php: |   nginx-php: | ||||||
|     image: harbor.colben.cn/general/nginx-php |     image: harbor.colben.cn/general/nginx-php:7.4 | ||||||
|     container_name: nginx-php |     container_name: nginx-php | ||||||
|     restart: "on-failure" |     restart: "on-failure" | ||||||
|     stop_grace_period: 5m |     stop_grace_period: 5m | ||||||
|   | |||||||
| @@ -6,7 +6,7 @@ | |||||||
| # - /etc/nginx/http.d                            # | # - /etc/nginx/http.d                            # | ||||||
| # - /var/lib/nginx/html                          # | # - /var/lib/nginx/html                          # | ||||||
| # - /var/log/nginx                               # | # - /var/log/nginx                               # | ||||||
| # - /var/log/php7                                # | # - /var/log/php81                               # | ||||||
| # ENV                                            # | # ENV                                            # | ||||||
| # - GLOBAL_DIRECTIVES                            # | # - GLOBAL_DIRECTIVES                            # | ||||||
| ################################################## | ################################################## | ||||||
| @@ -2,7 +2,7 @@ version: "3.7" | |||||||
| 
 | 
 | ||||||
| services: | services: | ||||||
|   nginx-php: |   nginx-php: | ||||||
|     image: harbor.colben.cn/general/nginx-php |     image: harbor.colben.cn/general/nginx-php:8.1 | ||||||
|     container_name: nginx-php |     container_name: nginx-php | ||||||
|     restart: "on-failure" |     restart: "on-failure" | ||||||
|     stop_grace_period: 5m |     stop_grace_period: 5m | ||||||
| @@ -20,6 +20,6 @@ services: | |||||||
|       source: ./nginx/log |       source: ./nginx/log | ||||||
|       target: /var/log/nginx |       target: /var/log/nginx | ||||||
|     - type: bind |     - type: bind | ||||||
|       source: ./php7/log |       source: ./php81/log | ||||||
|       target: /var/log/php7 |       target: /var/log/php81 | ||||||
| 
 | 
 | ||||||
| @@ -1,7 +1,7 @@ | |||||||
| # 构建 nginx-php 镜像 | # 构建 nginx-php 镜像 | ||||||
| 
 | 
 | ||||||
| ## 定制 | ## 定制 | ||||||
| - 安装 nginx 和 php7 | - 安装 nginx 和 php81 | ||||||
| - 固定一些常用配置 | - 固定一些常用配置 | ||||||
| - 每 10 秒扫描一次配置文件,有变更会立即 reload | - 每 10 秒扫描一次配置文件,有变更会立即 reload | ||||||
| 
 | 
 | ||||||
| @@ -10,7 +10,7 @@ | |||||||
| - /etc/nginx/http.d: nginx http 配置文件 | - /etc/nginx/http.d: nginx http 配置文件 | ||||||
| - /var/lib/nginx/html: nginx 前端文件存放目录 | - /var/lib/nginx/html: nginx 前端文件存放目录 | ||||||
| - /var/log/nginx: nginx 日志目录 | - /var/log/nginx: nginx 日志目录 | ||||||
| - /var/log/php7: php7 日志目录 | - /var/log/php81: php81 日志目录 | ||||||
| 
 | 
 | ||||||
| ## 案例 | ## 案例 | ||||||
| - [Demo/SingleNode/](Demo/SingleNode/): 部署 nginx-php | - [Demo/SingleNode/](Demo/SingleNode/): 部署 nginx-php | ||||||
| @@ -9,7 +9,7 @@ export LANG=en_US.UTF-8 | |||||||
| 
 | 
 | ||||||
| [ 'x86_64' == "$(uname -m)" ] && ARCH='' || ARCH="-$(uname -m)" | [ 'x86_64' == "$(uname -m)" ] && ARCH='' || ARCH="-$(uname -m)" | ||||||
| ROOT_DIR="$(cd $(dirname $0) && pwd)" | ROOT_DIR="$(cd $(dirname $0) && pwd)" | ||||||
| IMAGE="harbor.colben.cn/general/$(basename ${0%.sh})$ARCH:latest" | IMAGE="harbor.colben.cn/general/$(basename ${0%.sh})$ARCH:8.1" | ||||||
| 
 | 
 | ||||||
| if [ -t 0 ]; then | if [ -t 0 ]; then | ||||||
|     function Print { echo -e "\033[36;1m$(date +'[%F %T]')\033[32;1m $*\033[0m"; } |     function Print { echo -e "\033[36;1m$(date +'[%F %T]')\033[32;1m $*\033[0m"; } | ||||||
| @@ -1,26 +0,0 @@ | |||||||
| FROM            alpine:3.9 |  | ||||||
| MAINTAINER      Colben colbenlee@gmail.com |  | ||||||
| ADD             --chown=root:root /ADD/ /opt/ |  | ||||||
| ENV             PS1='\[\e[33;1;1m\][\[\e[0m\]\[\e[35;1m\]\u\[\e[0m\]\[\e[33;1;1m\]@\[\e[0m\]\[\e[31;1;1m\]docker\[\e[0m\]\[\e[32;1;1m\](\h)\[\e[0m\]\[\e[33;1;1m\]:\[\e[0m\]\[\e[32m\]\w\[\e[0m\]\[\e[33;1;1m\]]\[\e[0m\]\[\e[36m\]\$\[\e[0m\] ' |  | ||||||
| ENV             PS2='\[\e[36m\]>\[\e[0m\] ' |  | ||||||
| ENV             LANG=en_US.UTF-8 |  | ||||||
| RUN             ln -s /opt/localtime /etc/localtime \ |  | ||||||
|                     && sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \ |  | ||||||
|                     && apk update \ |  | ||||||
|                     && apk add --no-cache bash curl coreutils nginx php7 php7-common php7-session php7-openssl php7-iconv php7-json php7-gd php7-curl php7-xml php7-mysqli php7-imap php7-cgi fcgi php7-pdo php7-pdo_mysql php7-soap php7-xmlrpc php7-posix php7-mcrypt php7-gettext php7-ldap php7-ctype php7-dom php7-fpm php7-mbstring php7-mysqlnd php7-bcmath \ |  | ||||||
|                     && sed -i -e '/^;* *max_execution_time *=/cmax_execution_time = 300' \ |  | ||||||
|                         -e '/^;* *memory_limit *=/cmemory_limit = 1024M' \ |  | ||||||
|                         -e '/^;* *post_max_size *=/cpost_max_size = 1024M' \ |  | ||||||
|                         -e '/^;* *upload_max_filesize *=/cupload_max_filesize = 1024M' \ |  | ||||||
|                         -e '/^;* *max_input_time *=/cmax_input_time = 300' \ |  | ||||||
|                         -e '/^;* *max_input_vars *=/cmax_input_vars = 10000' \ |  | ||||||
|                         -e '/^;* *date.timezone *=/cdate.timezone = PRC' \ |  | ||||||
|                         /etc/php7/php.ini \ |  | ||||||
|                     && sed -i -e '/^;* *listen *=/clisten = /var/lib/php7/phpfpm.sock' \ |  | ||||||
|                         -e '/^;* *listen.mode *=/clisten.mode = 0666' \ |  | ||||||
|                         /etc/php7/php-fpm.d/www.conf \ |  | ||||||
|                     && mkdir /run/nginx \ |  | ||||||
|                     && chown nginx:nginx /run/nginx \ |  | ||||||
|                     && rm -rf /var/cache/apk/* /etc/nginx/conf.d/* |  | ||||||
| CMD             ["/opt/ccmd"] |  | ||||||
|  |  | ||||||
		Reference in New Issue
	
	Block a user