From 07c671ede45b840d8cec42bf91fe962c03e24f02 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Thu, 15 May 2025 17:58:29 -0700 Subject: [PATCH 1/3] fix(production): Using v3 UI --- production/docker/bch-dex-ui/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/production/docker/bch-dex-ui/Dockerfile b/production/docker/bch-dex-ui/Dockerfile index 3f5a523..42a4c76 100644 --- a/production/docker/bch-dex-ui/Dockerfile +++ b/production/docker/bch-dex-ui/Dockerfile @@ -46,11 +46,11 @@ WORKDIR /home/safeuser # Clone the rest.bitcoin.com repository WORKDIR /home/safeuser -RUN git clone https://github.com/Permissionless-Software-Foundation/bch-dex-ui-v2 +RUN git clone https://github.com/Permissionless-Software-Foundation/bch-dex-ui-v3 # Switch to the desired branch. `master` is usually stable, # and `stage` has the most up-to-date changes. -WORKDIR /home/safeuser/bch-dex-ui-v2 +WORKDIR /home/safeuser/bch-dex-ui-v3 # For development: switch to unstable branch RUN git checkout ct-unstable @@ -68,6 +68,6 @@ FROM nginx EXPOSE 80 # Copy the files built in the first container to the new NGINX container. -COPY --from=builder /home/safeuser/bch-dex-ui-v2/build /usr/share/nginx/html +COPY --from=builder /home/safeuser/bch-dex-ui-v3/build /usr/share/nginx/html #USER safeuser From a611580f48159661d46b7d8c42336f002d86acff Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Thu, 15 May 2025 19:18:41 -0700 Subject: [PATCH 2/3] Turning off CI option --- production/docker/bch-dex-ui/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/production/docker/bch-dex-ui/Dockerfile b/production/docker/bch-dex-ui/Dockerfile index 42a4c76..b8f2795 100644 --- a/production/docker/bch-dex-ui/Dockerfile +++ b/production/docker/bch-dex-ui/Dockerfile @@ -61,7 +61,7 @@ RUN git checkout ct-unstable RUN npm install # Build the site -RUN CI=true npm run build +RUN npm run build # Load the NGINX image. FROM nginx From 746f9a3488f299b2e635d1dbc553bacf29b40dd2 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Fri, 16 May 2025 07:52:58 -0700 Subject: [PATCH 3/3] fix(production): Adding script to get users in prod env --- util/users/{ => dev}/getUsers.js | 0 util/users/production/getUsers.js | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+) rename util/users/{ => dev}/getUsers.js (100%) create mode 100644 util/users/production/getUsers.js diff --git a/util/users/getUsers.js b/util/users/dev/getUsers.js similarity index 100% rename from util/users/getUsers.js rename to util/users/dev/getUsers.js diff --git a/util/users/production/getUsers.js b/util/users/production/getUsers.js new file mode 100644 index 0000000..d071ec4 --- /dev/null +++ b/util/users/production/getUsers.js @@ -0,0 +1,21 @@ +import mongoose from 'mongoose' +// import config from '../../config/index.js' +import User from '../../../src/adapters/localdb/models/users.js' + +const mongooseConnectStr = 'mongodb://172.17.0.1:5666/bch-swap-service-prod' + +async function getUsers () { + // Connect to the Mongo Database. + mongoose.Promise = global.Promise + mongoose.set('useCreateIndex', true) // Stop deprecation warning. + await mongoose.connect( + mongooseConnectStr, + { useNewUrlParser: true, useUnifiedTopology: true } + ) + + const users = await User.find({}, '-password') + console.log(`users: ${JSON.stringify(users, null, 2)}`) + + mongoose.connection.close() +} +getUsers()