添加docker启动

This commit is contained in:
想打瞌睡 2024-06-21 17:01:34 +09:00
parent 6c5a7eb472
commit f09d62735f
3 changed files with 12 additions and 5 deletions

View File

@ -22,7 +22,7 @@ return [
'log_level' => [
LogLevel::ALERT,
LogLevel::CRITICAL,
LogLevel::DEBUG,
// LogLevel::DEBUG,
LogLevel::EMERGENCY,
LogLevel::ERROR,
LogLevel::INFO,

View File

@ -12,7 +12,4 @@ services:
environment:
- APP_ENV=dev
- SCAN_CACHEABLE=false
networks:
default:
name: hyperf-skeleton
entrypoint: ["./entrypoint.sh", 'start'] # 开发环境启动命令

10
entrypoint.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
# Check if vendor directory exists
if [ ! -d "/opt/www/vendor" ]; then
# Run composer install if vendor directory does not exist
composer install
fi
# Run Hyperf application
php bin/hyperf.php "$@"