From fa925a7598c37842d48ea47fc6e3900739411efd Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Thu, 11 Apr 2024 11:18:31 +0100 Subject: [PATCH] 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. --- Dockerfile | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Dockerfile b/Dockerfile index f5e7cd3..a02d66b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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", "--"]