kphcdr 1 рік тому
батько
коміт
35606f16db

+ 1 - 1
.env

@@ -1,6 +1,6 @@
 # 容器名称
 ABBREVIATION=kphcdr
 # 统一前缀端口 1-5
-NUMBER=3
+NUMBER=1
 
 MYSQL_PASSWORD=root

+ 0 - 0
env.example → .env.example


+ 1 - 1
config/nginx/conf.d/vhost.conf

@@ -5,7 +5,7 @@ server {
     client_max_body_size 5M;
     root   /www/server/public;
     index  index.html index.htm index.php;
-
+    server_name localhost;
     location / {
         if (!-e $request_filename)
         {

+ 0 - 5
config/nginx/nginx.conf

@@ -34,9 +34,4 @@ http {
                return 404;
          }
     }
-
-    include /etc/nginx/conf.d/company/*.conf;
-    include /etc/nginx/conf.d/my/*.conf;
-    include /etc/nginx/conf.d/product/*.conf;
-    include /etc/nginx/conf.d/project/*.conf;
 }

+ 1 - 1
config/php/php.ini

@@ -1 +1 @@
-upload_max_filesize = 5M
+upload_max_filesize = 10M

+ 6 - 16
docker-compose.yml

@@ -1,9 +1,5 @@
 version: '3'
 
-networks:
-  kphcdr:
-    driver: bridge
-
 services:
   nginx:
     container_name: ${ABBREVIATION}-nginx
@@ -15,24 +11,22 @@ services:
       - ./www:/www
       - ./config/nginx/conf.d:/etc/nginx/conf.d
       - ./logs/nginx/logs:/logs
-    networks:
-      - kphcdr
     ports:
       - "${NUMBER}080:80"
 
   php:
-    build:
-      context: ./config/php
-      args:
-        TZ: "Asia/Shanghai"
+    #没有自定义要求就用镜像
+    #build:
+    #  context: ./config/php
+    #  args:
+    #    TZ: "Asia/Shanghai"
+    image: docker.io/kphcdr/kphcdr_php:latest
     restart: always
     container_name: ${ABBREVIATION}-php-fpm
     working_dir: /www/server
     volumes:
       - ./www:/www
       - ./config/php/php.ini:/usr/local/etc/php/php.ini
-    networks:
-      - kphcdr
 
   mysql:
     container_name: ${ABBREVIATION}-mysql
@@ -47,8 +41,6 @@ services:
     environment:
       MYSQL_ROOT_PASSWORD: ${MYSQL_PASSWORD}
       TZ: "Asia/Shanghai"
-    networks:
-      - kphcdr
 
   redis:
     container_name: ${ABBREVIATION}-redis
@@ -56,7 +48,5 @@ services:
     restart: always
     volumes:
       - ./data/redis:/data
-    networks:
-      - kphcdr
     ports:
       - "${NUMBER}6379:6379"

+ 1 - 1
www/server/public/index.php

@@ -1,3 +1,3 @@
 <?php
-
+sleep(1);
 phpinfo();