2023-10-24 16:00:55 +08:00
|
|
|
version: '3'
|
|
|
|
|
|
|
|
services:
|
|
|
|
master:
|
|
|
|
image: locustio/locust:latest
|
|
|
|
ports:
|
|
|
|
- "8089:8089"
|
|
|
|
volumes:
|
|
|
|
- .:/mnt/locust
|
|
|
|
working_dir: /mnt/locust
|
|
|
|
command: -f locustfile.py --master -H http://master:8089
|
|
|
|
networks:
|
|
|
|
- locust
|
|
|
|
|
|
|
|
worker:
|
|
|
|
image: locustio/locust:latest
|
|
|
|
volumes:
|
|
|
|
- .:/mnt/locust
|
|
|
|
working_dir: /mnt/locust
|
|
|
|
command: -f locustfile.py --worker --master-host master
|
|
|
|
deploy:
|
|
|
|
mode: replicated
|
2023-10-24 17:09:55 +08:00
|
|
|
replicas: 8
|
2023-10-24 16:00:55 +08:00
|
|
|
networks:
|
|
|
|
- locust
|
|
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
locust:
|
|
|
|
driver: bridge
|