From 60897a1effbb675f6e21dc049b0bd73f6f7d974c Mon Sep 17 00:00:00 2001 From: Dmitryii Osipov Date: Wed, 27 Nov 2024 16:58:36 +0100 Subject: [PATCH] fix(idea/faucet): getting envs (#1676) --- idea/faucet/Dockerfile | 18 +----------------- idea/faucet/src/config.ts | 4 ++-- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/idea/faucet/Dockerfile b/idea/faucet/Dockerfile index f67440b81a..d43d069ee0 100644 --- a/idea/faucet/Dockerfile +++ b/idea/faucet/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine +FROM node:20-alpine WORKDIR /src @@ -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 diff --git a/idea/faucet/src/config.ts b/idea/faucet/src/config.ts index 891fab5223..786115c077 100644 --- a/idea/faucet/src/config.ts +++ b/idea/faucet/src/config.ts @@ -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'), },