From 3a3376c303dce1992bec79df609f195af7d9082f Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Fri, 3 Sep 2021 11:27:27 -0700 Subject: [PATCH] fix(docker): Specifying max size for log files --- production/docker/docker-compose.yml | 54 +++++++++++++++------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/production/docker/docker-compose.yml b/production/docker/docker-compose.yml index 8fa994d..6135031 100644 --- a/production/docker/docker-compose.yml +++ b/production/docker/docker-compose.yml @@ -1,28 +1,32 @@ -# Start the testnet server with the command 'docker-compose up -d' +# Start the service with the command 'docker-compose up -d' -mongo-ipfs-service: - image: mongo - container_name: mongo-ipfs-service - ports: - - '5555:27017' # : - volumes: - - ../data/database:/data/db - command: mongod --logpath=/dev/null # -- quiet - restart: always +version: '2' -ipfs-service: - build: . - dockerfile: Dockerfile - container_name: ipfs-service - links: - - mongo-ipfs-service - ports: - - '5001:5001' # : - - '4001:4001' # IPFS TCP - - '4003:4003' # IPFS WS - volumes: - # - ./logs:/home/coinjoin/consolidating-coinjoin/logs - #- ./keys:/home/safeuser/keys - - ../data/ipfsdata:/home/safeuser/ipfs-service-provider/.ipfsdata +services: + mongo-ipfs-service: + image: mongo + container_name: mongo-ipfs-service + ports: + - '5555:27017' # : + volumes: + - ../data/database:/data/db + command: mongod --logpath=/dev/null # -- quiet + restart: always - restart: always + ipfs-service: + build: . + container_name: ipfs-service + logging: + driver: 'json-file' + options: + max-size: '10m' + max-file: '10' + links: + - mongo-ipfs-service + ports: + - '5001:5001' # : + - '4001:4001' # IPFS TCP + - '4003:4003' # IPFS WS + volumes: + - ../data/ipfsdata:/home/safeuser/ipfs-service-provider/.ipfsdata + restart: always