docker-compose.yml 文件如下
version: "3.8"
services:
splash:
image: scrapinghub/splash:3.5
networks:
- brige-network
spider:
build: ./
networks:
- brige-network
depends_on:
- splash
volumes:
- ./:/source
working_dir: /source
command: python entrypoint.py
networks:
brige-network:
spider 是一个用 scrapy 爬虫程序,依赖 splash 的服务,我希望爬虫程序执行完毕后自动关闭 splash 容器需要怎么改呢?