diff --git a/production/docker/bch-dex-ui/Dockerfile b/production/docker/bch-dex-ui/Dockerfile index 3f5a523..b8f2795 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 @@ -61,13 +61,13 @@ 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 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 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()