Skip to content

Commit

Permalink
fix: use fs stores by default in Dockerfile (#147)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
achingbrain authored Apr 11, 2024
1 parent 1700c49 commit fa925a7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,19 @@ EXPOSE 8080

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

# use level datastore by default
ENV FILE_DATASTORE_PATH=/data/ipfs/datastore

# use filesystem blockstore by default
ENV FILE_BLOCKSTORE_PATH=/data/ipfs/blockstore

# enable metrics by default
ENV METRICS=true

# redirect ipfs/ipns paths to subdomains to prevent cookie theft by websites
# loaded via the gateway
ENV SUB_DOMAINS=true

# Use tini to handle signals properly, see https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#handling-kernel-signals
ENTRYPOINT ["/usr/bin/tini", "-p", "SIGKILL", "--"]

Expand Down

0 comments on commit fa925a7

Please sign in to comment.