shell bugs fixed

This commit is contained in:
wandoubaba517 2023-11-11 13:48:58 +08:00
parent 3b198b4212
commit 643250b245
3 changed files with 4 additions and 7 deletions

View File

@ -11,5 +11,3 @@ services:
- ./php.ini:/usr/local/etc/php/php.ini
working_dir: /app/service
stdin_open: true
command: ["php", "start.php", "start"]

5
init
View File

@ -25,8 +25,7 @@ if [ "$(docker ps -a -q -f name=$WORKERMAN_CONTAINER_NAME)" ]; then
fi
# 启动容器
docker compose up -d
docker compose -f docker-compose.yml up -d
# 进入容器并执行composer install
docker exec -it $WORKERMAN_CONTAINER_NAME bash -c "composer install"
docker restart $WORKERMAN_CONTAINER_NAME
docker exec -it $WORKERMAN_CONTAINER_NAME bash -c "composer install"

4
server
View File

@ -31,9 +31,9 @@ else
if [ "$1" = "logs" ]; then
docker logs -f $WORKERMAN_CONTAINER_NAME
elif [ "$1" = "start" ]; then
:
docker exec -itd $WORKERMAN_CONTAINER_NAME bash -c "php start.php start"
elif [ "$1" = "restart" ]; then
docker restart $WORKERMAN_CONTAINER_NAME
docker exec -itd $WORKERMAN_CONTAINER_NAME bash -c "php start.php restart"
elif [ "$1" = "status" ]; then
docker exec -it $WORKERMAN_CONTAINER_NAME bash -c "php start.php status"
elif [ "$1" = "reload" ]; then