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. 24
      docker-compose.yml
  8. 28
      nginx/nginx.conf
  9. 48
      nginx/sites/test/test.conf
  10. 24
      php84/Dockerfile

11
.nginx-format.json

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

3
code_src/test/info.php

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

24
docker-compose.yml

@ -73,15 +73,16 @@ services: @@ -73,15 +73,16 @@ services:
- "service.takeda.wx.com"
- "www.hbraas.com"
- "hbraas.com"
- "local.php84.com"
- "php84.com"
php72:
build: ./php72
restart: always
ports:
- "9020:9000"
- "9020:9000"
volumes:
- ./code_src:/www
- ./php72/php.ini:/usr/local/etc/php/php.ini
# - ./php72/www.conf:/usr/local/etc/php-fpm.d/www.conf
- ./code_src:/www
- ./php72/php.ini:/usr/local/etc/php/php.ini
networks:
lnmp:
aliases:
@ -90,12 +91,23 @@ services: @@ -90,12 +91,23 @@ services:
build: ./php74
restart: always
ports:
- "9040:9000"
- "9040:9000"
volumes:
- ./code_src:/www
- ./code_src:/www
networks:
lnmp:
aliases:
- "php74"
php84:
build: ./php84
restart: always
ports:
- "9060:9000"
volumes:
- ./code_src:/www
networks:
lnmp:
aliases:
- "php84"
networks:
lnmp:

28
nginx/nginx.conf

@ -1,31 +1,29 @@ @@ -1,31 +1,29 @@
user nginx;
worker_processes 1;
user nginx;
worker_processes 1;
error_log /www/log/nginx/error.log warn;
pid /var/run/nginx.pid;
error_log /www/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /www/log/nginx/host.access.log main;
access_log /www/log/nginx/host.access.log main;
sendfile on;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
keepalive_timeout 65;
resolver 8.8.8.8;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;

48
nginx/sites/test/test.conf

@ -0,0 +1,48 @@ @@ -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 @@ @@ -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