Browse Source

for debug

stanley-king 4 years ago
parent
commit
ec59931c78

+ 1 - 1
application/index/controller/Index.php

@@ -7,7 +7,7 @@ class Index
     public function __construct()
     {
 //        $this->mAdminUrl = 'http://host.docker.internal:8080';
-        $this->mAdminUrl = 'http://docker.hostip:8080';
+        $this->mAdminUrl = 'https://apizng.eavic.com';
     }
 
     public function index()

+ 13 - 31
conf/nginx/nginx-prod-http.conf

@@ -9,7 +9,7 @@ events {
     worker_connections  1024;
 }
 
-http 
+http
 {
     include       mime.types;
     default_type  application/octet-stream;
@@ -25,11 +25,11 @@ http
                       '$status $body_bytes_sent "$http_referer" '
                       '"$http_user_agent" "$http_x_forwarded_for"';
 
-    server 
+    server
     {
     	listen       80;
         set  $folder_name /var/www/html;
-        server_name www.xyzshops.cn;
+        server_name 10.64.81.2;
         root $folder_name;
         index index.html Index.php;
     	client_max_body_size 100m;
@@ -37,16 +37,10 @@ http
         proxy_read_timeout 500s;
         proxy_send_timeout 500s;
         fastcgi_connect_timeout 75;
-        fastcgi_read_timeout 600;   
-        fastcgi_send_timeout 600;   
+        fastcgi_read_timeout 600;
+        fastcgi_send_timeout 600;
 
         charset utf-8;
-        
-        location /logs {
-            deny all;
-            return 403;
-        }
-
         location /data/log {
             deny all;
             return 403;
@@ -54,31 +48,19 @@ http
         location / {
             index  index.html index.htm Index.php;
         }
-        
-        location /mshop {
-            root $folder_name;
-            autoindex on;        
-            index  index.html index.htm Index.php;
-	        try_files $uri $uri/ /mshop/index.html;
-        }
-
-        location ~ /mobile/[/\w]+\.php$ {
-            root           $folder_name;
-            fastcgi_pass   mobilesrv:9100;
-            fastcgi_index  Index.php;
-            fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
-            include fastcgi_params;
-        }
 
-        location ~ /mobile/[/\w]+\.html$ {
-            try_files $uri $uri/ /mobile/index.html;
+        if (!-e $request_filename) {
+            rewrite  ^(.*)$  /Index.php?s=/$1  last;
         }
 
-        location ~ \.php$ {
-	        add_header Cache-Control no-store;
+        location ~ \.php {
+            add_header Cache-Control no-store;
+            set  $folder_name /var/www/html/public;
             root           $folder_name;
-            fastcgi_pass   fpmsrv:9000;
+            fastcgi_pass   accfpm:9000;
             fastcgi_index  Index.php;
+            fastcgi_split_path_info ^(.+\.php)(.*)$;
+            fastcgi_param PATH_INFO $fastcgi_path_info;
             fastcgi_param  SCRIPT_FILENAME  $folder_name$fastcgi_script_name;
             include        fastcgi_params;
         }

+ 1 - 1
conf/php-fpm/php-debug.ini

@@ -1324,7 +1324,7 @@ bcmath.scale = 0
 ; Handler used to store/retrieve data.
 ; http://php.net/session.save-handler
 session.save_handler = redis
-session.save_path = "tcp://devrredis:6379"
+session.save_path = "tcp://accredis:6379"
 
 ;session.save_handler = files
 

+ 66 - 0
docker-compose-win.yml

@@ -0,0 +1,66 @@
+version: "3.7"
+
+services:
+  accnginx:
+    image: nginx:alpine
+    ports:
+      - "8088:8088"
+    volumes:
+      - /d/zng/access/conf/etc/localtime:/etc/localtime:ro
+      - /d/zng/access/conf/nginx/nginx-prod-http.conf:/etc/nginx/nginx.conf:ro
+      - /d/zng/access:/var/www/html
+    links:
+      - accfpm
+    container_name: "acc-nginx"
+    command: [nginx,'-g','daemon off;']
+
+  accfpm:
+    image: php-fpm:alpine
+    volumes:
+      - /d/zng/access/conf/etc/localtime:/etc/localtime:ro
+      - /d/zng/access:/var/www/html
+      - /d/zng/access/conf/php-fpm/php.ini:/usr/local/etc/php/php.ini
+      - /d/zng/access/conf/php-fpm/php-fpm.conf:/usr/local/etc/php-fpm.conf
+      - /d/zng/access/conf/php-fpm/docker-php-fpm-start:/usr/local/bin/docker-php-fpm-start
+    container_name: "acc-web"
+    command: [docker-php-fpm-start]
+    depends_on:
+      - accredis
+
+  accphp:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - /d/zng/access/conf/etc/localtime:/etc/localtime:ro
+      - /d/zng/access/conf/php/php.ini:/usr/local/etc/php/php.ini
+      - /d/zng/access:/var/www/html
+    links:
+      - accredis
+    container_name: "acc-php"
+
+  accredis:
+    image: redis:alpine
+    volumes:
+      - /d/zng/access/conf/etc/localtime:/etc/localtime:ro
+    container_name: "acc-redis"
+    command: [ "redis-server"]
+
+  accqueue:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - /d/zng/access/conf/etc/localtime:/etc/localtime:ro
+      - /d/zng/access:/var/www/html
+      - /d/zng/access/conf/php/php.ini:/usr/local/etc/php/php.ini
+      - /d/zng/access/conf/queue/docker-queue-start:/usr/local/bin/docker-queue-start
+    container_name: "acc-queue"
+    command: [docker-queue-start]
+
+  acccrontab:
+    image: php-zts-debug:7.3.18
+    volumes:
+      - /d/zng/access/conf/etc/localtime:/etc/localtime:ro
+      - /d/zng/access:/var/www/html
+      - /d/zng/access/conf/php/php.ini:/usr/local/etc/php/php.ini
+      - /d/zng/access/conf/crontab/root:/var/spool/cron/crontabs/root
+      - /d/zng/access/conf/crontab/docker-start:/usr/local/bin/docker-start
+    container_name: "acc-crontab"
+    command: [docker-start]

+ 0 - 3
docker-compose-windows.yml

@@ -53,9 +53,6 @@ services:
       - /d/phpstudy_pro/WWW/access/conf/queue/docker-queue-start:/usr/local/bin/docker-queue-start
     container_name: "acc-queue"
     command: [docker-queue-start]
-    extra_hosts:
-      - "docker.hostip:172.18.0.1"
-      - "eth.hostip:172.17.153.106"
 
   acccrontab:
     image: php-zts-debug:7.3.18

+ 0 - 56
docker-compose.yml

@@ -1,56 +0,0 @@
-version: "3.7"
-
-services:
-  devnginx:
-    image: nginx:alpine
-    ports:
-      - "8088:8080"
-    volumes:
-      - $PWD/conf/etc/localtime:/etc/localtime:ro
-      - $PWD/conf/nginx/nginx-debug-http.conf:/etc/nginx/nginx.conf:ro
-      - $PWD:/var/www/html
-    links:
-      - devfpm
-    container_name: "dev-nginx"
-    command: [nginx,'-g','daemon off;']
-
-  devfpm:
-      image: php-fpm:alpine
-      volumes:
-        - $PWD/conf/etc/localtime:/etc/localtime:ro
-        - $PWD:/var/www/html
-        - $PWD/conf/php-fpm/php-debug.ini:/usr/local/etc/php/php.ini
-        - $PWD/conf/php-fpm/php-fpm.conf:/usr/local/etc/php-fpm.conf
-        - $PWD/conf/php-fpm/docker-php-fpm-start:/usr/local/bin/docker-php-fpm-start
-      container_name: "dev-web"
-      command: [docker-php-fpm-start]
-      depends_on:
-        - devredis
-
-  devphp:
-    image: php-zts-debug:7.3.18
-    volumes:
-      - $PWD/conf/etc/localtime:/etc/localtime:ro
-      - $PWD/conf/php/php-debug.ini:/usr/local/etc/php/php.ini
-      - $PWD:/var/www/html
-    links:
-      - devredis
-    container_name: "dev-php"
-    depends_on:
-      - "redisrv"
-
-  crontabsrv:
-      image: php-zts-debug:7.3.18
-      volumes:
-        - $PWD/conf/etc/localtime:/etc/localtime:ro
-        - $PWD:/var/www/html
-        - /Volumes/Transcend/upload:/var/www/html/data/upload
-        - $PWD/conf/php/php-debug.ini:/usr/local/etc/php/php.ini
-        - $PWD/conf/crontab/debug-root:/var/spool/cron/crontabs/root
-        - $PWD/conf/crontab/docker-start:/usr/local/bin/docker-start
-      links:
-        - redisrv
-      container_name: "panda-crontab"
-      command: [docker-start]
-      depends_on:
-        - "redisrv"

+ 4 - 0
other/config.prod.php

@@ -1 +1,5 @@
 <?php
+
+$other_config['net_queue']['name'] = 'net_access_queue';
+$other_config['net_queue']['host'] = 'apizng.eavic.com';
+$other_config['net_queue']['port'] = 6380;