From 9f53d682472c7c86b4f02acaeb66e520af63a641 Mon Sep 17 00:00:00 2001 From: david-hummingbot Date: Fri, 13 Sep 2024 23:03:34 +0000 Subject: [PATCH] add dydx compose --- docker-compose-dydx.yml | 70 +++++++++++++++++++++++++++++++++++++++++ setup_dydx.sh | 12 +++++++ 2 files changed, 82 insertions(+) create mode 100644 docker-compose-dydx.yml create mode 100644 setup_dydx.sh diff --git a/docker-compose-dydx.yml b/docker-compose-dydx.yml new file mode 100644 index 0000000..4f80c90 --- /dev/null +++ b/docker-compose-dydx.yml @@ -0,0 +1,70 @@ +services: + dashboard: + container_name: dashboard + image: hummingbot/dashboard:dydx + ports: + - "8501:8501" + environment: + - AUTH_SYSTEM_ENABLED=False + - BACKEND_API_HOST=backend-api + - BACKEND_API_PORT=8000 + volumes: + - ./credentials.yml:/home/dashboard/credentials.yml + - ./pages:/home/dashboard/frontend/pages + networks: + - emqx-bridge + backend-api: + container_name: backend-api + image: hummingbot/backend-api:dydx + ports: + - "8000:8000" + volumes: + - ./bots:/backend-api/bots + - /var/run/docker.sock:/var/run/docker.sock + env_file: + - .env + environment: + - BROKER_HOST=emqx + - BROKER_PORT=1883 + networks: + - emqx-bridge + emqx: + container_name: hummingbot-broker + image: emqx:5 + restart: unless-stopped + environment: + - EMQX_NAME=emqx + - EMQX_HOST=node1.emqx.local + - EMQX_CLUSTER__DISCOVERY_STRATEGY=static + - EMQX_CLUSTER__STATIC__SEEDS=[emqx@node1.emqx.local] + - EMQX_LOADED_PLUGINS="emqx_recon,emqx_retainer,emqx_management,emqx_dashboard" + volumes: + - emqx-data:/opt/emqx/data + - emqx-log:/opt/emqx/log + - emqx-etc:/opt/emqx/etc + ports: + - "1883:1883" # mqtt:tcp + - "8883:8883" # mqtt:tcp:ssl + - "8083:8083" # mqtt:ws + - "8084:8084" # mqtt:ws:ssl + - "8081:8081" # http:management + - "18083:18083" # http:dashboard + - "61613:61613" # web-stomp gateway + networks: + emqx-bridge: + aliases: + - node1.emqx.local + healthcheck: + test: [ "CMD", "/opt/emqx/bin/emqx_ctl", "status" ] + interval: 5s + timeout: 25s + retries: 5 + +networks: + emqx-bridge: + driver: bridge + +volumes: + emqx-data: { } + emqx-log: { } + emqx-etc: { } diff --git a/setup_dydx.sh b/setup_dydx.sh new file mode 100644 index 0000000..be70067 --- /dev/null +++ b/setup_dydx.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Pulling the required Docker images +docker compose pull +docker pull hummingbot/hummingbot:latest_dydx + +# Creating .env file with the required environment variables +echo "CONFIG_PASSWORD=a" > .env +echo "BOTS_PATH=$(pwd)" >> .env + +# Running docker-compose in detached mode +docker compose -f docker-compose-dydx.yml up -d \ No newline at end of file