diff --git a/.env.example b/.env.example index 73a4247..8642dfc 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,8 @@ IMAGE_BASE=registry.cn-hangzhou.aliyuncs.com/aix_chenc + +################ Net Congfig ###################### +NET_SUBNET=10.12.25 + ################ Elasticsearch ###################### ELK_VERSION=7.17.10 ELASTICSEARCH_HOST_HTTP_PORT=9200 diff --git a/docker-compose.yaml b/docker-compose.yaml index 0aae94a..656fa7a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -7,8 +7,8 @@ networks: ipam: driver: default config: - - gateway: 10.12.25.1 - subnet: 10.12.25.0/24 + - gateway: ${NET_SUBNET:-10.12.25}.1 + subnet: ${NET_SUBNET:-10.12.25}.0/24 driver_opts: com.docker.network.bridge.name: aix-docker-cc @@ -51,7 +51,7 @@ services: hard: 65536 networks: aix-docker-cc: - ipv4_address: 10.12.25.10 + ipv4_address: ${NET_SUBNET:-10.12.25}.10 depends_on: - redis @@ -71,7 +71,7 @@ services: - "./openresty/config/rewrite:/usr/local/openresty/nginx/conf/rewrite" networks: aix-docker-cc: - ipv4_address: 10.12.25.2 + ipv4_address: ${NET_SUBNET:-10.12.25}.2 depends_on: - php74 - php73 @@ -92,7 +92,7 @@ services: command: ["redis-server","/etc/redis/redis.conf"] networks: aix-docker-cc: - ipv4_address: 10.12.25.3 + ipv4_address: ${NET_SUBNET:-10.12.25}.3 php73: image: ${IMAGE_BASE}/php:7.3 @@ -104,7 +104,7 @@ services: working_dir: /data/wwwroot/ networks: aix-docker-cc: - ipv4_address: 10.12.25.73 + ipv4_address: ${NET_SUBNET:-10.12.25}.73 depends_on: - elasticsearch - redis @@ -121,13 +121,13 @@ services: working_dir: /data/wwwroot/ networks: aix-docker-cc: - ipv4_address: 10.12.25.74 + ipv4_address: ${NET_SUBNET:-10.12.25}.74 depends_on: - elasticsearch - redis php81: - image: ${IMAGE_BASE}/php:8.1.21 + image: ${IMAGE_BASE}/php:8.1.24 container_name: php81 restart: always volumes: @@ -136,7 +136,7 @@ services: working_dir: /data/wwwroot/ networks: aix-docker-cc: - ipv4_address: 10.12.25.81 + ipv4_address: ${NET_SUBNET:-10.12.25}.81 depends_on: - elasticsearch - redis diff --git a/php/php73/etc/php-fpm.d/www.conf b/php/php73/etc/php-fpm.d/www.conf index a9eaf03..20cedd4 100644 --- a/php/php73/etc/php-fpm.d/www.conf +++ b/php/php73/etc/php-fpm.d/www.conf @@ -110,22 +110,22 @@ pm = dynamic ; forget to tweak pm.* to fit your needs. ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' ; Note: This value is mandatory. -pm.max_children = 5 +pm.max_children = 50 ; The number of child processes created on startup. ; Note: Used only when pm is set to 'dynamic' ; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2 -pm.start_servers = 2 +pm.start_servers = 10 ; The desired minimum number of idle server processes. ; Note: Used only when pm is set to 'dynamic' ; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = 1 +pm.min_spare_servers = 5 ; The desired maximum number of idle server processes. ; Note: Used only when pm is set to 'dynamic' ; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = 3 +pm.max_spare_servers = 25 ; The number of seconds after which an idle process will be killed. ; Note: Used only when pm is set to 'ondemand' diff --git a/php/php73/etc/php/conf.d/docker-php-ext-imagick.ini b/php/php73/etc/php/conf.d/docker-php-ext-imagick.ini new file mode 100644 index 0000000..b1b23d2 --- /dev/null +++ b/php/php73/etc/php/conf.d/docker-php-ext-imagick.ini @@ -0,0 +1 @@ +extension=imagick.so \ No newline at end of file diff --git a/php/php73/etc/php/php.ini b/php/php73/etc/php/php.ini index 0b2369d..808d653 100644 --- a/php/php73/etc/php/php.ini +++ b/php/php73/etc/php/php.ini @@ -684,7 +684,7 @@ auto_globals_jit = On ; Its value may be 0 to disable the limit. It is ignored if POST data reading ; is disabled through enable_post_data_reading. ; http://php.net/post-max-size -post_max_size = 8M +post_max_size = 50M ; Automatically add files before PHP document. ; http://php.net/auto-prepend-file @@ -836,7 +836,7 @@ file_uploads = On ; Maximum allowed size for uploaded files. ; http://php.net/upload-max-filesize -upload_max_filesize = 2M +upload_max_filesize = 50M ; Maximum number of files that can be uploaded via a single request max_file_uploads = 20 diff --git a/php/php81/etc/php-fpm.d/www.conf b/php/php81/etc/php-fpm.d/www.conf index 936a146..95eeadf 100644 --- a/php/php81/etc/php-fpm.d/www.conf +++ b/php/php81/etc/php-fpm.d/www.conf @@ -113,22 +113,22 @@ pm = dynamic ; forget to tweak pm.* to fit your needs. ; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand' ; Note: This value is mandatory. -pm.max_children = 5 +pm.max_children = 50 ; The number of child processes created on startup. ; Note: Used only when pm is set to 'dynamic' ; Default Value: (min_spare_servers + max_spare_servers) / 2 -pm.start_servers = 2 +pm.start_servers = 10 ; The desired minimum number of idle server processes. ; Note: Used only when pm is set to 'dynamic' ; Note: Mandatory when pm is set to 'dynamic' -pm.min_spare_servers = 1 +pm.min_spare_servers = 5 ; The desired maximum number of idle server processes. ; Note: Used only when pm is set to 'dynamic' ; Note: Mandatory when pm is set to 'dynamic' -pm.max_spare_servers = 3 +pm.max_spare_servers = 25 ; The number of rate to spawn child processes at once. ; Note: Used only when pm is set to 'dynamic' diff --git a/php/php81/etc/php/conf.d/docker-php-ext-imagick.ini b/php/php81/etc/php/conf.d/docker-php-ext-imagick.ini new file mode 100644 index 0000000..b1b23d2 --- /dev/null +++ b/php/php81/etc/php/conf.d/docker-php-ext-imagick.ini @@ -0,0 +1 @@ +extension=imagick.so \ No newline at end of file diff --git a/php/php81/etc/php/php.ini b/php/php81/etc/php/php.ini index 87d87f1..d5e8527 100644 --- a/php/php81/etc/php/php.ini +++ b/php/php81/etc/php/php.ini @@ -693,7 +693,7 @@ auto_globals_jit = On ; Its value may be 0 to disable the limit. It is ignored if POST data reading ; is disabled through enable_post_data_reading. ; https://php.net/post-max-size -post_max_size = 8M +post_max_size = 50M ; Automatically add files before PHP document. ; https://php.net/auto-prepend-file @@ -845,7 +845,7 @@ file_uploads = On ; Maximum allowed size for uploaded files. ; https://php.net/upload-max-filesize -upload_max_filesize = 2M +upload_max_filesize = 50M ; Maximum number of files that can be uploaded via a single request max_file_uploads = 20