logos-messaging-simulator/docker-compose.yml
Tanya S 421688abbb
Add foundry to waku-simulator (#21)
* added foundry image to docker-compose and run_anvil script

* removed run_anvil script and moved the command to the docker-compose file

* formatted arguments for anvil command to use '='

* using specific foundry image and reformatted command arguments, previous didn't work
2024-02-23 10:48:02 +02:00

151 lines
3.9 KiB
YAML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: "3.7"
networks:
simulation:
driver: bridge
ipam:
driver: default
config:
- subnet: "10.1.0.0/22"
services:
foundry:
image: ghcr.io/foundry-rs/foundry:nightly-9b73e06e1fe376738b92ae081107620291d50188
labels:
com.centurylinklabs.watchtower.enable: '${WATCHTOWER_ENABLED:-false}'
command: >
"anvil
--port=8540
--chain-id=1337
--block-time=12
--accounts=1"
networks:
- simulation
bootstrap:
image: ${NWAKU_IMAGE:-wakuorg/nwaku:latest}
restart: on-failure
labels:
com.centurylinklabs.watchtower.enable: '${WATCHTOWER_ENABLED:-false}'
# TODO: expose some ports to inject traffic
ports:
- 127.0.0.1:60000:60000
- 127.0.0.1:8008:8008
- 127.0.0.1:9000:9000
- 127.0.0.1:8545:8545
entrypoint: sh
command:
- '/opt/run_bootstrap.sh'
volumes:
- ./run_bootstrap.sh:/opt/run_bootstrap.sh:Z
networks:
- simulation
nwaku:
image: ${NWAKU_IMAGE:-wakuorg/nwaku:latest}
restart: on-failure
labels:
com.centurylinklabs.watchtower.enable: '${WATCHTOWER_ENABLED:-false}'
deploy:
replicas: ${NUM_NWAKU_NODES:-5}
entrypoint: sh
command:
- '/opt/run_nwaku.sh'
volumes:
- ./run_nwaku.sh:/opt/run_nwaku.sh:Z
depends_on:
- bootstrap
- foundry
networks:
- simulation
gowaku:
image: ${GOWAKU_IMAGE:-wakuorg/go-waku:latest}
restart: on-failure
labels:
com.centurylinklabs.watchtower.enable: '${WATCHTOWER_ENABLED:-false}'
deploy:
replicas: ${NUM_GOWAKU_NODES:-0}
entrypoint: sh
command:
- '/opt/run_gowaku.sh'
volumes:
- ./run_gowaku.sh:/opt/run_gowaku.sh:Z
depends_on:
- bootstrap
rest-traffic:
build:
context: .
dockerfile: Dockerfile.rest-traffic
command: >
python /opt/traffic.py
--multiple-nodes=http://waku-simulator_nwaku_[1..${NUM_NWAKU_NODES:-5}]:8645
--msg-size-kbytes=${MSG_SIZE_KBYTES:-10}
--delay-seconds=${TRAFFIC_DELAY_SECONDS:-15}
volumes:
- ./traffic.py:/opt/traffic.py:Z
networks:
- simulation
depends_on:
- nwaku
prometheus:
image: prom/prometheus:latest
volumes:
- ./monitoring/prometheus-config.yml:/etc/prometheus/prometheus.yml:z
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.retention.time=7d
ports:
- 127.0.0.1:9090:9090
restart: on-failure
networks:
- simulation
grafana:
image: grafana/grafana:latest
env_file:
- ./monitoring/configuration/grafana-plugins.env
volumes:
- ./monitoring/configuration/grafana.ini:/etc/grafana/grafana.ini:z
- ./monitoring/configuration/dashboards.yaml:/etc/grafana/provisioning/dashboards/dashboards.yaml:z
- ./monitoring/configuration/datasources.yaml:/etc/grafana/provisioning/datasources/datasources.yaml:z
- ./monitoring/configuration/dashboards:/var/lib/grafana/dashboards/:z
- ./monitoring/configuration/customizations/custom-logo.svg:/usr/share/grafana/public/img/grafana_icon.svg:z
- ./monitoring/configuration/customizations/custom-logo.svg:/usr/share/grafana/public/img/grafana_typelogo.svg:z
- ./monitoring/configuration/customizations/custom-logo.png:/usr/share/grafana/public/img/fav32.png:z
ports:
#- 127.0.0.1:3000:3000
# open port to access the dashboard
- 3000:3000
restart: on-failure
depends_on:
- prometheus
networks:
- simulation
cadvisor:
image: gcr.io/cadvisor/cadvisor:latest
container_name: cadvisor
#ports:
# - 8080:8080
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
depends_on:
- redis
networks:
- simulation
redis:
image: redis:latest
container_name: redis
#ports:
# - 6379:6379
networks:
- simulation