Skip to content

Commit

Permalink
feat: add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
perfogic committed Nov 28, 2024
1 parent 0b4eb5e commit b60557e
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 10 deletions.
17 changes: 17 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
**/node_modules/
**/dist
.git
npm-debug.log
.coverage
.coverage.*
.aws
.husky
**/target
**/pkg
**/tests
*.md
# env variables
.env
.env**
# config
config*.{yaml,yml}
39 changes: 39 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM node:20.15-bullseye

RUN apt-get update && \
apt-get install -y build-essential libc-dev && \
apt-get clean

RUN npm install -g node-gyp tsx

WORKDIR /app

COPY package.json yarn.lock lerna.json nx.json tsconfig.json .yarnrc.yml ./

COPY packages/orchestrator/package.json /app/packages/orchestrator/package.json

COPY packages/contracts-build/package.json /app/packages/contracts-build/package.json

COPY packages/contracts-sdk/package.json /app/packages/contracts-sdk/package.json

COPY packages/lib-js/package.json /app/packages/lib-js/package.json

COPY packages/wasm-sdk/package.json /app/packages/wasm-sdk/package.json

COPY patches /app/patches

COPY . .

COPY .yarn ./.yarn

COPY .nx ./.nx

RUN corepack enable

RUN yarn install

RUN yarn postinstall

RUN yarn build

ENTRYPOINT ["tsx", "packages/orchestrator/src/index.ts"]
20 changes: 10 additions & 10 deletions packages/orchestrator/src/services/signer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ class SignerService implements RelayerInterface {
this.logger.info(`Starting signer server!`);
let { xpriv, xpub } = await this.loadOrGenerateXpriv();
ContractSimulator.sync();
// const signatoryKey = await this.appBitcoinClient.signatoryKey({
// addr: this.appBitcoinClient.sender,
// });

// if (signatoryKey === null) {
// const tx = await this.appBitcoinClient.setSignatoryKey({
// xpub: encodeXpub({ key: xpub }),
// });
// this.logger.info(`Setting signatory key at: ${tx.transactionHash}`);
// }
const signatoryKey = await this.appBitcoinClient.signatoryKey({
addr: this.appBitcoinClient.sender,
});

if (signatoryKey === null) {
const tx = await this.appBitcoinClient.setSignatoryKey({
xpub: encodeXpub({ key: xpub }),
});
this.logger.info(`Setting signatory key at: ${tx.transactionHash}`);
}

this.logger.info(`Signer is running...`);
await Promise.all([
Expand Down

0 comments on commit b60557e

Please sign in to comment.