Browse Source

Merge branch 'develop' into feature/pagination

develop
Ezerous 4 years ago
parent
commit
f8c5e38fef
  1. 4
      jenkins/env/concordia.production.jenkins.env
  2. 4
      jenkins/env/concordia.staging.jenkins.env
  3. 4
      jenkins/env/contracts.provider.production.env
  4. 6
      jenkins/env/contracts.provider.staging.env
  5. 4
      jenkins/env/ganache.production.jenkins.env
  6. 4
      jenkins/env/ganache.staging.jenkins.env
  7. 4
      jenkins/env/pinner.production.jenkins.env
  8. 4
      jenkins/env/pinner.staging.jenkins.env
  9. 4
      jenkins/env/rendezvous.jenkins.env
  10. 12
      packages/concordia-pinner/src/index.js
  11. 3
      yarn.lock

4
jenkins/env/concordia.production.jenkins.env

@ -1,6 +1,6 @@
VIRTUAL_HOST=concordia.ecentrics.net VIRTUAL_HOST=concordia.ecentrics.net,www.concordia.ecentrics.net
VIRTUAL_PORT=7777 VIRTUAL_PORT=7777
LETSENCRYPT_HOST=concordia.ecentrics.net LETSENCRYPT_HOST=concordia.ecentrics.net,www.concordia.ecentrics.net
LETSENCRYPT_EMAIL=ecentricsgr@gmail.com LETSENCRYPT_EMAIL=ecentricsgr@gmail.com
# Variables needed in runtime (in browser) # Variables needed in runtime (in browser)

4
jenkins/env/concordia.staging.jenkins.env

@ -1,6 +1,6 @@
VIRTUAL_HOST=staging.concordia.ecentrics.net VIRTUAL_HOST=staging.concordia.ecentrics.net,www.staging.concordia.ecentrics.net
VIRTUAL_PORT=7000 VIRTUAL_PORT=7000
LETSENCRYPT_HOST=staging.concordia.ecentrics.net LETSENCRYPT_HOST=staging.concordia.ecentrics.net,www.staging.concordia.ecentrics.net
LETSENCRYPT_EMAIL=ecentricsgr@gmail.com LETSENCRYPT_EMAIL=ecentricsgr@gmail.com
# Variables needed in runtime (in browser) # Variables needed in runtime (in browser)

4
jenkins/env/contracts.provider.production.env

@ -1,6 +1,6 @@
VIRTUAL_HOST=contracts.concordia.ecentrics.net VIRTUAL_HOST=contracts.concordia.ecentrics.net,www.contracts.concordia.ecentrics.net
VIRTUAL_PORT=8400 VIRTUAL_PORT=8400
LETSENCRYPT_HOST=contracts.concordia.ecentrics.net LETSENCRYPT_HOST=contracts.concordia.ecentrics.net,www.contracts.concordia.ecentrics.net
LETSENCRYPT_EMAIL=ecentricsgr@gmail.com LETSENCRYPT_EMAIL=ecentricsgr@gmail.com
CONTRACTS_PROVIDER_PORT=8400 CONTRACTS_PROVIDER_PORT=8400

6
jenkins/env/contracts.provider.staging.env

@ -1,9 +1,9 @@
VIRTUAL_HOST=staging.contracts.concordia.ecentrics.net VIRTUAL_HOST=staging.contracts.concordia.ecentrics.net,www.staging.contracts.concordia.ecentrics.net
VIRTUAL_PORT=8450 VIRTUAL_PORT=8450
LETSENCRYPT_HOST=staging.contracts.concordia.ecentrics.net LETSENCRYPT_HOST=staging.contracts.concordia.ecentrics.net,www.staging.contracts.concordia.ecentrics.net
LETSENCRYPT_EMAIL=ecentricsgr@gmail.com LETSENCRYPT_EMAIL=ecentricsgr@gmail.com
CONTRACTS_PROVIDER_PORT=8450 CONTRACTS_PROVIDER_PORT=8450
UPLOAD_CONTRACTS_DIRECTORY=/mnt/concordia/contracts/ UPLOAD_CONTRACTS_DIRECTORY=/mnt/concordia/contracts/
LOGS_PATH=/mnt/concordia/logs/ LOGS_PATH=/mnt/concordia/logs/
CORS_ALLOWED_ORIGINS="https://staging.concordia.ecentrics.net:443;https://staging.concordia.ecentrics.net;http://127.0.0.1:5555;127.0.0.1:5555" CORS_ALLOWED_ORIGINS="https://staging.concordia.ecentrics.net:443;https://staging.concordia.ecentrics.net;http://127.0.0.1:5555;127.0.0.1:5555;https://www.staging.concordia.ecentrics.net:443;https://www.staging.concordia.ecentrics.net;http://www.127.0.0.1:5555;www.127.0.0.1:5555"

4
jenkins/env/ganache.production.jenkins.env

@ -1,6 +1,6 @@
VIRTUAL_HOST=ganache.ecentrics.net VIRTUAL_HOST=ganache.ecentrics.net,www.ganache.ecentrics.net
VIRTUAL_PORT=8545 VIRTUAL_PORT=8545
LETSENCRYPT_HOST=ganache.ecentrics.net LETSENCRYPT_HOST=ganache.ecentrics.net,www.LETSENCRYPT_HOST
LETSENCRYPT_EMAIL=ecentricsgr@gmail.com LETSENCRYPT_EMAIL=ecentricsgr@gmail.com
ACCOUNTS_NUMBER=1000 ACCOUNTS_NUMBER=1000

4
jenkins/env/ganache.staging.jenkins.env

@ -1,6 +1,6 @@
VIRTUAL_HOST=staging.ganache.ecentrics.net VIRTUAL_HOST=staging.ganache.ecentrics.net,www.staging.ganache.ecentrics.net
VIRTUAL_PORT=8555 VIRTUAL_PORT=8555
LETSENCRYPT_HOST=staging.ganache.ecentrics.net LETSENCRYPT_HOST=staging.ganache.ecentrics.net,www.staging.ganache.ecentrics.net
LETSENCRYPT_EMAIL=ecentricsgr@gmail.com LETSENCRYPT_EMAIL=ecentricsgr@gmail.com
ACCOUNTS_NUMBER=100 ACCOUNTS_NUMBER=100

4
jenkins/env/pinner.production.jenkins.env

@ -1,6 +1,6 @@
VIRTUAL_HOST=pinner.concordia.ecentrics.net VIRTUAL_HOST=pinner.concordia.ecentrics.net,www.pinner.concordia.ecentrics.net
VIRTUAL_PORT=4444 VIRTUAL_PORT=4444
LETSENCRYPT_HOST=pinner.concordia.ecentrics.net LETSENCRYPT_HOST=pinner.concordia.ecentrics.net,www.pinner.concordia.ecentrics.net
LETSENCRYPT_EMAIL=ecentricsgr@gmail.com LETSENCRYPT_EMAIL=ecentricsgr@gmail.com
USE_EXTERNAL_CONTRACTS_PROVIDER=true USE_EXTERNAL_CONTRACTS_PROVIDER=true

4
jenkins/env/pinner.staging.jenkins.env

@ -1,6 +1,6 @@
VIRTUAL_HOST=staging.pinner.concordia.ecentrics.net VIRTUAL_HOST=staging.pinner.concordia.ecentrics.net,www.staging.pinner.concordia.ecentrics.net
VIRTUAL_PORT=5555 VIRTUAL_PORT=5555
LETSENCRYPT_HOST=staging.pinner.concordia.ecentrics.net LETSENCRYPT_HOST=staging.pinner.concordia.ecentrics.net,www.staging.pinner.concordia.ecentrics.net
LETSENCRYPT_EMAIL=ecentricsgr@gmail.com LETSENCRYPT_EMAIL=ecentricsgr@gmail.com
USE_EXTERNAL_CONTRACTS_PROVIDER=true USE_EXTERNAL_CONTRACTS_PROVIDER=true

4
jenkins/env/rendezvous.jenkins.env

@ -1,5 +1,5 @@
VIRTUAL_HOST=rendezvous.ecentrics.net VIRTUAL_HOST=rendezvous.ecentrics.net,www.rendezvous.ecentrics.net
VIRTUAL_PORT=9090 VIRTUAL_PORT=9090
LETSENCRYPT_HOST=rendezvous.ecentrics.net LETSENCRYPT_HOST=rendezvous.ecentrics.net,www.rendezvous.ecentrics.net
LETSENCRYPT_EMAIL=ecentricsgr@gmail.com LETSENCRYPT_EMAIL=ecentricsgr@gmail.com

12
packages/concordia-pinner/src/index.js

@ -10,13 +10,19 @@ import downloadContractArtifacts from './utils/drizzleUtils';
import getIpfsOptions from './options/ipfsOptions'; import getIpfsOptions from './options/ipfsOptions';
import { logger } from './utils/logger'; import { logger } from './utils/logger';
process.on('unhandledRejection', (error) => { let ipfsSingleton;
process.on('unhandledRejection', async (error) => {
// This happens when attempting to initialize without any available Swarm addresses (e.g. Rendezvous) // This happens when attempting to initialize without any available Swarm addresses (e.g. Rendezvous)
if (error.code === 'ERR_NO_VALID_ADDRESSES') { if (error.code === 'ERR_NO_VALID_ADDRESSES') {
logger.error(`unhandledRejection: ${error.message}`); logger.error(`unhandledRejection: ${error.message}`);
process.exit(1); process.exit(1);
} }
if (ipfsSingleton) {
await ipfsSingleton.stop();
}
// Don't swallow other errors // Don't swallow other errors
logger.error(error); logger.error(error);
throw error; throw error;
@ -71,6 +77,10 @@ const main = async () => {
getDeployedContract(web3) getDeployedContract(web3)
.then(({ contract, contractAddress }) => getIpfsOptions() .then(({ contract, contractAddress }) => getIpfsOptions()
.then((ipfsOptions) => IPFS.create(ipfsOptions)) .then((ipfsOptions) => IPFS.create(ipfsOptions))
.then((ipfs) => {
ipfsSingleton = ipfs;
return ipfs;
})
.then((ipfs) => createOrbitInstance(ipfs, contractAddress)) .then((ipfs) => createOrbitInstance(ipfs, contractAddress))
.then((orbit) => openExistingUsersDatabases(contract, orbit) .then((orbit) => openExistingUsersDatabases(contract, orbit)
.then(() => { .then(() => {

3
yarn.lock

@ -16469,6 +16469,9 @@ snake-case@^3.0.4:
version "3.0.4" version "3.0.4"
resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c"
integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==
dependencies:
dot-case "^3.0.4"
tslib "^2.0.3"
snapdragon-node@^2.0.1: snapdragon-node@^2.0.1:
version "2.1.1" version "2.1.1"

Loading…
Cancel
Save