From 98b555e80005eceb5c8fffdfc8eb4d3d947f8bfa Mon Sep 17 00:00:00 2001 From: coolxitech Date: Tue, 29 Oct 2024 18:42:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E6=94=AF=E6=8C=81compose?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 12 ------------ scripts/supervisord.conf | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 12 deletions(-) delete mode 100644 docker-compose.yml create mode 100644 scripts/supervisord.conf 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