mirror of https://gitlab.com/ecentrics/concordia
Browse Source
Fix/fix service integrations and urls See merge request ecentrics/concordia!19develop
Apostolos Fanakis
4 years ago
26 changed files with 97 additions and 73 deletions
@ -1,4 +1,4 @@ |
|||
# Variables needed in runtime (in browser) |
|||
REACT_APP_RENDEZVOUS_HOST=127.0.0.1 |
|||
REACT_APP_RENDEZVOUS_HOST=/ip4/127.0.0.1 |
|||
REACT_APP_RENDEZVOUS_PORT=9090 |
|||
USE_EXTERNAL_CONTRACTS_PROVIDER=true |
|||
|
@ -1,2 +1,3 @@ |
|||
UPLOAD_CONTRACTS_DIRECTORY=/mnt/concordia/contracts/ |
|||
LOGS_PATH=/mnt/concordia/logs/ |
|||
#CORS_ALLOWED_ORIGINS="http://127.0.0.1:7000;http://localhost:7000;http://127.0.0.1:4444;127.0.0.1:4444" |
|||
|
@ -1,4 +1,5 @@ |
|||
import path from 'path'; |
|||
|
|||
export const ORBIT_DIRECTORY_DEFAULT = path.join(__dirname, '..', 'orbitdb'); |
|||
export const IPFS_DIRECTORY_DEFAULT = path.join(__dirname, '..', 'ipfs'); |
|||
export const LOGS_PATH = path.join(__dirname, '..', 'logs'); |
|||
|
@ -1,30 +1,35 @@ |
|||
import getLibp2pBundle from './libp2pBundle'; |
|||
import { getSwarmAddresses } from '../utils/ipfsUtils'; |
|||
import { logger } from '../utils/logger'; |
|||
import { IPFS_DIRECTORY_DEFAULT } from '../constants'; |
|||
|
|||
const getIpfsOptions = async () => getSwarmAddresses() |
|||
.then((swarmAddresses) => { |
|||
logger.info(`Swarm addresses used: ${swarmAddresses.join(', ')}`); |
|||
return swarmAddresses; |
|||
}) |
|||
.then((swarmAddresses) => ({ |
|||
repo: 'ipfs', |
|||
config: { |
|||
Profile: 'server', |
|||
Addresses: { |
|||
Swarm: swarmAddresses, |
|||
}).then((swarmAddresses) => { |
|||
const IPFS_DIRECTORY = process.env.IPFS_DIRECTORY || IPFS_DIRECTORY_DEFAULT; |
|||
logger.info(`Setting up IPFS in repo: ${IPFS_DIRECTORY}`); |
|||
|
|||
return ({ |
|||
repo: IPFS_DIRECTORY, |
|||
config: { |
|||
Profile: 'server', |
|||
Addresses: { |
|||
Swarm: swarmAddresses, |
|||
}, |
|||
}, |
|||
libp2p: getLibp2pBundle(swarmAddresses), |
|||
EXPERIMENTAL: { |
|||
pubsub: true, |
|||
}, |
|||
preload: { |
|||
enabled: false, |
|||
}, |
|||
init: { |
|||
emptyRepo: true, |
|||
}, |
|||
}, |
|||
libp2p: getLibp2pBundle(swarmAddresses), |
|||
EXPERIMENTAL: { |
|||
pubsub: true, |
|||
}, |
|||
preload: { |
|||
enabled: false, |
|||
}, |
|||
init: { |
|||
emptyRepo: true, |
|||
}, |
|||
})); |
|||
}); |
|||
}); |
|||
|
|||
export default getIpfsOptions; |
|||
|
@ -1,5 +0,0 @@ |
|||
const { rendezvousHost, rendezvousPort } = require('../environment/interpolated/rendezvous'); |
|||
|
|||
const getRendezvousUrl = () => `http://${rendezvousHost}:${rendezvousPort}`; |
|||
|
|||
module.exports = getRendezvousUrl; |
Loading…
Reference in new issue