Browse Source

refactor: 配置修改

master
ww519441258 4 years ago
parent
commit
09453cbf40
  1. 7
      docker-compose.yml
  2. 1
      mysql/etc/my.cnf
  3. 13
      nginx/conf/nginx.conf
  4. 1
      php-fpm/etc/conf.d/docker-php-ext-swoole.ini
  5. 6
      php-fpm/etc/php.ini

7
docker-compose.yml

@ -2,6 +2,7 @@ version: "2"
services:
web:
image: nginx
container_name: nginx
ports:
- "80:80"
restart: always
@ -29,7 +30,9 @@ services:
networks:
- dlc-dev-network
php:
image: linyaostalker/php:7.3
image: ww519441258/php7.3:0.2.0
#image: hollodotme/php71-fpm-redis-mysql
container_name: php
restart: always
volumes:
- /home/www:/www
@ -42,6 +45,7 @@ services:
- dlc-dev-network
mongodb:
image: mongo
container_name: mongo
restart: always
volumes:
- ./mongodb/data:/data/db
@ -53,6 +57,7 @@ services:
- dlc-dev-network
redis:
image: redis
container_name: redis
restart: always
command: [
"bash", "-c",

1
mysql/etc/my.cnf

@ -29,3 +29,4 @@ symbolic-links=0
# Custom config should go here
!includedir /etc/mysql/conf.d/
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

13
nginx/conf/nginx.conf

@ -1,6 +1,6 @@
user nginx;
worker_processes 1;
worker_processes 4;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
@ -14,18 +14,25 @@ events {
http {
upstream fastcgi_backend {
server php:9000;
server php:9001;
server php:9002;
}
include /etc/nginx/mime.types;
default_type application/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 50m;
client_max_body_size 80m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
keepalive_timeout 0;
tcp_nodelay on;

1
php-fpm/etc/conf.d/docker-php-ext-swoole.ini

@ -0,0 +1 @@
extension=swoole.so

6
php-fpm/etc/php.ini

@ -398,7 +398,7 @@ max_input_time = 60
; Maximum amount of memory a script may consume (128MB)
; http://php.net/memory-limit
memory_limit = 128M
memory_limit = 1024M
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
@ -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 = 80M
; 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 = 80M
; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20

Loading…
Cancel
Save