From ee1776c44ed840181862948aaf7355552597f107 Mon Sep 17 00:00:00 2001 From: Shishir Pai <64056966+mgpai22@users.noreply.github.com> Date: Tue, 20 Aug 2024 20:17:02 -0700 Subject: [PATCH 1/2] Remove duplicate "restart" keys --- explorer/docker-compose.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/explorer/docker-compose.yml b/explorer/docker-compose.yml index 69a6dc5..9784081 100644 --- a/explorer/docker-compose.yml +++ b/explorer/docker-compose.yml @@ -48,7 +48,6 @@ services: - "127.0.0.1:6379:6379" volumes: - ergo_redis:/usr/local/etc/redis - restart: unless-stopped # Redis request cache redis_rc: @@ -57,7 +56,6 @@ services: command: ["redis-server"] expose: - "6379" - restart: unless-stopped # Explorer backend chain-grabber grabber: From a349453953ca24431704e8f2141423e26e0479dc Mon Sep 17 00:00:00 2001 From: Shishir Pai <64056966+mgpai22@users.noreply.github.com> Date: Tue, 20 Aug 2024 20:17:43 -0700 Subject: [PATCH 2/2] Update for latest UI --- explorer/ui/Dockerfile | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/explorer/ui/Dockerfile b/explorer/ui/Dockerfile index 02fa202..015d885 100644 --- a/explorer/ui/Dockerfile +++ b/explorer/ui/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16-alpine as build +FROM node:18-alpine as build RUN apk update && apk upgrade && apk add --no-cache curl python3 make g++ RUN curl -L https://github.com/ergoplatform/explorer-frontend/archive/refs/heads/master.tar.gz > /tmp/src.tar.gz && \ tar -xf /tmp/src.tar.gz -C /tmp && \ @@ -14,20 +14,21 @@ RUN sed -i "s|_api_|${API}|g" /app/src/config/environment.default.ts && \ # Set configured network name in config templates sed -i "s|_name_|${LABEL}|g" /app/src/config/environment.default.ts && \ sed -i "s|_name_|${LABEL}|g" /app/src/config/environment.prod.ts -# Build -RUN npm i --location=global corepack && \ - yarn && \ +# Update npm and install dependencies +RUN npm install -g npm@latest && \ yarn install && \ - yarn run build && \ - yarn cache clean && \ - yarn global add serve + yarn add @babel/plugin-proposal-private-property-in-object --dev && \ + npx update-browserslist-db@latest +# Set Node environment to use legacy OpenSSL provider +ENV NODE_OPTIONS=--openssl-legacy-provider +# Build +RUN yarn run build && \ + yarn cache clean -FROM node:16-alpine +FROM node:18-alpine ENV NODE_ENV production WORKDIR /app -COPY --from=build /app/node_modules ./node_modules COPY --from=build /app/build ./build -RUN npm i --location=global corepack && \ - yarn global add serve +RUN yarn global add serve CMD ["serve", "-s", "build"] EXPOSE 3000