This repository has been archived by the owner on Nov 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from rsksmart/staging
Staging
- Loading branch information
Showing
42 changed files
with
3,060 additions
and
320 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM node:10 | ||
|
||
WORKDIR /app | ||
|
||
COPY package.json ./ | ||
COPY ./patch ./patch | ||
|
||
RUN npm i | ||
COPY ./patch/ethrDID-copy.js ./node_modules/ethr-did/lib/index.js | ||
|
||
COPY ./src ./src | ||
COPY ./tsconfig.json ./ | ||
|
||
EXPOSE 5102 | ||
|
||
CMD [ "npm", "run", "start"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM node:10 | ||
|
||
WORKDIR /app | ||
COPY . ./ | ||
|
||
RUN npm i | ||
|
||
RUN wget https://github.com/ipfs/go-ipfs/releases/download/v0.6.0/go-ipfs_v0.6.0_linux-amd64.tar.gz | ||
|
||
RUN tar -xvzf go-ipfs_v0.6.0_linux-amd64.tar.gz | ||
|
||
RUN cd go-ipfs && \ | ||
bash install.sh | ||
RUN ipfs --version | ||
|
||
RUN ipfs init | ||
|
||
EXPOSE 8080 | ||
EXPOSE 5001 | ||
CMD [ "ipfs", "daemon"] |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* env */ | ||
import dotenv from 'dotenv' | ||
import Debug from 'debug' | ||
import express from 'express' | ||
import cors from 'cors' | ||
import { setupCentralizedIPFSPinner } from '../services/centralizedIPFSPinner' | ||
|
||
/* env */ | ||
dotenv.config() | ||
Debug.enable('*') | ||
|
||
const debug = Debug('rif-id:data-vault:scripts') | ||
|
||
if (!process.env.PRIVATE_KEY) throw new Error('Setup private key') | ||
if (!process.env.ADDRESS) throw new Error('Setup address') | ||
|
||
const env = { | ||
privateKey: process.env.PRIVATE_KEY, | ||
address: process.env.ADDRESS, | ||
ipfsPort: process.env.IPFS_PORT || '5001', | ||
ipfsHost: process.env.IPFS_HOST || 'localhost', | ||
authExpirationTime: process.env.AUTH_EXPIRATION_TIME || '300000', | ||
rpcUrl: process.env.RPC_URL || 'https://did.testnet.rsk.co:4444' | ||
} | ||
|
||
const port = process.env.PORT || '5102' | ||
|
||
/* setup app */ | ||
const app = express() | ||
app.use(cors()) | ||
|
||
setupCentralizedIPFSPinner(app, env).then(() => app.listen(port, () => debug(`Data vault started on port ${port}`))) |
Oops, something went wrong.