diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index 150dc42..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,12 +0,0 @@ -version: '3.8' - -services: - php: - build: - context: . - dockerfile: Dockerfile - volumes: - - .:/var/www/html # 将当前目录挂载到容器 - command: php think run # 启动 PHP 内置服务器 - ports: - - "8000:8000" # 映射容器端口到主机端口 diff --git a/scripts/supervisord.conf b/scripts/supervisord.conf new file mode 100644 index 0000000..4fbea2d --- /dev/null +++ b/scripts/supervisord.conf @@ -0,0 +1,14 @@ +[supervisord] +nodaemon=true + +[program:web] +command=php /app/think run +autostart=true +autorestart=true + +[program:check_tasks] +command=/app/scripts/run_tasks.sh +autostart=true +autorestart=true +startretries=99999 ; 设置为一个很大的值 +startsecs=5 ; 启动后等待时间 \ No newline at end of file