mirror of
https://github.com/d0zingcat/deploy.git
synced 2026-05-20 23:16:47 +00:00
(feat) deployment scenarios
This commit is contained in:
47
multiple_hummingbot_gateway_compose/README.md
Normal file
47
multiple_hummingbot_gateway_compose/README.md
Normal file
@@ -0,0 +1,47 @@
|
||||
# Deploy: Hummingbot + Gateway
|
||||
|
||||
## 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
|
||||
```
|
||||
- If you attach the terminal of the bot2 you will see that it is running and the gateway is ONLINE.
|
||||
```
|
||||
docker attach hummingbot_gateway_compose-bot2-1
|
||||
```
|
||||
|
||||
## IMPORTANT
|
||||
|
||||
To simplify the example, we are sharing the folder of hummingbot_files between the two bots. You should have one folder for each bot,
|
||||
but the certs folder that you are sharing between the gateway and the bots should be the same.
|
||||
49
multiple_hummingbot_gateway_compose/docker-compose.yml
Normal file
49
multiple_hummingbot_gateway_compose/docker-compose.yml
Normal file
@@ -0,0 +1,49 @@
|
||||
version: "3.9"
|
||||
services:
|
||||
bot:
|
||||
image: hummingbot/hummingbot:latest
|
||||
volumes:
|
||||
- "./hummingbot_files/conf:/conf"
|
||||
- "./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
|
||||
|
||||
bot2:
|
||||
image: hummingbot/hummingbot:latest
|
||||
volumes:
|
||||
- "./hummingbot_files/conf:/conf"
|
||||
- "./hummingbot_files/logs:/logs"
|
||||
- "./hummingbot_files/data:/data"
|
||||
- "./hummingbot_files/scripts:/scripts"
|
||||
- "./hummingbot_files/certs:/certs"
|
||||
environment:
|
||||
- CONFIG_PASSWORD=a
|
||||
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
|
||||
Reference in New Issue
Block a user