Skip to content

Commit

Permalink
fix(idea/faucet): getting envs (#1676)
Browse files Browse the repository at this point in the history
  • Loading branch information
osipov-mit authored Nov 27, 2024
1 parent 7cd4a76 commit 60897a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
18 changes: 1 addition & 17 deletions idea/faucet/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18-alpine
FROM node:20-alpine

WORKDIR /src

Expand All @@ -8,22 +8,6 @@ COPY .yarn .yarn
COPY ./idea/common idea/common
COPY ./idea/faucet/ idea/faucet

ARG WS_PROVIDER \
TEST_ACCOUNT_SEED \
TEST_BALANCE_VALUE \
DB_NAME \
DB_USER \
DB_PASSWORD \
DB_HOST

ENV WS_PROVIDER=${WS_PROVIDER} \
TEST_ACCOUNT_SEED=${TEST_ACCOUNT_SEED} \
TEST_BALANCE_VALUE=${TEST_BALANCE_VALUE} \
DB_NAME=${DB_NAME} \
DB_USER=${DB_USER} \
DB_PASSWORD=${DB_PASSWORD} \
DB_HOST=${DB_HOST}

RUN yarn install && \
yarn build:common && \
yarn build:faucet
Expand Down
4 changes: 2 additions & 2 deletions idea/faucet/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ export default {
user: checkEnv('DB_USER', 'postgres'),
password: checkEnv('DB_PASSWORD', 'postgres'),
name: checkEnv('DB_NAME', 'faucet'),
host: checkEnv(process.env.DB_HOST, 'localhost'),
host: checkEnv('DB_HOST', 'localhost'),
},
gear: {
providerAddresses: checkEnv('WS_PROVIDER', 'wss://rpc-node.gear-tech.io:443').split(','),
providerAddresses: checkEnv('WS_PROVIDER').split(','),
accountSeed: checkEnv('TEST_ACCOUNT_SEED', '//Alice'),
balanceToTransfer: checkEnv('TEST_BALANCE_VALUE', '1000000'),
},
Expand Down

0 comments on commit 60897a1

Please sign in to comment.