mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Bundle faucet
This commit is contained in:
parent
b8db0b3255
commit
0f138e87ca
@ -13,16 +13,15 @@ FROM node:14-alpine as build-env
|
|||||||
ADD . /app
|
ADD . /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apk add --update --no-cache alpine-sdk linux-headers build-base gcc libusb-dev python3 py3-pip eudev-dev \
|
RUN apk add --update --no-cache alpine-sdk linux-headers build-base gcc libusb-dev python3 py3-pip eudev-dev
|
||||||
&& ln -sf python3 /usr/bin/python
|
RUN ln -sf python3 /usr/bin/python
|
||||||
# Do we really need to update those?
|
|
||||||
RUN pip3 install --no-cache --upgrade pip setuptools
|
|
||||||
|
|
||||||
RUN yarn install && yarn run build
|
RUN yarn install && yarn run build
|
||||||
|
RUN (cd packages/faucet && SKIP_BUILD=1 yarn pack-node)
|
||||||
|
|
||||||
FROM node:14-alpine
|
FROM node:14-alpine
|
||||||
COPY --from=build-env /app /app
|
COPY --from=build-env /app/packages/faucet /app/packages/faucet
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
ENTRYPOINT ["yarn", "node", "/app/packages/faucet/bin/cosmos-faucet"]
|
ENTRYPOINT ["/app/packages/faucet/bin/cosmos-faucet-dist"]
|
||||||
|
6
packages/faucet/bin/cosmos-faucet-dist
Executable file
6
packages/faucet/bin/cosmos-faucet-dist
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
const path = require("path");
|
||||||
|
|
||||||
|
// attempt to call in main file....
|
||||||
|
const faucet = require(path.join(__dirname, "..", "dist", "node", "cli.js"));
|
||||||
|
faucet.main(process.argv.slice(2));
|
@ -36,7 +36,8 @@
|
|||||||
"test": "yarn build-or-skip && yarn test-node",
|
"test": "yarn build-or-skip && yarn test-node",
|
||||||
"coverage": "nyc --reporter=text --reporter=lcov yarn test --quiet",
|
"coverage": "nyc --reporter=text --reporter=lcov yarn test --quiet",
|
||||||
"start-dev": "FAUCET_ADDRESS_PREFIX=wasm FAUCET_CREDIT_AMOUNT_UCOSM=10000000 FAUCET_CREDIT_AMOUNT_USTAKE=100000 FAUCET_CONCURRENCY=3 FAUCET_MNEMONIC=\"economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone\" ./bin/cosmos-faucet start \"http://localhost:26659\"",
|
"start-dev": "FAUCET_ADDRESS_PREFIX=wasm FAUCET_CREDIT_AMOUNT_UCOSM=10000000 FAUCET_CREDIT_AMOUNT_USTAKE=100000 FAUCET_CONCURRENCY=3 FAUCET_MNEMONIC=\"economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone\" ./bin/cosmos-faucet start \"http://localhost:26659\"",
|
||||||
"start-coralnet": "FAUCET_ADDRESS_PREFIX=coral FAUCET_TOKENS=\"ushell,ureef\" FAUCET_CREDIT_AMOUNT_USHELL=10000000 FAUCET_CREDIT_AMOUNT_UREEF=2000000 FAUCET_CONCURRENCY=3 FAUCET_MNEMONIC=\"economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone\" ./bin/cosmos-faucet start \"https://lcd.coralnet.cosmwasm.com\""
|
"start-coralnet": "FAUCET_ADDRESS_PREFIX=coral FAUCET_TOKENS=\"ushell,ureef\" FAUCET_CREDIT_AMOUNT_USHELL=10000000 FAUCET_CREDIT_AMOUNT_UREEF=2000000 FAUCET_CONCURRENCY=3 FAUCET_MNEMONIC=\"economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone\" ./bin/cosmos-faucet start \"https://lcd.coralnet.cosmwasm.com\"",
|
||||||
|
"pack-node": "yarn build-or-skip && webpack --mode production --config webpack.node.config.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@cosmjs/crypto": "workspace:packages/crypto",
|
"@cosmjs/crypto": "workspace:packages/crypto",
|
||||||
|
21
packages/faucet/webpack.node.config.js
Normal file
21
packages/faucet/webpack.node.config.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/naming-convention */
|
||||||
|
const path = require("path");
|
||||||
|
|
||||||
|
const target = "node";
|
||||||
|
const distdir = path.join(__dirname, "dist", target);
|
||||||
|
|
||||||
|
module.exports = [
|
||||||
|
{
|
||||||
|
target: target,
|
||||||
|
entry: "./build/cli.js",
|
||||||
|
output: {
|
||||||
|
path: distdir,
|
||||||
|
filename: "cli.js",
|
||||||
|
library: {
|
||||||
|
type: "commonjs",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
plugins: [],
|
||||||
|
resolve: {},
|
||||||
|
},
|
||||||
|
];
|
Loading…
x
Reference in New Issue
Block a user