Skip to content

Commit fa925a7

Browse files
authored
fix: use fs stores by default in Dockerfile (#147)
This is to better align with Kubo's behaviour and also stops the containers running out of memory really quickly since in-memory stores aren't really meant for production use. Also turns on metrics by default and explicitly enables sub domains.
1 parent 1700c49 commit fa925a7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,19 @@ EXPOSE 8080
3636

3737
HEALTHCHECK --interval=12s --timeout=12s --start-period=10s CMD node dist/src/healthcheck.js
3838

39+
# use level datastore by default
40+
ENV FILE_DATASTORE_PATH=/data/ipfs/datastore
41+
42+
# use filesystem blockstore by default
43+
ENV FILE_BLOCKSTORE_PATH=/data/ipfs/blockstore
44+
45+
# enable metrics by default
46+
ENV METRICS=true
47+
48+
# redirect ipfs/ipns paths to subdomains to prevent cookie theft by websites
49+
# loaded via the gateway
50+
ENV SUB_DOMAINS=true
51+
3952
# Use tini to handle signals properly, see https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#handling-kernel-signals
4053
ENTRYPOINT ["/usr/bin/tini", "-p", "SIGKILL", "--"]
4154

0 commit comments

Comments
 (0)