This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3.8" | |
| services: | |
| ipfs: | |
| image: ipfs/go-ipfs:release | |
| ports: | |
| - "4001:4001" # ipfs swarm, expose this will help public nodes can communicate to this local node | |
| - "4001:4001/udp" # ipfs swarm UPD | |
| # - "5001:5001" # ipfs api - expose if needed/wanted | |
| - "8080:8080" # ipfs gateway, delete this later | |
| volumes: | |
| - ./data/ipfs:/data/ipfs | |
| ipfs-cluster-peer: | |
| image: ipfs/ipfs-cluster:latest | |
| depends_on: | |
| - ipfs | |
| environment: | |
| CLUSTER_SECRET: ${CLUSTER_SECRET} | |
| CLUSTER_CRDT_TRUSTEDPEERS: "*" # Trust all peers in Cluster | |
| CLUSTER_IPFSHTTP_NODEMULTIADDRESS: /dns4/ipfs/tcp/5001 | |
| # CLUSTER_IPFSHTTP_LISTENMULTIADDRESS: /dns4/ipfs/tcp/9095 # Expose IPFS daemon HTTP API | |
| CLUSTER_IPFSPROXY_NODEMULTIADDRESS: /dns4/ipfs/tcp/5001 | |
| CLUSTER_IPFSPROXY_LISTENMULTIADDRESS: /ip4/0.0.0.0/tcp/9095 # Expose cluster IPFS Proxy API | |
| CLUSTER_RESTAPI_CORSALLOWEDORIGINS: "*" | |
| CLUSTER_RESTAPI_CORSALLOWEDMETHODS: "GET,POST" | |
| CLUSTER_RESTAPI_HTTPLISTENMULTIADDRESS: /ip4/0.0.0.0/tcp/9094 # Expose cluster HTTP API | |
| CLUSTER_MONITORPINGINTERVAL: 2s # peer discovery | |
| CLUSTER_PEERADDRESSES: "${BOOTSTRAP_PEER_MULTIADDRESS}" | |
| # CLUSTER_REPLICATIONFACTORMIN: 2 | |
| # CLUSTER_REPLICATIONFACTORMAX: 3 | |
| # CLUSTER_DISABLEREPINNING: "false" | |
| CLUSTER_MDNSINTERVAL: "0" # Disable mDSN discovery because our cluster peers will run on different machines | |
| ports: | |
| - "9094:9094" # Cluster API | |
| - "9096:9096" # Cluster swarm (to connect to peers on other hosts, protected by secret key) | |
| - "9095:9095" # Cluster IPFS Proxy endpoint | |
| volumes: | |
| - ./data/ipfs-cluster-peer:/data/ipfs-cluster |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment