Compare commits

..

No commits in common. "76e96d4af1c37de4ef1756906b771e4d80c9992f" and "d77fa690bb499af4867f98384e40acf12926a483" have entirely different histories.

4 changed files with 4 additions and 21 deletions

View File

@ -1,7 +1,6 @@
name: Deploy to Test name: Deploy to Test
on: on:
push: push
branches: [dev]
jobs: jobs:
deploy: deploy:
@ -69,7 +68,6 @@ jobs:
done done
docker exec "${COMPOSE_PROJECT}-php-1" composer install --no-dev --optimize-autoloader docker exec "${COMPOSE_PROJECT}-php-1" composer install --no-dev --optimize-autoloader
docker exec "${COMPOSE_PROJECT}-php-1" php artisan key:generate
docker exec "${COMPOSE_PROJECT}-php-1" php artisan config:cache docker exec "${COMPOSE_PROJECT}-php-1" php artisan config:cache
docker exec "${COMPOSE_PROJECT}-nginx-1" nginx -s reload docker exec "${COMPOSE_PROJECT}-nginx-1" nginx -s reload
EOF EOF

View File

@ -2,7 +2,7 @@ FROM php:7.3-fpm
# 替换为清华大学镜像源Debian 10 Buster # 替换为清华大学镜像源Debian 10 Buster
RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list \ RUN sed -i 's/deb.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list \
&& sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list && sed -i 's/security.debian.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apt/sources.list
# 安装系统依赖和扩展 # 安装系统依赖和扩展
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
@ -14,15 +14,3 @@ RUN apt-get update && apt-get install -y \
RUN curl -sS https://getcomposer.org/installer | php -- \ RUN curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin \ --install-dir=/usr/local/bin \
--filename=composer --filename=composer
# 创建非 root 用户(推荐与宿主机用户 UID/GID 一致)
ARG USER_ID=1003 # 宿主机 deploy-user 的 UID
ARG GROUP_ID=1003 # 宿主机 deploy-user 的 GID
RUN groupadd -g ${GROUP_ID} appuser \
&& useradd -u ${USER_ID} -g appuser -m -d /home/appuser -s /bin/bash appuser
# 设置工作目录权限
RUN chown -R appuser:appuser /var/www/html
# 切换到非 root 用户
USER appuser

View File

@ -6,7 +6,8 @@
* @package Laravel * @package Laravel
* @author Taylor Otwell <taylor@laravel.com> * @author Taylor Otwell <taylor@laravel.com>
*/ */
echo '123';
exit();
define('LARAVEL_START', microtime(true)); define('LARAVEL_START', microtime(true));
/* /*

View File

@ -16,7 +16,3 @@ use Illuminate\Http\Request;
Route::middleware('auth:api')->get('/user', function (Request $request) { Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user(); return $request->user();
}); });
Route::get('/test', function () {
return ["msg" => "success", "data" => [], "status" => 0];
});