mirror of
https://github.com/d0zingcat/deploy.git
synced 2026-05-14 15:09:44 +00:00
Merge branch 'main' of github.com:hummingbot/deploy-examples into development
This commit is contained in:
@@ -4,6 +4,8 @@ services:
|
||||
image: hummingbot/hummingbot:latest
|
||||
volumes:
|
||||
- "./hummingbot_files/conf:/conf"
|
||||
- "./hummingbot_files/conf/connectors:/conf/connectors"
|
||||
- "./hummingbot_files/conf/strategies:/conf/strategies"
|
||||
- "./hummingbot_files/logs:/logs"
|
||||
- "./hummingbot_files/data:/data"
|
||||
- "./hummingbot_files/scripts:/scripts"
|
||||
|
||||
@@ -152,7 +152,7 @@ create_instance () {
|
||||
prompt_existing_certs_path
|
||||
|
||||
# Launch a new instance of gateway
|
||||
docker run \
|
||||
docker run -d \
|
||||
--name $INSTANCE_NAME \
|
||||
-p $GATEWAY_PORT:15888 \
|
||||
-p $DOCS_PORT:8080 \
|
||||
@@ -169,4 +169,4 @@ then
|
||||
else
|
||||
echo "Aborted"
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -87,6 +87,8 @@ create_instance () {
|
||||
--name $INSTANCE_NAME \
|
||||
--network host \
|
||||
-v $CONF_FOLDER:/conf \
|
||||
-v $CONF_FOLDER/connectors:/conf/connectors \
|
||||
-v $CONF_FOLDER/strategies:/conf/strategies \
|
||||
-v $LOGS_FOLDER:/logs \
|
||||
-v $DATA_FOLDER:/data \
|
||||
-v $PMM_SCRIPTS_FOLDER:/pmm_scripts \
|
||||
|
||||
@@ -105,12 +105,14 @@ execute_docker () {
|
||||
docker run -itd --log-opt max-size=10m --log-opt max-file=5 \
|
||||
--network host \
|
||||
--name ${INSTANCES[$j]} \
|
||||
-v $CONF_FOLDER:/conf \
|
||||
-v $LOGS_FOLDER:/logs \
|
||||
-v $DATA_FOLDER:/data \
|
||||
-v $PMM_SCRIPTS_FOLDER:/pmm_scripts \
|
||||
-v $SCRIPTS_FOLDER:/scripts \
|
||||
-v $CERTS_FOLDER:/certs \
|
||||
-v ${FOLDERS[$j]}/conf:/conf \
|
||||
-v ${FOLDERS[$j]}/conf/connectors:/conf/connectors \
|
||||
-v ${FOLDERS[$j]}/conf/strategies:/conf/strategies \
|
||||
-v ${FOLDERS[$j]}/logs:/logs \
|
||||
-v ${FOLDERS[$j]}/data:/data \
|
||||
-v ${FOLDERS[$j]}/pmm-scripts:/pmm-scripts \
|
||||
-v ${FOLDERS[$j]}/scripts:/scripts \
|
||||
-v ${FOLDERS[$j]}/certs:/certs \
|
||||
hummingbot/hummingbot:$TAG
|
||||
j=$[$j+1]
|
||||
# Update file ownership
|
||||
@@ -145,4 +147,4 @@ then
|
||||
else
|
||||
echo " Update aborted"
|
||||
echo
|
||||
fi
|
||||
fi
|
||||
|
||||
62
hummingbot_gateway_broker_compose/README.md
Normal file
62
hummingbot_gateway_broker_compose/README.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# Deploy: Hummingbot + Gateway (DEX Connectors) + EMQX Message Broker (MQTT feature)
|
||||
|
||||
This docker compose deployment includes Gateway and EMQX broker. Though it is
|
||||
recommended to use the standalone deployments for message brokers from the [hummingbot/brokers](https://github.com/hummingbot/brokers)
|
||||
repository.
|
||||
|
||||
After deploying for the first time, you can navigate to the EMQX dashboard
|
||||
to configure authentication and available ports at http://localhost:18083/.
|
||||
The default credentials for connecting to the dashboards are `admin:public`.
|
||||
For connecting your bots via MQTT, just leave the `mqtt_username` and
|
||||
`mqtt_password` parameters of the bot empty.
|
||||
|
||||
## How to use it
|
||||
|
||||
You will need to have the certificates for the gateway and hummingbot under the folder hummingbot_files/certs. If you don't have it, don't worry, you can generate them with the client by doing the following:
|
||||
|
||||
- Make sure you have docker and docker-compose installed.
|
||||
- Run the following command in the terminal:
|
||||
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
- You will see that the gateway failed to start because you don't have the certificates
|
||||
- Attach the instance of the bot by running:
|
||||
|
||||
```
|
||||
docker attach hummingbot_gateway_compose-bot-1
|
||||
```
|
||||
|
||||
- Create the password
|
||||
- Run the following command in the client:
|
||||
|
||||
```
|
||||
gateway generate-certs
|
||||
```
|
||||
|
||||
- When prompted enter the passphrase that you want. Is important that you change the docker-compose.yml on line 18 to the passphrase that you entered (the current passphrase is `a`).
|
||||
- Exit the client and run the following command in the terminal:
|
||||
|
||||
```
|
||||
docker-compose down
|
||||
```
|
||||
|
||||
- You will see that inside the hummingbot_files/certs folder you have the certificates.
|
||||
- We are ready to deploy the gateway and hummingbot, run the following command in the terminal:
|
||||
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
- If you attach the terminal of the gateway you will see that it is running.
|
||||
|
||||
```
|
||||
docker attach hummingbot_gateway_compose-gateway-1
|
||||
```
|
||||
|
||||
- If you attach the terminal of the bot you will see that it is running and the gateway is ONLINE.
|
||||
|
||||
```
|
||||
docker attach hummingbot_gateway_compose-bot-1
|
||||
```
|
||||
61
hummingbot_gateway_broker_compose/docker-compose.yml
Normal file
61
hummingbot_gateway_broker_compose/docker-compose.yml
Normal file
@@ -0,0 +1,61 @@
|
||||
version: "3.9"
|
||||
services:
|
||||
bot:
|
||||
image: hummingbot/hummingbot:latest
|
||||
volumes:
|
||||
- "./hummingbot_files/conf:/conf"
|
||||
- "./hummingbot_files/conf/connectors:/conf/connectors"
|
||||
- "./hummingbot_files/conf/strategies:/conf/strategies"
|
||||
- "./hummingbot_files/logs:/logs"
|
||||
- "./hummingbot_files/data:/data"
|
||||
- "./hummingbot_files/scripts:/scripts"
|
||||
- "./hummingbot_files/certs:/certs"
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
max-file: 5
|
||||
tty: true
|
||||
stdin_open: true
|
||||
network_mode: host
|
||||
|
||||
gateway:
|
||||
image: hummingbot/gateway:latest
|
||||
ports:
|
||||
- "15888:15888"
|
||||
- "8080:8080"
|
||||
volumes:
|
||||
- "./gateway_files/conf:/usr/src/app/conf"
|
||||
- "./gateway_files/logs:/usr/src/app/logs"
|
||||
- "./hummingbot_files/certs:/usr/src/app/certs"
|
||||
environment:
|
||||
- GATEWAY_PASSPHRASE=a
|
||||
|
||||
emqx:
|
||||
image: emqx:5
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- EMQX_NAME=emqx
|
||||
- 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
|
||||
healthcheck:
|
||||
test: ["CMD", "/opt/emqx/bin/emqx_ctl", "status"]
|
||||
interval: 5s
|
||||
timeout: 25s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
emqx-data: {}
|
||||
emqx-log: {}
|
||||
emqx-etc: {}
|
||||
@@ -4,6 +4,8 @@ services:
|
||||
image: hummingbot/hummingbot:latest
|
||||
volumes:
|
||||
- "./hummingbot_files/conf:/conf"
|
||||
- "./hummingbot_files/conf/connectors:/conf/connectors"
|
||||
- "./hummingbot_files/conf/strategies:/conf/strategies"
|
||||
- "./hummingbot_files/logs:/logs"
|
||||
- "./hummingbot_files/data:/data"
|
||||
- "./hummingbot_files/scripts:/scripts"
|
||||
|
||||
@@ -4,6 +4,8 @@ services:
|
||||
image: hummingbot/hummingbot:latest
|
||||
volumes:
|
||||
- "./hummingbot_files/conf:/conf"
|
||||
- "./hummingbot_files/conf/connectors:/conf/connectors"
|
||||
- "./hummingbot_files/conf/strategies:/conf/strategies"
|
||||
- "./hummingbot_files/logs:/logs"
|
||||
- "./hummingbot_files/data:/data"
|
||||
- "./hummingbot_files/scripts:/scripts"
|
||||
@@ -21,6 +23,8 @@ services:
|
||||
image: hummingbot/hummingbot:latest
|
||||
volumes:
|
||||
- "./hummingbot_files/conf:/conf"
|
||||
- "./hummingbot_files/conf/connectors:/conf/connectors"
|
||||
- "./hummingbot_files/conf/strategies:/conf/strategies"
|
||||
- "./hummingbot_files/logs:/logs"
|
||||
- "./hummingbot_files/data:/data"
|
||||
- "./hummingbot_files/scripts:/scripts"
|
||||
|
||||
@@ -4,6 +4,8 @@ services:
|
||||
image: hummingbot/hummingbot:latest
|
||||
volumes:
|
||||
- "./hummingbot_files/conf:/conf"
|
||||
- "./hummingbot_files/conf/connectors:/conf/connectors"
|
||||
- "./hummingbot_files/conf/strategies:/conf/strategies"
|
||||
- "./hummingbot_files/logs:/logs"
|
||||
- "./hummingbot_files/data:/data"
|
||||
- "./hummingbot_files/scripts:/scripts"
|
||||
|
||||
Reference in New Issue
Block a user