diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..6120b37d0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ + + + + diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 000000000..31c71a87b --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,6 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/backend.iml b/.idea/backend.iml new file mode 100644 index 000000000..36b0a7b5e --- /dev/null +++ b/.idea/backend.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml new file mode 100644 index 000000000..7efd2f2f4 --- /dev/null +++ b/.idea/dataSources.xml @@ -0,0 +1,12 @@ + + + + + mysql.8 + true + com.mysql.cj.jdbc.Driver + jdbc:mysql://localhost:3306 + $ProjectFileDir$ + + + \ No newline at end of file diff --git a/.idea/data_source_mapping.xml b/.idea/data_source_mapping.xml new file mode 100644 index 000000000..5417ff764 --- /dev/null +++ b/.idea/data_source_mapping.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 000000000..bc21af499 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/sqldialects.xml b/.idea/sqldialects.xml new file mode 100644 index 000000000..e3e93dcf5 --- /dev/null +++ b/.idea/sqldialects.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 000000000..c8397c94c --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..bbc395ed8 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,56 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Listen for Xdebug (Docker)", + "type": "php", + "request": "launch", + "port": 9003, + "pathMappings": { + "/var/www/html": "${workspaceFolder}/src/app" + }, + "ignore": [ + "**/vendor/**/*.php" + ], + "log": true, + "externalConsole": false, + "serverReadyAction": { + "pattern": "Development Server \\(http://localhost:([0-9]+)\\) started", + "uriFormat": "http://localhost:%s", + "action": "openExternally" + } + }, + { + "name": "Launch currently open script", + "type": "php", + "request": "launch", + "program": "${file}", + "cwd": "${fileDirname}", + "port": 9003, + "runtimeArgs": [ + "-dxdebug.start_with_request=yes" + ], + "env": { + "XDEBUG_CONFIG": "client_host=host.docker.internal client_port=9003", + "XDEBUG_MODE": "debug" + } + }, + { + "name": "Debug ThinkPHP Command", + "type": "php", + "request": "launch", + "program": "${workspaceFolder}/src/app/think", + "args": [ + "your:command" + ], + "cwd": "${workspaceFolder}/src/app", + "port": 9003, + "env": { + "XDEBUG_CONFIG": "client_host=host.docker.internal client_port=9003" + }, + "pathMappings": { + "/var/www/html": "${workspaceFolder}/src/app" + } + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..508096941 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,26 @@ +{ + "php.validate.executablePath": "/usr/bin/php", + "php.validate.run": "onSave", + "debug.onTaskErrors": "showErrors", + "debug.internalConsoleOptions": "openOnSessionStart", + "debug.javascript.autoAttachFilter": "onlyWithFlag", + + // PHP 智能提示 + "php.suggest.basic": true, + "editor.quickSuggestions": { + "strings": true + }, + + // 文件排除 + "files.exclude": { + "**/vendor": true, + "**/runtime": true, + "**/.git": true, + "**/node_modules": true + }, + + // 远程开发设置 + "remote.extensionKind": { + "ms-vscode-remote.remote-containers": "ui" + } +} \ No newline at end of file diff --git a/docker/php/CacheDev-Dockerfile b/docker/php/CacheDev-Dockerfile deleted file mode 100644 index 080af3b36..000000000 --- a/docker/php/CacheDev-Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -# 使用官方PHP镜像 -FROM php:7.4.33-fpm-dev-cache - -# 设置工作目录 -WORKDIR /var/www/html - -# # 创建非 root 用户 -# RUN useradd -m -u 1000 phpuser && chown -R phpuser:phpuser /var/www/html - -# 设置权限, 防止 runtime 目录无法写入的问题 -# RUN chmod -R 755 /var/www/html -RUN chmod -R 777 /var/www/html/runtime - -# USER phpuser - -# 暴露端口 -EXPOSE 9000 - -CMD ["php-fpm"] \ No newline at end of file diff --git a/docker/php/CacheDev.Dockerfile b/docker/php/CacheDev.Dockerfile new file mode 100644 index 000000000..95cdcd7fe --- /dev/null +++ b/docker/php/CacheDev.Dockerfile @@ -0,0 +1,10 @@ +# 使用官方PHP镜像 +FROM php:7.4.33-fpm-dev-newshop + +# 设置工作目录 +WORKDIR /var/www/html + +# 暴露端口 +EXPOSE 9000 9003 + +CMD ["php-fpm"] \ No newline at end of file diff --git a/src/.gitignore b/src/.gitignore index 7b5334e82..0bd267d44 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -1,14 +1 @@ -/.project -/.vscode -/.settings -/.idea -/.htaccess -/.buildpath -/cert.key -*.log -*.txt -/h5 -/web -/mshop -# /config/database.php -/cashregister \ No newline at end of file +./runtime \ No newline at end of file