File tree Expand file tree Collapse file tree 3 files changed +32
-2
lines changed
Expand file tree Collapse file tree 3 files changed +32
-2
lines changed Original file line number Diff line number Diff line change 1+ FROM node:slim as build-env
2+
3+ WORKDIR /faucet/
4+ COPY . .
5+
6+ RUN npm ci
7+ RUN npx esbuild server.js --bundle --platform=node --outfile=index.js
8+
9+ FROM node:slim
10+
11+ WORKDIR /app/
12+
13+ COPY --from=build-env /faucet/index.js /app/index.js
14+
15+ CMD node /app/index.js
16+
17+ EXPOSE 5000
Original file line number Diff line number Diff line change 1+ # !/usr/bin/make -f
2+
3+ DOCKER := $(shell which docker)
4+
5+ DOCKER_IMAGE_NAME = persistenceone/faucet
6+ DOCKER_TAG_NAME = latest
7+ DOCKER_CONTAINER_NAME = faucet
8+
9+ docker-build :
10+ $(DOCKER ) build -t ${DOCKER_IMAGE_NAME} :${DOCKER_TAG_NAME} .
11+
12+ docker-build-push : docker-build
13+ $(DOCKER ) push ${DOCKER_IMAGE_NAME} :${DOCKER_TAG_NAME}
Original file line number Diff line number Diff line change @@ -2,14 +2,14 @@ const FAUCET_LIST_LIMIT = +process.env.FAUCET_LIST_LIMIT;
22const AMOUNT = process . env . AMOUNT ;
33const DENOM = process . env . DENOM ;
44const CHAIN_ID = process . env . CHAIN_ID ;
5- const prefix = process . env . PREFIX ;
5+ const prefix = process . env . PREFIX ;
66const gas_price = process . env . GAS_PRICE ;
77const IP_WINDOW = + process . env . IP_WINDOW ;
88const IP_DRIP_LIMIT = + process . env . IP_DRIP_LIMIT ;
99const HD_PATH = process . env . HD_PATH ;
1010const FAUCET_SLEEP = + process . env . FAUCET_SLEEP ;
1111const PORT = + process . env . FAUCET_PORT
12- let FaucetList = [ ] ;
12+ let FaucetList = [ ] ;
1313module . exports = {
1414 FAUCET_LIST_LIMIT ,
1515 AMOUNT ,
You can’t perform that action at this time.
0 commit comments