make readmes consistent

This commit is contained in:
Michael Feng
2023-04-05 15:32:20 -07:00
parent 6ff8bbf507
commit 6bcdff4a3d
3 changed files with 46 additions and 37 deletions

View File

@@ -48,7 +48,7 @@ Auto-starting a script/strategy lets you start a bot from the command line, skip
1. Set the password used to encrypt your keys (`CONFIG_PASSWORD`) 1. Set the password used to encrypt your keys (`CONFIG_PASSWORD`)
2. Define your script or strategy config file (`CONFIG_FILE_NAME`) 2. Define your script or strategy config file (`CONFIG_FILE_NAME`)
### Set Hummingbot password ### 1. Set Hummingbot password
Pull the latest Hummingbot image and start it with the following command: Pull the latest Hummingbot image and start it with the following command:
``` ```
@@ -72,7 +72,7 @@ You should see the Hummingbot welcome screen:
Set your Hummingbot [password](https://docs.hummingbot.org/operation/password/) and write it down. This is the `CONFIG_PASSWORD` environment variable in your `docker-compose.yml` file. Set your Hummingbot [password](https://docs.hummingbot.org/operation/password/) and write it down. This is the `CONFIG_PASSWORD` environment variable in your `docker-compose.yml` file.
### Define script or strategy ### 2. Define script or strategy config file
You can auto-start either a Script or a Strategy. You can auto-start either a Script or a Strategy.
@@ -88,7 +88,7 @@ If you define a `.yml` file as `CONFIG_FILE_NAME`, Hummingbot assumes it's a str
See [`conf_pure_mm_1.yml`](./hummingbot_files/conf/strategies/conf_pure_mm_1.yml) for an example. See [`conf_pure_mm_1.yml`](./hummingbot_files/conf/strategies/conf_pure_mm_1.yml) for an example.
### Modify YAML file ### 3. Modify YAML file
Now, use an IDE like [VSCode](https://code.visualstudio.com/) to edit the `docker-compose.yml` file. Now, use an IDE like [VSCode](https://code.visualstudio.com/) to edit the `docker-compose.yml` file.
@@ -115,24 +115,38 @@ Remove the '#' to uncomment out:
Afterwards, save the file. Afterwards, save the file.
## Recreate container ## 4. Recreate container
Now, the script or strategy will auto-start when you create the container: Now, the script or strategy will auto-start when you create the container:
``` ```
docker-compose up -d docker-compose up -d
``` ```
You can attach to the container to inspect it running. If you stop the bot, creating the container will start it again. You can attach to the container to inspect it running:
```
docker attach autostart_hummingbot_compose-bot-1
```
## Useful Docker Commands ## Useful Docker Commands
Use the commands below or use the Docker Desktop application to manage your Hummingbot container: Use the commands below or use the Docker Desktop application to manage your Hummingbot container:
### Create the container ### Create the Compose network
``` ```
docker-compose up -d docker-compose up -d
``` ```
### Stop the Compose network
```
docker-compose down
```
### Update the Compose network for the latest images
```
docker-compose up --force-recreate --build -d
```
### Attach to the container ### Attach to the container
``` ```
docker attach autostart_hummingbot_compose-bot-1 docker attach autostart_hummingbot_compose-bot-1
@@ -140,13 +154,7 @@ docker attach autostart_hummingbot_compose-bot-1
### Detach from the container and return to command line ### Detach from the container and return to command line
Press keys <kbd>Ctrl</kbd> + <kbd>P</kbd> then <kbd>Ctrl</kbd> + <kbd>Q</kbd> * Press keys <kbd>Ctrl</kbd> + <kbd>P</kbd> then <kbd>Ctrl</kbd> + <kbd>Q</kbd>
### Update the container to the latest image
```
docker-compose up --force-recreate --build -d
```
### List all containers ### List all containers
``` ```

View File

@@ -48,7 +48,7 @@ Clone this repo or copy the `docker-compose.yml` file to a directory on your mac
To link the Hummingbot and Gateway instances, you first have to generate certificates within Hummingbot and set the `GATEWAY_PASSPHRASE` variable in the YAML file. To link the Hummingbot and Gateway instances, you first have to generate certificates within Hummingbot and set the `GATEWAY_PASSPHRASE` variable in the YAML file.
### Generate certificates ### 1. Generate certificates
Pull the latest Hummingbot and Gateway images and start instances with the following command: Pull the latest Hummingbot and Gateway images and start instances with the following command:
``` ```
@@ -96,7 +96,7 @@ You should see the following output:
⠿ Network hummingbot_gateway_compose_default Removed ⠿ Network hummingbot_gateway_compose_default Removed
``` ```
### Modify YAML file ### 2. Modify YAML file
Now, use an IDE like [VSCode](https://code.visualstudio.com/) to edit the `docker-compose.yml` file. Now, use an IDE like [VSCode](https://code.visualstudio.com/) to edit the `docker-compose.yml` file.
@@ -118,7 +118,7 @@ Remove the '#' to uncomment out:
Afterwards, save the file. Afterwards, save the file.
### Recreate container ### 3. Recreate container
Now, restart the container Now, restart the container
``` ```
@@ -147,6 +147,16 @@ Use the commands below or use the Docker Desktop application to manage your Humm
docker-compose up -d docker-compose up -d
``` ```
### Stop the Compose network
```
docker-compose down
```
### Update the Compose network for the latest images
```
docker-compose up --force-recreate --build -d
```
### Attach to the Hummingbot container ### Attach to the Hummingbot container
``` ```
docker attach hummingbot_gateway_compose-bot-1 docker attach hummingbot_gateway_compose-bot-1
@@ -159,25 +169,13 @@ docker attach hummingbot_gateway_compose-gateway-1
### Detach from the container and return to command line ### Detach from the container and return to command line
Press keys <kbd>Ctrl</kbd> + <kbd>P</kbd> then <kbd>Ctrl</kbd> + <kbd>Q</kbd> * Press keys <kbd>Ctrl</kbd> + <kbd>P</kbd> then <kbd>Ctrl</kbd> + <kbd>Q</kbd>
### Update the container to the latest image
```
docker-compose up --force-recreate --build -d
```
### List all containers ### List all containers
``` ```
docker ps -a docker ps -a
``` ```
### Stop the Compose network
```
docker-compose down
```
### Stop a container ### Stop a container
``` ```

View File

@@ -71,11 +71,21 @@ To get started with Hummingbot, check out the following docs:
Use the commands below or use the Docker Desktop application to manage your Hummingbot container: Use the commands below or use the Docker Desktop application to manage your Hummingbot container:
### Create the container ### Create the Compose network
``` ```
docker-compose up -d docker-compose up -d
``` ```
### Stop the Compose network
```
docker-compose down
```
### Update the Compose network for the latest images
```
docker-compose up --force-recreate --build -d
```
### Attach to the container ### Attach to the container
``` ```
docker attach simple_hummingbot_compose-bot-1 docker attach simple_hummingbot_compose-bot-1
@@ -97,13 +107,6 @@ docker ps -a
``` ```
### Stop a container ### Stop a container
```
docker-compose down
```
or:
``` ```
docker stop <instance-name> docker stop <instance-name>
``` ```