Use Docker volumes to persist the dbs.
This commit is contained in:
parent
fd5748bd50
commit
0641af8232
|
@ -17,7 +17,11 @@ RUN apk add --no-cache ca-certificates bash
|
|||
COPY --from=builder /go/src/github.com/mandrigin/status-go-bots/pinger /usr/local/bin/
|
||||
COPY --from=builder /go/src/github.com/mandrigin/status-go-bots/chanreader /usr/local/bin/
|
||||
|
||||
VOLUME ["/tmp/sg_bots"]
|
||||
WORKDIR /etc/gs-bots/
|
||||
COPY --from=builder /go/src/github.com/mandrigin/status-go-bots/_assets ./_assets
|
||||
|
||||
RUN mkdir -p /data/sg_bots
|
||||
VOLUME "/data/sg_bots"
|
||||
|
||||
# 30304 is used for Discovery v5
|
||||
EXPOSE 8080 8545 30303 30303/udp 30304/udp
|
||||
|
|
|
@ -85,7 +85,7 @@ func NodeConfig() (*params.NodeConfig, error) {
|
|||
}
|
||||
}`
|
||||
|
||||
cwd := "/tmp/sg_bots/node"
|
||||
cwd := "/data/sg_bots/node"
|
||||
|
||||
config := fmt.Sprintf(configFormat, cwd, cwd, cwd, cwd)
|
||||
return params.LoadNodeConfig(config)
|
||||
|
|
|
@ -27,7 +27,7 @@ type messagesStore struct {
|
|||
}
|
||||
|
||||
func NewMessagesStore(maxCount int) *messagesStore {
|
||||
db, err := leveldb.OpenFile("/tmp/sg_bots/sg_spectator/messages_store", nil)
|
||||
db, err := leveldb.OpenFile("/data/sg_bots/sg_spectator/messages_store", nil)
|
||||
if err != nil {
|
||||
log.Fatal("can't open levelDB file. ERR: %v", err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue