Browse Source

docker 8.4 add

main
kola-web 2 days ago
parent
commit
89c094230a
  1. 11
      .nginx-format.json
  2. 1
      code_src/runtime/admin.merck.hbraas.com/huiyuan/backend/debug/6908a71fb98cb.data
  3. 1
      code_src/runtime/admin.merck.hbraas.com/huiyuan/backend/debug/6908a72634035.data
  4. 2
      code_src/runtime/admin.merck.hbraas.com/huiyuan/backend/debug/index.data
  5. 3
      code_src/test/index.php
  6. 3
      code_src/test/info.php
  7. 14
      docker-compose.yml
  8. 2
      nginx/nginx.conf
  9. 48
      nginx/sites/test/test.conf
  10. 24
      php84/Dockerfile

11
.nginx-format.json

@ -0,0 +1,11 @@
{
"indent": 2,
"spaces": true,
"alignComments": true,
"wrap": 120,
"case": {
"directive": "lower",
"keyword": "lower"
},
"trimTrailingSpaces": true
}

1
code_src/runtime/admin.merck.hbraas.com/huiyuan/backend/debug/6908a71fb98cb.data

File diff suppressed because one or more lines are too long

1
code_src/runtime/admin.merck.hbraas.com/huiyuan/backend/debug/6908a72634035.data

File diff suppressed because one or more lines are too long

2
code_src/runtime/admin.merck.hbraas.com/huiyuan/backend/debug/index.data

File diff suppressed because one or more lines are too long

3
code_src/test/index.php

@ -0,0 +1,3 @@
<?php
// 打印完整的 PHP 信息(HTML 格式,浏览器访问时自动排版)
phpinfo();

3
code_src/test/info.php

@ -0,0 +1,3 @@
<?php
// 打印完整的 PHP 信息(HTML 格式,浏览器访问时自动排版)
phpinfo();

14
docker-compose.yml

@ -73,6 +73,8 @@ services:
- "service.takeda.wx.com" - "service.takeda.wx.com"
- "www.hbraas.com" - "www.hbraas.com"
- "hbraas.com" - "hbraas.com"
- "local.php84.com"
- "php84.com"
php72: php72:
build: ./php72 build: ./php72
restart: always restart: always
@ -81,7 +83,6 @@ services:
volumes: volumes:
- ./code_src:/www - ./code_src:/www
- ./php72/php.ini:/usr/local/etc/php/php.ini - ./php72/php.ini:/usr/local/etc/php/php.ini
# - ./php72/www.conf:/usr/local/etc/php-fpm.d/www.conf
networks: networks:
lnmp: lnmp:
aliases: aliases:
@ -97,5 +98,16 @@ services:
lnmp: lnmp:
aliases: aliases:
- "php74" - "php74"
php84:
build: ./php84
restart: always
ports:
- "9060:9000"
volumes:
- ./code_src:/www
networks:
lnmp:
aliases:
- "php84"
networks: networks:
lnmp: lnmp:

2
nginx/nginx.conf

@ -1,4 +1,3 @@
user nginx; user nginx;
worker_processes 1; worker_processes 1;
@ -6,7 +5,6 @@ error_log /www/log/nginx/error.log warn;
pid /var/run/nginx.pid; pid /var/run/nginx.pid;
events { events {
worker_connections 1024; worker_connections 1024;
} }

48
nginx/sites/test/test.conf

@ -0,0 +1,48 @@
server {
server_name php84.com local.php84.com;
listen 80;
root /www/test;
index index.html index.htm index.php;
location /nginx_status {
stub_status on;
access_log off;
allow 127.0.0.1;
deny all;
}
location ~ ^/proxy/(.+)$ {
set $realpath $1;
set $lastpath $realpath$is_args$args;
proxy_set_header Referer '';
proxy_pass http://$lastpath;
}
location ~ ^/(ueditor/php/.*) {
rewrite ^/(ueditor/php/.*) /$1 break;
root /www/test;
}
location ~ .*\.(php|php5)$ {
fastcgi_pass php84:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|ico)$ {
root /www/test;
expires 30d;
access_log off;
}
location ~ .*\.(js|css|ttf|woff|woff2)$ {
root /www/test;
expires 7d;
access_log off;
}
location ~ .*\.(html)$ {
root /www/test;
expires 7d;
access_log off;
}
}

24
php84/Dockerfile

@ -0,0 +1,24 @@
FROM php:8.4.14-fpm-alpine3.21
ENV TZ=Asia/Shanghai
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
&& apk update \
&& apk add --no-cache tzdata \
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
&& apk add --no-cache autoconf \
&& apk add --no-cache build-base \
&& apk add --no-cache zlib-dev \
&& apk add --no-cache libpng-dev \
&& apk add --no-cache libsodium-dev \
&& apk add --no-cache libzip-dev \
&& docker-php-ext-install -j$(nproc) gd \
&& docker-php-ext-install -j$(nproc) sodium \
&& docker-php-ext-install -j$(nproc) zip \
&& docker-php-ext-install -j$(nproc) pdo_mysql\
&& pecl install redis \
&& docker-php-ext-enable redis \
&& curl -sS https://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer \
&& apk add --no-cache libjpeg-turbo-dev \
&& docker-php-ext-configure gd --with-jpeg \
&& docker-php-ext-install -j$(nproc) gd
Loading…
Cancel
Save