Skip to content

Commit c385cef

Browse files
author
Artem
authored
Merge pull request #2736 from RedisInsight/feature/RI-5036/optimize-docker-image
RI-5036: Remove mdns, avahi, gnome-keyring; use alpine image instead …
2 parents d29fe51 + e194bdb commit c385cef

File tree

105 files changed

+1197
-633
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+1197
-633
lines changed

.circleci/config.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,8 @@ jobs:
462462
command: |
463463
cd tests/e2e && export TEST_FILES=$(circleci tests glob "tests/web/**/*.e2e.ts" | circleci tests split --split-by=timings) && cd ../..
464464
TEST_BIG_DB_DUMP=$TEST_BIG_DB_DUMP \
465+
RI_SERVER_TLS_CERT="$RI_SERVER_TLS_CERT" \
466+
RI_SERVER_TLS_KEY="$RI_SERVER_TLS_KEY" \
465467
docker-compose \
466468
-f tests/e2e/rte.docker-compose.yml \
467469
-f tests/e2e/docker.web.docker-compose.yml \
@@ -476,6 +478,8 @@ jobs:
476478
command: |
477479
cd tests/e2e && export TEST_FILES=$(circleci tests glob "tests/web/**/*.e2e.ts" | circleci tests split --split-by=timings) && cd ../..
478480
TEST_BIG_DB_DUMP=$TEST_BIG_DB_DUMP \
481+
RI_SERVER_TLS_CERT="$RI_SERVER_TLS_CERT" \
482+
RI_SERVER_TLS_KEY="$RI_SERVER_TLS_KEY" \
479483
docker-compose \
480484
-f tests/e2e/rte.docker-compose.yml \
481485
-f tests/e2e/local.web.docker-compose.yml \
@@ -618,11 +622,11 @@ jobs:
618622
export RI_CLOUD_CAPI_URL=$RI_CLOUD_CAPI_URL_STAGE
619623
620624
if [ << parameters.env >> == 'stage' ]; then
621-
UPGRADES_LINK=$UPGRADES_LINK_STAGE SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE yarn package:stage --linux << parameters.target >>
625+
RI_UPGRADES_LINK=$RI_UPGRADES_LINK_STAGE RI_SEGMENT_WRITE_KEY=$RI_SEGMENT_WRITE_KEY_STAGE yarn package:stage --linux << parameters.target >>
622626
exit 0;
623627
fi
624628
625-
UPGRADES_LINK='' SEGMENT_WRITE_KEY='' yarn package:stage --linux << parameters.target >>
629+
RI_UPGRADES_LINK='' RI_SEGMENT_WRITE_KEY='' yarn package:stage --linux << parameters.target >>
626630
- when:
627631
condition:
628632
equal: [ true, << parameters.redisstack >> ]
@@ -710,12 +714,12 @@ jobs:
710714
export RI_CLOUD_IDP_GH_ID=$RI_CLOUD_IDP_GH_ID_STAGE
711715
export RI_CLOUD_API_URL=$RI_CLOUD_API_URL_STAGE
712716
export RI_CLOUD_CAPI_URL=$RI_CLOUD_CAPI_URL_STAGE
713-
export UPGRADES_LINK=''
714-
export SEGMENT_WRITE_KEY=''
717+
export RI_UPGRADES_LINK=''
718+
export RI_SEGMENT_WRITE_KEY=''
715719
716720
if [ << parameters.env >> == 'stage' ]; then
717-
export UPGRADES_LINK=$UPGRADES_LINK_STAGE
718-
export SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE
721+
export RI_UPGRADES_LINK=$RI_UPGRADES_LINK_STAGE
722+
export RI_SEGMENT_WRITE_KEY=$RI_SEGMENT_WRITE_KEY_STAGE
719723
fi
720724
721725
# handle manual builds
@@ -792,9 +796,9 @@ jobs:
792796
export RI_CLOUD_CAPI_URL=$RI_CLOUD_CAPI_URL_STAGE
793797
794798
if [ << parameters.env >> == 'stage' ]; then
795-
UPGRADES_LINK=$UPGRADES_LINK_STAGE SEGMENT_WRITE_KEY=$SEGMENT_WRITE_KEY_STAGE yarn package:stage --win << parameters.target >>
799+
RI_UPGRADES_LINK=$RI_UPGRADES_LINK_STAGE RI_SEGMENT_WRITE_KEY=$RI_SEGMENT_WRITE_KEY_STAGE yarn package:stage --win << parameters.target >>
796800
else
797-
UPGRADES_LINK='' SEGMENT_WRITE_KEY='' yarn package:stage --win << parameters.target >>
801+
RI_UPGRADES_LINK='' RI_SEGMENT_WRITE_KEY='' yarn package:stage --win << parameters.target >>
798802
fi
799803
800804
rm -rf release/win-unpacked
@@ -860,20 +864,18 @@ jobs:
860864
- run:
861865
name: Build Docker image (API + UI)
862866
command: |
863-
TELEMETRY=$SEGMENT_WRITE_KEY_DEV
867+
TELEMETRY=$RI_SEGMENT_WRITE_KEY_DEV
864868
865869
if [ << parameters.env >> == 'production' ]; then
866-
TELEMETRY=$SEGMENT_WRITE_KEY
870+
TELEMETRY=$RI_SEGMENT_WRITE_KEY
867871
fi
868872
869873
if [ << parameters.env >> == 'staging' ]; then
870-
TELEMETRY=$SEGMENT_WRITE_KEY_STAGE
874+
TELEMETRY=$RI_SEGMENT_WRITE_KEY_STAGE
871875
fi
872876
873877
docker build --build-arg NODE_ENV=<< parameters.env >> \
874-
--build-arg SERVER_TLS_CERT="$SERVER_TLS_CERT" \
875-
--build-arg SERVER_TLS_KEY="$SERVER_TLS_KEY" \
876-
--build-arg SEGMENT_WRITE_KEY="$TELEMETRY" \
878+
--build-arg RI_SEGMENT_WRITE_KEY="$TELEMETRY" \
877879
-t riv2:latest .
878880
879881
mkdir -p docker-release
@@ -1154,6 +1156,9 @@ workflows:
11541156
- Setup sign certificates (stage)
11551157
- linux:
11561158
name: Build app - Linux (stage)
1159+
env: stage
1160+
redisstack: false
1161+
target: AppImage
11571162
requires:
11581163
- Setup build (stage)
11591164
- docker:

.circleci/e2e/test.app-image.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ docker-compose -f tests/e2e/rte.docker-compose.yml up --force-recreate -d -V
1717
# run tests
1818
COMMON_URL=$(tail -n 1 apppath)/resources/app.asar/dist/renderer/index.html \
1919
ELECTRON_PATH=$(tail -n 1 apppath)/redisinsight \
20-
SOCKETS_CORS=true \
20+
RI_SOCKETS_CORS=true \
2121
yarn --cwd tests/e2e dotenv -e .desktop.env yarn --cwd tests/e2e test:desktop:ci

.circleci/e2e/test.exe.cmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set OSS_STANDALONE_HOST=%E2E_CLOUD_DATABASE_HOST%
66
set OSS_STANDALONE_PORT=%E2E_CLOUD_DATABASE_PORT%
77
set OSS_STANDALONE_USERNAME=%E2E_CLOUD_DATABASE_USERNAME%
88
set OSS_STANDALONE_PASSWORD=%E2E_CLOUD_DATABASE_PASSWORD%
9-
set SOCKETS_CORS=true
9+
set RI_SOCKETS_CORS=true
1010

1111
call yarn --cwd tests/e2e install
1212

.circleci/redisstack/app-image.repack.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -e
44
ARCH=${ARCH:-x86_64}
55
WORKING_DIRECTORY=$(pwd)
66
SOURCE_APP=${SOURCE_APP:-"RedisInsight-linux-$ARCH.AppImage"}
7-
APP_FOLDER_NAME="RedisInsight-linux"
7+
RI_APP_FOLDER_NAME="RedisInsight-linux"
88
TAR_NAME="RedisInsight-app-linux.$ARCH.tar.gz"
99
TMP_FOLDER="/tmp/RedisInsight-app-$ARCH"
1010

@@ -17,9 +17,9 @@ cp "./release/$SOURCE_APP" "$TMP_FOLDER"
1717
cd "$TMP_FOLDER" || exit 1
1818

1919
./"$SOURCE_APP" --appimage-extract
20-
mv squashfs-root "$APP_FOLDER_NAME"
20+
mv squashfs-root "$RI_APP_FOLDER_NAME"
2121

22-
tar -czvf "$TAR_NAME" "$APP_FOLDER_NAME"
22+
tar -czvf "$TAR_NAME" "$RI_APP_FOLDER_NAME"
2323

2424
cp "$TAR_NAME" "$WORKING_DIRECTORY/release/redisstack/"
2525
cd "$WORKING_DIRECTORY" || exit 1

.circleci/redisstack/dmg.repack.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ set -e
44
ARCH=${ARCH:-x64}
55
WORKING_DIRECTORY=$(pwd)
66
TAR_NAME="RedisInsight-app-darwin.$ARCH.tar.gz"
7-
APP_FOLDER_NAME="RedisInsight.app"
8-
TMP_FOLDER="/tmp/$APP_FOLDER_NAME"
7+
RI_APP_FOLDER_NAME="RedisInsight.app"
8+
TMP_FOLDER="/tmp/$RI_APP_FOLDER_NAME"
99

1010
rm -rf "$TMP_FOLDER"
1111

@@ -15,7 +15,7 @@ mkdir -p "$TMP_FOLDER"
1515
hdiutil attach "./release/RedisInsight-mac-$ARCH.dmg"
1616
cp -a /Volumes/RedisInsight*/RedisInsight.app "/tmp"
1717
cd "/tmp" || exit 1
18-
tar -czvf "$TAR_NAME" "$APP_FOLDER_NAME"
18+
tar -czvf "$TAR_NAME" "$RI_APP_FOLDER_NAME"
1919
cp "$TAR_NAME" "$WORKING_DIRECTORY/release/redisstack/"
2020
cd "$WORKING_DIRECTORY" || exit 1
2121
hdiutil unmount /Volumes/RedisInsight*/

DOCKER_README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Docker
2+
3+
Included in this repository is a Dockerfile that can be used to deploy a hosted instance of Redis Insight.
4+
5+
# Usage
6+
7+
To build and run the image locally with Docker buildx, simply
8+
9+
```
10+
$ docker buildx build -t redis-insight:latest
11+
$ docker run -d -p5000:5000 redis-insight:latest
12+
```
13+
14+
These commands will build the image and then start the container. Redis Insight can then be accessed on localhost port 5000, `http://localhost:5000`.
15+
16+
# Configuration
17+
18+
Redis Insight supports several configuration values that can be supplied via container environment variables. The following may be provided:
19+
20+
| Variable | Purpose | Default | Additional Info |
21+
| ---------|---------|-----------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
22+
| RI_APP_PORT | The port the app listens on | 5000 | See [Express Documentation](https://expressjs.com/en/api.html#app.listen) |
23+
| RI_APP_HOST | The host the app listens on | 0.0.0.0 | See [Express Documentation](https://expressjs.com/en/api.html#app.listen) |
24+
| RI_SERVER_TLS_KEY | Private key for HTTPS | | Private key in [PEM format](https://www.ssl.com/guide/pem-der-crt-and-cer-x-509-encodings-and-conversions/#ftoc-heading-3). May be a path to a file or a string in PEM format. |
25+
| RI_SERVER_TLS_CERT | Certificate for supplied private key | | Public certificate in [PEM format](https://www.ssl.com/guide/pem-der-crt-and-cer-x-509-encodings-and-conversions/#ftoc-heading-3) |
26+
| RI_ENCRYPTION_KEY | Key to encrypt data with | | Redisinsight stores some data such as connection details locally (using [sqlite3](https://github.com/TryGhost/node-sqlite3)). It might be usefull to store sensitive data such as passwords, or private keys encrypted. For this case RedisInsight supports encryption with provided key.<br />Note: The Key must be the same for the same RedisInsight instance to be able to decrypt exising data. If for some reason the key was changed, you will have to enter the credentials again to connect to the Redis database. |

Dockerfile

Lines changed: 56 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,79 @@
1-
FROM node:18.15.0-alpine as front
2-
RUN apk update
3-
RUN apk add --no-cache --virtual .gyp \
1+
# this dockerfile has two stages, a build stage and the executable stage.
2+
# the build stage is responsible for building the frontend, the backend,
3+
# and the frontend's static assets. ideally, we could build the frontend and backend
4+
# independently and in parallel in different stages, but there is a dependency
5+
# on the backend to build those assets. until we fix that, this approach is
6+
# the best way to minimize the number of node_module restores and build steps
7+
# while still keeping the final image small.
8+
9+
FROM node:18.18-alpine as build
10+
11+
# update apk repository and install build dependencies
12+
RUN apk update && apk add --no-cache --virtual .gyp \
413
python3 \
514
make \
615
g++
16+
17+
# set workdir
718
WORKDIR /usr/src/app
19+
20+
# restore node_modules for front-end
821
COPY package.json yarn.lock babel.config.cjs tsconfig.json ./
922
RUN SKIP_POSTINSTALL=1 yarn install
23+
24+
# prepare backend by copying scripts/configs and installing node modules
25+
# this is required to build the static assets
1026
COPY configs ./configs
1127
COPY scripts ./scripts
1228
COPY redisinsight ./redisinsight
13-
RUN yarn --cwd redisinsight/api
14-
ARG SERVER_TLS_CERT
15-
ARG SERVER_TLS_KEY
16-
ARG SEGMENT_WRITE_KEY
17-
ENV SERVER_TLS_CERT=${SERVER_TLS_CERT}
18-
ENV SERVER_TLS_KEY=${SERVER_TLS_KEY}
19-
ENV SEGMENT_WRITE_KEY=${SEGMENT_WRITE_KEY}
29+
RUN yarn --cwd redisinsight/api install
30+
31+
# build the frontend, static assets, and backend api
2032
RUN yarn build:web
2133
RUN yarn build:statics
34+
RUN yarn build:api
2235

23-
FROM node:18.15.0-alpine as back
24-
WORKDIR /usr/src/app
25-
COPY redisinsight/api/package.json redisinsight/api/yarn.lock ./
26-
RUN yarn install
27-
COPY redisinsight/api ./
28-
COPY --from=front /usr/src/app/redisinsight/api/static ./static
29-
COPY --from=front /usr/src/app/redisinsight/api/defaults ./defaults
30-
RUN yarn run build:prod
31-
32-
FROM node:18.15.0-slim
33-
# Set up mDNS functionality, to play well with Redis Enterprise
34-
# clusters on the network.
35-
RUN set -ex \
36-
&& DEPS="avahi-daemon libnss-mdns" \
37-
&& apt-get update && apt-get install -y --no-install-recommends $DEPS \
38-
# Disable nss-mdns's two-label limit heuristic so that host names
39-
# with multiple labels can be resolved.
40-
# E.g. redis-12000.rediscluster.local, which has 3 labels.
41-
# (https://github.com/lathiat/nss-mdns#etcmdnsallow)
42-
&& echo '*' > /etc/mdns.allow \
43-
# Configure NSSwitch to use the mdns4 plugin so mdns.allow is respected
44-
&& sed -i "s/hosts:.*/hosts: files mdns4 dns/g" /etc/nsswitch.conf \
45-
# We run a `avahi-daemon` without `dbus` so that we can start it as a
46-
# non-root user. `dbus` requires root permissions to start. And
47-
# anyway, there's a way to run `avahi-daemon` without `dbus` so why
48-
# shouldn't we use it. https://linux.die.net/man/5/avahi-daemon.conf
49-
&& printf "[server]\nenable-dbus=no\n" >> /etc/avahi/avahi-daemon.conf \
50-
&& chmod 777 /etc/avahi/avahi-daemon.conf \
51-
# We create the directory because when the first time `avahi-daemon`
52-
# is run, the directory doesn't exist and the `avahi-daemon` must have
53-
# permissions to create the directory under `/var`.
54-
&& mkdir -p /var/run/avahi-daemon \
55-
# Change the permissions of the directories avahi will use.
56-
&& chown avahi:avahi /var/run/avahi-daemon \
57-
&& chmod 777 /var/run/avahi-daemon
58-
59-
RUN apt-get install net-tools
60-
RUN apt-get install -y dbus-x11 gnome-keyring libsecret-1-0
61-
RUN dbus-uuidgen > /var/lib/dbus/machine-id
36+
# install backend _again_ to build native modules and remove dev dependencies,
37+
# then run autoclean to remove additional unnecessary files
38+
RUN yarn --cwd ./redisinsight/api install --production
39+
COPY ./redisinsight/api/.yarnclean.prod ./redisinsight/api/.yarnclean
40+
RUN yarn --cwd ./redisinsight/api autoclean --force
41+
42+
FROM node:18.18-alpine
6243

44+
# runtime args and environment variables
6345
ARG NODE_ENV=production
64-
ARG SERVER_TLS_CERT
65-
ARG SERVER_TLS_KEY
66-
ARG SEGMENT_WRITE_KEY
67-
ENV SERVER_TLS_CERT=${SERVER_TLS_CERT}
68-
ENV SERVER_TLS_KEY=${SERVER_TLS_KEY}
69-
ENV SEGMENT_WRITE_KEY=${SEGMENT_WRITE_KEY}
46+
ARG RI_SEGMENT_WRITE_KEY
47+
ENV RI_SEGMENT_WRITE_KEY=${RI_SEGMENT_WRITE_KEY}
7048
ENV NODE_ENV=${NODE_ENV}
71-
ENV SERVER_STATIC_CONTENT=true
72-
ENV BUILD_TYPE='DOCKER_ON_PREMISE'
49+
ENV RI_SERVE_STATICS=true
50+
ENV RI_BUILD_TYPE='DOCKER_ON_PREMISE'
51+
ENV RI_APP_FOLDER_ABSOLUTE_PATH='/data'
52+
53+
# this resolves CVE-2023-5363
54+
# TODO: remove this line once we update to base image that doesn't have this vulnerability
55+
RUN apk update && apk upgrade --no-cache libcrypto3 libssl3
56+
57+
# set workdir
7358
WORKDIR /usr/src/app
74-
COPY --from=back /usr/src/app/dist ./redisinsight/api/dist
75-
COPY --from=front /usr/src/app/redisinsight/ui/dist ./redisinsight/ui/dist
7659

77-
# Build BE prod dependencies here to build native modules
78-
COPY redisinsight/api/package.json redisinsight/api/yarn.lock ./redisinsight/api/
79-
RUN yarn --cwd ./redisinsight/api install --production
80-
COPY redisinsight/api/.yarnclean.prod ./redisinsight/api/.yarnclean
81-
RUN yarn --cwd ./redisinsight/api autoclean --force
60+
# copy artifacts built in previous stage to this one
61+
COPY --from=build --chown=node:node /usr/src/app/redisinsight/api/dist ./redisinsight/api/dist
62+
COPY --from=build --chown=node:node /usr/src/app/redisinsight/api/node_modules ./redisinsight/api/node_modules
63+
COPY --from=build --chown=node:node /usr/src/app/redisinsight/ui/dist ./redisinsight/ui/dist
8264

83-
COPY ./docker-entry.sh ./
65+
# folder to store local database, plugins, logs and all other files
66+
RUN mkdir -p /data && chown -R node:node /data
67+
68+
# copy the docker entry point script and make it executable
69+
COPY --chown=node:node ./docker-entry.sh ./
8470
RUN chmod +x docker-entry.sh
8571

72+
# since RI is hard-code to port 5000, expose it from the container
8673
EXPOSE 5000
8774

75+
# don't run the node process as root
76+
USER node
77+
78+
# serve the application 🚀
8879
ENTRYPOINT ["./docker-entry.sh", "node", "redisinsight/api/dist/src/main"]

api.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN dbus-uuidgen > /var/lib/dbus/machine-id
2626

2727
ARG NODE_ENV=production
2828
ENV NODE_ENV=${NODE_ENV}
29-
ENV BUILD_TYPE='DOCKER_ON_PREMISE'
29+
ENV RI_BUILD_TYPE='DOCKER_ON_PREMISE'
3030

3131
WORKDIR /usr/src/app
3232

configs/webpack.config.main.prod.ts

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,18 @@ export default merge(baseConfig, {
5555
NODE_ENV: 'production',
5656
DEBUG_PROD: false,
5757
START_MINIMIZED: false,
58-
APP_ENV: 'electron',
59-
SERVER_TLS: true,
60-
SERVER_TLS_CERT: process.env.SERVER_TLS_CERT || '',
61-
SERVER_TLS_KEY: process.env.SERVER_TLS_KEY || '',
62-
APP_FOLDER_NAME: process.env.APP_FOLDER_NAME || '',
63-
UPGRADES_LINK: process.env.UPGRADES_LINK || '',
64-
RI_HOSTNAME: '127.0.0.1',
65-
BUILD_TYPE: 'ELECTRON',
66-
APP_VERSION: version,
67-
AWS_BUCKET_NAME: 'AWS_BUCKET_NAME' in process.env ? process.env.AWS_BUCKET_NAME : '',
68-
SEGMENT_WRITE_KEY: 'SEGMENT_WRITE_KEY' in process.env ? process.env.SEGMENT_WRITE_KEY : 'SOURCE_WRITE_KEY',
69-
CONNECTIONS_TIMEOUT_DEFAULT: 'CONNECTIONS_TIMEOUT_DEFAULT' in process.env
70-
? process.env.CONNECTIONS_TIMEOUT_DEFAULT
58+
RI_APP_TYPE: 'electron',
59+
RI_SERVER_TLS_CERT: process.env.RI_SERVER_TLS_CERT || '',
60+
RI_SERVER_TLS_KEY: process.env.RI_SERVER_TLS_KEY || '',
61+
RI_SERVE_STATICS: false,
62+
RI_APP_FOLDER_NAME: process.env.RI_APP_FOLDER_NAME || '',
63+
RI_UPGRADES_LINK: process.env.RI_UPGRADES_LINK || '',
64+
RI_APP_HOST: '127.0.0.1',
65+
RI_BUILD_TYPE: 'ELECTRON',
66+
RI_APP_VERSION: version,
67+
RI_SEGMENT_WRITE_KEY: 'RI_SEGMENT_WRITE_KEY' in process.env ? process.env.RI_SEGMENT_WRITE_KEY : 'SOURCE_WRITE_KEY',
68+
RI_CONNECTIONS_TIMEOUT_DEFAULT: 'RI_CONNECTIONS_TIMEOUT_DEFAULT' in process.env
69+
? process.env.RI_CONNECTIONS_TIMEOUT_DEFAULT
7170
: toString(30 * 1000), // 30 sec
7271
// cloud auth
7372
RI_CLOUD_IDP_AUTHORIZE_URL: 'RI_CLOUD_IDP_AUTHORIZE_URL' in process.env ? process.env.RI_CLOUD_IDP_AUTHORIZE_URL: '',
Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import webpack from 'webpack';
22
import { merge } from 'webpack-merge';
3-
import { toString } from 'lodash';
43
import { BundleAnalyzerPlugin } from 'webpack-bundle-analyzer';
54
import mainProdConfig from './webpack.config.main.prod';
65
import DeleteSourceMaps from '../scripts/DeleteSourceMaps';
7-
import { version } from '../redisinsight/package.json';
86

97
DeleteSourceMaps();
108

@@ -18,22 +16,6 @@ export default merge(mainProdConfig, {
1816

1917
new webpack.EnvironmentPlugin({
2018
NODE_ENV: 'staging',
21-
DEBUG_PROD: false,
22-
START_MINIMIZED: false,
23-
APP_ENV: 'electron',
24-
SERVER_TLS: true,
25-
SERVER_TLS_CERT: process.env.SERVER_TLS_CERT || '',
26-
SERVER_TLS_KEY: process.env.SERVER_TLS_KEY || '',
27-
APP_FOLDER_NAME: process.env.APP_FOLDER_NAME || '',
28-
UPGRADES_LINK: process.env.UPGRADES_LINK || '',
29-
RI_HOSTNAME: '127.0.0.1',
30-
BUILD_TYPE: 'ELECTRON',
31-
APP_VERSION: version,
32-
AWS_BUCKET_NAME: 'AWS_BUCKET_NAME' in process.env ? process.env.AWS_BUCKET_NAME : '',
33-
SEGMENT_WRITE_KEY: 'SEGMENT_WRITE_KEY' in process.env ? process.env.SEGMENT_WRITE_KEY : 'SOURCE_WRITE_KEY',
34-
CONNECTIONS_TIMEOUT_DEFAULT: 'CONNECTIONS_TIMEOUT_DEFAULT' in process.env
35-
? process.env.CONNECTIONS_TIMEOUT_DEFAULT
36-
: toString(30 * 1000), // 30 sec
3719
}),
3820
],
3921
});

0 commit comments

Comments
 (0)