chenlong 4 سال پیش
کامیت
ec13ce310a
7فایلهای تغییر یافته به همراه68 افزوده شده و 0 حذف شده
  1. 8 0
      .idea/.gitignore
  2. 8 0
      .idea/cuspsr.iml
  3. 8 0
      .idea/modules.xml
  4. 18 0
      docker-compose.yml
  5. 23 0
      docker/nginx/conf/conf.d/cuspsr.conf
  6. 2 0
      index.php
  7. 1 0
      read.me

+ 8 - 0
.idea/.gitignore

@@ -0,0 +1,8 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 数据源本地存储已忽略文件
+/dataSources/
+/dataSources.local.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/

+ 8 - 0
.idea/cuspsr.iml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="WEB_MODULE" version="4">
+  <component name="NewModuleRootManager">
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/cuspsr.iml" filepath="$PROJECT_DIR$/.idea/cuspsr.iml" />
+    </modules>
+  </component>
+</project>

+ 18 - 0
docker-compose.yml

@@ -0,0 +1,18 @@
+version: '3'
+services:
+  cuspsr:
+    image: my-php-fpm:2021.3
+    container_name: "cuspsr"
+    volumes:
+      - ./:/www
+
+  cuspsr-nginx:
+    image: library/nginx:latest
+    container_name: "cuspsr-nginx"
+    ports:
+      - 8002:80
+    volumes:
+      - ./:/usr/share/nginx/html
+      - ./docker/nginx/conf/conf.d:/etc/nginx/conf.d
+    depends_on:
+      - cuspsr

+ 23 - 0
docker/nginx/conf/conf.d/cuspsr.conf

@@ -0,0 +1,23 @@
+server {
+    listen       80;
+    server_name  localhost;
+
+    root   /usr/share/nginx/html;
+    index  index.html index.htm index.php;
+
+    location / {
+        try_files $uri $uri/ /index.php?$query_string;
+    }
+
+    error_page   500 502 503 504  /50x.html;
+    location = /50x.html {
+        root   /usr/share/nginx/html;
+    }
+
+    location ~ \.php$ {
+        fastcgi_pass   cuspsr:9000;
+        fastcgi_index  index.php;
+        fastcgi_param  SCRIPT_FILENAME  /www/$fastcgi_script_name;
+        include        fastcgi_params;
+    }
+}

+ 2 - 0
index.php

@@ -0,0 +1,2 @@
+<?php
+echo 'hi';

+ 1 - 0
read.me

@@ -0,0 +1 @@
+##基于psr-0规范的自定义框架,包含类的自动加载、命名空间、各种设计模式的学习。