Skip to content

Commit

Permalink
postgresql docker compose and archiver config
Browse files Browse the repository at this point in the history
  • Loading branch information
bianyuanop committed Jan 30, 2024
1 parent 36eb9fa commit 18bc3fc
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
2 changes: 2 additions & 0 deletions archiver/orm_archiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package archiver

import (
"encoding/json"
"log"
"strings"

"github.com/AnomalyFi/hypersdk/chain"
Expand Down Expand Up @@ -51,6 +52,7 @@ func NewORMArchiverFromConfigBytes(configBytes []byte) (*ORMArchiver, error) {
DSN: conf.DSN,
PreferSimpleProtocol: true,
}))
log.Println("using postgresql as archiver")
if err != nil {
return nil, err
}
Expand Down
1 change: 1 addition & 0 deletions archiver_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"enabled":true,"archiverType":"postgresql","dsn":"host=localhost user=seq password=longsecretforseq dbname=seqdb port=5432 sslmode=disable"}
5 changes: 5 additions & 0 deletions main.log
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,8 @@
[01-30|10:27:32.932] INFO client/client.go:156 create blockchains
[01-30|10:29:45.110] INFO client/client.go:225 status
[01-30|10:30:06.217] INFO client/client.go:277 stop
[01-30|10:40:56.864] DEBUG client/client.go:78 dialing server at {"endpoint": "0.0.0.0:12352"}
[01-30|10:40:56.865] INFO client/client.go:147 start
[01-30|10:41:10.100] INFO client/client.go:156 create blockchains
[01-30|10:43:17.122] INFO client/client.go:225 status
[01-30|10:43:31.216] INFO client/client.go:277 stop
13 changes: 13 additions & 0 deletions postgresql-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '3.9'

services:
postgres:
image: postgres:14-alpine
ports:
- 5432:5432
volumes:
- /tmp/postgresql:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=longsecretforseq
- POSTGRES_USER=seq
- POSTGRES_DB=seqdb
Binary file modified tests/e2e/e2e.test
Binary file not shown.

0 comments on commit 18bc3fc

Please sign in to comment.