mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
add more build from source details
This commit is contained in:
parent
a0f46bf9b8
commit
a540968533
|
@ -1,5 +1,7 @@
|
|||
# Build From Source
|
||||
|
||||
## Install Go SDK
|
||||
|
||||
Go to the Go official website to download the Go SDK <https://go.dev/dl/>.
|
||||
|
||||
An example installation looks like this:
|
||||
|
@ -28,12 +30,18 @@ Make sure your `go` is successfully installed:
|
|||
go version
|
||||
```
|
||||
|
||||
## Install go-sqlite
|
||||
|
||||
If you need to use go-sqlite, you will need to enable CGO first:
|
||||
|
||||
```
|
||||
CGO_ENABLED=1 go get github.com/mattn/go-sqlite3
|
||||
```
|
||||
|
||||
## Install
|
||||
|
||||
### Install bbgo via go install
|
||||
|
||||
Install bbgo:
|
||||
|
||||
```sh
|
||||
|
@ -64,6 +72,34 @@ export GOPATH=~/mygo
|
|||
|
||||
Then your bbgo will be installed at `~/mygo/bin/bbgo`.
|
||||
|
||||
### Install via git clone
|
||||
|
||||
```shell
|
||||
mkdir -p ~/go/src/github.com/c9s
|
||||
git clone git@github.com:c9s/bbgo.git ~/go/src/github.com/c9s/bbgo
|
||||
cd ~/go/src/github.com/c9s/bbgo
|
||||
go mod download
|
||||
```
|
||||
|
||||
And then you should be able to run bbgo with `go run`
|
||||
|
||||
```shell
|
||||
go run ./cmd/bbgo run
|
||||
```
|
||||
|
||||
You can also use the makefile to build bbgo:
|
||||
|
||||
```shell
|
||||
cd frontend && yarn install
|
||||
make bbgo
|
||||
```
|
||||
|
||||
If you don't need the web interface, you can build the slim version of bbgo:
|
||||
|
||||
```shell
|
||||
make bbgo-slim
|
||||
```
|
||||
|
||||
## Build inside a Alpine container
|
||||
|
||||
Starts a docker container with the alpine image:
|
||||
|
|
Loading…
Reference in New Issue
Block a user