添加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' => [ 'log_level' => [
LogLevel::ALERT, LogLevel::ALERT,
LogLevel::CRITICAL, LogLevel::CRITICAL,
LogLevel::DEBUG, // LogLevel::DEBUG,
LogLevel::EMERGENCY, LogLevel::EMERGENCY,
LogLevel::ERROR, LogLevel::ERROR,
LogLevel::INFO, LogLevel::INFO,

View File

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

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 "$@"