Files
deploy/bash_scripts/README.md
Michael Feng 83003c01ee cleanups
2023-02-23 13:15:57 -08:00

73 lines
2.0 KiB
Markdown

# Docker commands
## Setup
The followings scripts assume that [Docker](https://www.docker.com/) has already been installed.
They also assume that the user has Docker permissions without requiring `sudo`. If you do not have these permissions:
1. Enter the following command:
```
sudo usermod -a -G docker $USER
```
2. Run the following command to change the permissions of all files with the ".sh" extension in the current directory, making them executable for all users.:
```
chmod a+x *.sh
```
3. Log out and log back into your console to enable them.
## Hummingbot Client
### Create an instance of Hummingbot
The `hummingbot-create.sh` script will create the folders needed to run Hummingbot and then install Hummingbot.
```
./hummingbot-create.sh
```
### Start up / connect to an instance of Hummingbot
The `hummingbot-start.sh` script will connect to a running instance of Hummingbot.
```
./hummingbot-start.sh
```
### Updating Hummingbot version
The `hummingbot-update.sh` script will update your instance to the latest version of Hummingbot.
```
./hummingbot-update.sh
```
## Gateway
### Create Gateway Instance
The `gateway-create.sh` script helps you pull, configure, and run the Gateway Docker image.
```
./gateway-create.sh
```
### Copy Hummingbot Certs
If you didn't do this step during `gateway-create.sh`, the `gateway-copy-certs.sh` script helps you copy the SSL certificates generated by Hummingbot into your Gateway files `certs` folder. This lets your Hummingbot instance access Gateway securely.
```
./gateway-copy-certs.sh
```
### Useful Commands
These commands assume a Gateway container with the default instance name `gateway`:
* List all Gateway containers: `docker ps -a --filter ancestor=hummingbot/gateway`
* Start Gateway container and attach to it: `docker start gateway && docker attach gateway`
* Stop Gateway container: `docker stop gateway`
* Update Gateway container to latest version: `docker pull hummingbot/gateway:latest`
* Remove Gateway container: `docker rm gateway`