-
Notifications
You must be signed in to change notification settings - Fork 0
/
litefs.yml
56 lines (42 loc) · 1.63 KB
/
litefs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
fuse:
# Required. This is the mount directory that applications will
# use to access their SQLite databases.
dir: "/litefs"
data:
dir: "/var/lib/litefs"
# If true, compresses LTX files using LZ4 compression. Enabled by default.
compress: true
# Duration to keep LTX files. Latest LTX file is always kept.
retention: "10m"
# Frequency with which to check for LTX files to delete.
retention-monitor-interval: "1m"
# Execute this subprocess once LiteFS connects to the cluster.
exec:
- cmd: "bun run migrate"
if-candidate: true
- cmd: "bun run src/main.ts"
lease:
type: "consul"
# Specifies if this node can become primary. The expression below evaluates
# to true on nodes that are run in the primary region. Nodes in other regions
# act as non-candidate, read-only replicas.
candidate: ${FLY_REGION == PRIMARY_REGION}
# If true, then the node will automatically become primary after it has
# connected with the cluster and sync'd up. This makes it easier to run
# migrations on start up.
promote: true
# The API URL that other nodes will use to connect to this node.
advertise-url: "http://${FLY_ALLOC_ID}.vm.${FLY_APP_NAME}.internal:20202"
consul:
# The URL of the Consul cluster.
url: "${FLY_CONSUL_URL}"
# A unique key shared by all nodes in the LiteFS cluster.
# Change this if you are running multiple clusters in a single app!
key: "${FLY_APP_NAME}/primary"
proxy:
# Bind address for the proxy to listen on.
addr: ":3000"
# Hostport of your application.
target: "localhost:3001"
# Filename of the SQLite database you want to use for TXID tracking.
db: "db.sqlite"