services: web: build: . volumes: - ./:/www/ - redis-socket:/run/redis-socket environment: - docker=true depends_on: - redis network_mode: host command: php artisan octane:start --server="swoole" --port=8000 restart: on-failure horizon: build: . volumes: - ./:/www/ - redis-socket:/run/redis-socket restart: on-failure network_mode: host command: php artisan horizon depends_on: - redis redis: build: context: .docker/services/redis restart: on-failure volumes: - ./.docker/.data/redis:/data/ # 挂载redis持久化数据 - redis-socket:/run/redis-socket volumes: redis-socket: