Compare commits

..

10 Commits

Author SHA1 Message Date
liubocheng 76e96d4af1 dev:修改状态码
Deploy to Test / deploy (push) Failing after 11s Details
2025-03-27 20:59:45 +08:00
liubocheng 064c6c3b83 dev:修改工作流 2025-03-27 20:43:28 +08:00
liubocheng 086601c664 dev:修改分支 2025-03-27 20:40:39 +08:00
liubocheng 4bb7364259 dev:修改push 2025-03-27 20:39:07 +08:00
liubocheng 97534b46b2 dev:修改接口 2025-03-27 17:46:07 +08:00
liubocheng 6628db5670 dev:修改数据 2025-03-27 17:20:56 +08:00
liubocheng 19ce565128 dev:修改dockerfile 2025-03-27 17:07:18 +08:00
liubocheng 14b4a7a088 dev:修改 2025-03-27 14:33:55 +08:00
liubocheng 7c483f860f dev:修改dockerfile 2025-03-27 13:52:17 +08:00
liubocheng 5938b44e28 dev:修改文件 2025-03-27 12:52:25 +08:00
4 changed files with 21 additions and 4 deletions

View File

@ -1,6 +1,7 @@
name: Deploy to Test
on:
push
push:
branches: [dev]
jobs:
deploy:
@ -68,6 +69,7 @@ jobs:
done
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}-nginx-1" nginx -s reload
EOF

View File

@ -14,3 +14,15 @@ RUN apt-get update && apt-get install -y \
RUN curl -sS https://getcomposer.org/installer | php -- \
--install-dir=/usr/local/bin \
--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,8 +6,7 @@
* @package Laravel
* @author Taylor Otwell <taylor@laravel.com>
*/
echo '123';
exit();
define('LARAVEL_START', microtime(true));
/*

View File

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