Commit 09c4c558 by 纪相明

u

parent 248a7627
...@@ -58,7 +58,7 @@ services: ...@@ -58,7 +58,7 @@ services:
networks: networks:
net: net:
ipv4_address: ${DOCKER_IP_PREFIX}.5 ipv4_address: ${DOCKER_IP_PREFIX}.5
schedule: crontab:
restart: always restart: always
build: build:
context: ./docker/php context: ./docker/php
...@@ -67,12 +67,10 @@ services: ...@@ -67,12 +67,10 @@ services:
environment: environment:
- TZ=${TZ} - TZ=${TZ}
# - XDEBUG_CONFIG=client_host=${DOCKER_IP_PREFIX}.1 # - XDEBUG_CONFIG=client_host=${DOCKER_IP_PREFIX}.1
user: "${PHP_FPM_UID}"
deploy: deploy:
replicas: ${ENABLE_SCHEDULE_SERVICE} replicas: ${ENABLE_CRONTAB_SERVICE}
networks: networks:
net: net:
ipv4_address: ${DOCKER_IP_PREFIX}.6 ipv4_address: ${DOCKER_IP_PREFIX}.6
entrypoint: entrypoint:
[ "/var/www/artisan", "schedule:run" ] [ "cron", "-f" ]
...@@ -19,3 +19,7 @@ TZ=Asia/Shanghai ...@@ -19,3 +19,7 @@ TZ=Asia/Shanghai
# #
# 每分钟检测一次服务是否正常运行 # 每分钟检测一次服务是否正常运行
* * * * * root /bin/date "+%Y-%m-%d %H:%M:%S" >> /tmp/test-crontab.log 2>&1
* * * * * root /var/www/artisan schedule:run >> /tmp/schedule-run.log 2>&1
daemonize no daemonize no
timeout 0 timeout 0
databases 16 databases 16
requirepass 123456
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment