From aa228e5b33c0f63c7b280dcd81638d7a2d518266 Mon Sep 17 00:00:00 2001 From: Quentin Burg Date: Tue, 26 Sep 2023 11:29:06 +0200 Subject: [PATCH] :rocket: prepare release to mainnet --- batcher-ui/Dockerfile.ghostnet | 5 +---- batcher-ui/Dockerfile.mainnet | 15 +++++++++------ batcher-ui/Dockerfile.staging | 26 -------------------------- batcher-ui/package.json | 4 ++-- batcher-ui/src/components/Footer.tsx | 8 ++++---- batcher-ui/src/config/env.ts | 13 +------------ 6 files changed, 17 insertions(+), 54 deletions(-) delete mode 100644 batcher-ui/Dockerfile.staging diff --git a/batcher-ui/Dockerfile.ghostnet b/batcher-ui/Dockerfile.ghostnet index cbdefdbf..075e9e5e 100644 --- a/batcher-ui/Dockerfile.ghostnet +++ b/batcher-ui/Dockerfile.ghostnet @@ -2,13 +2,11 @@ FROM node:latest as builder WORKDIR /app -# ENV ENV=ghostnet - COPY ./package.json ./ RUN npm install -COPY ./tsconfig.json ./jsconfig.json ./ +COPY ./tsconfig.json ./tsconfig.json ./ COPY ./pages ./pages COPY ./src ./src COPY ./styles ./styles @@ -17,7 +15,6 @@ COPY ./postcss.config.js ./postcss.config.js COPY ./next.config.js ./next.config.js COPY ./tailwind.config.js ./tailwind.config.js - RUN npm run build:ghostnet EXPOSE 80 diff --git a/batcher-ui/Dockerfile.mainnet b/batcher-ui/Dockerfile.mainnet index b93a6dbe..8f454fee 100644 --- a/batcher-ui/Dockerfile.mainnet +++ b/batcher-ui/Dockerfile.mainnet @@ -6,14 +6,17 @@ COPY ./package.json ./ RUN npm install -COPY ./tsconfig.json ./jsconfig.json ./ +COPY ./tsconfig.json ./tsconfig.json ./ +COPY ./pages ./pages COPY ./src ./src +COPY ./styles ./styles COPY ./public ./public -COPY ./img ./img -COPY ./config ./config +COPY ./postcss.config.js ./postcss.config.js +COPY ./next.config.js ./next.config.js +COPY ./tailwind.config.js ./tailwind.config.js -RUN npm run build:mainnet-ci +RUN npm run build -FROM nginx:latest +EXPOSE 80 -COPY --from=builder /app/dist /usr/share/nginx/html +CMD [ "npm", "start" ] \ No newline at end of file diff --git a/batcher-ui/Dockerfile.staging b/batcher-ui/Dockerfile.staging deleted file mode 100644 index 5787cdae..00000000 --- a/batcher-ui/Dockerfile.staging +++ /dev/null @@ -1,26 +0,0 @@ -FROM node:latest as builder - -WORKDIR /app - -# ENV ENV=ghostnet - -COPY ./package.json ./ - -RUN npm install - -COPY ./tsconfig.json ./jsconfig.json ./ -COPY ./pages ./pages -COPY ./src ./src -COPY ./styles ./styles -COPY ./public ./public -COPY ./postcss.config.js ./postcss.config.js -COPY ./next.config.js ./next.config.js -COPY ./tailwind.config.js ./tailwind.config.js - - -RUN npm run build:staging - -EXPOSE 80 - -CMD ["npm", "run", "start:staging"] - diff --git a/batcher-ui/package.json b/batcher-ui/package.json index e93dd5fb..e58b6f4e 100644 --- a/batcher-ui/package.json +++ b/batcher-ui/package.json @@ -9,8 +9,8 @@ "prettier": "prettier -c --write \"src/**/*\"", "tsc": "tsc --noEmit", "dev": "ENV=staging next dev", - "build": "next build", - "start": "next start -p 80", + "build": "ENV=mainnet next build", + "start": "ENV=mainnet next start -p 80", "start:ghostnet": "ENV=ghostnet next start -p 80", "build:ghostnet": "ENV=ghostnet next build", "start:staging": "ENV=staging next start -p 80", diff --git a/batcher-ui/src/components/Footer.tsx b/batcher-ui/src/components/Footer.tsx index a1c5e17b..11150c6c 100644 --- a/batcher-ui/src/components/Footer.tsx +++ b/batcher-ui/src/components/Footer.tsx @@ -34,14 +34,14 @@ const Footer = () => ( {process.env.NEXT_PUBLIC_NETWORK_TARGET === 'ghostnet' - ? 'Batcher Ghostnet' - : 'Batcher Mainnet'} + ? 'Batcher Mainnet' + : 'Batcher Ghostnet'}
diff --git a/batcher-ui/src/config/env.ts b/batcher-ui/src/config/env.ts index de63846a..6273cb59 100644 --- a/batcher-ui/src/config/env.ts +++ b/batcher-ui/src/config/env.ts @@ -17,18 +17,7 @@ module.exports = { 'https://storage.googleapis.com/marigold-public-bucket/batcher-logo.png', NEXT_PUBLIC_TEZOS_NODE_URI: 'https://mainnet.tezos.marigold.dev/', NEXT_PUBLIC_TZKT_URI_API: 'https://api.tzkt.io', - NEXT_PUBLIC_BATCHER_CONTRACT_HASH: 'KT1CoTu4CXcWoVk69Ukbgwx2iDK7ZA4FMSpJ', - NEXT_PUBLIC_LOCAL_STORAGE_KEY_STATE: 'batcher-state', - NEXT_PUBLIC_GA_TRACKING_ID: 'G-2K59PEELC8', - }, - staging: { - NEXT_PUBLIC_NETWORK_TARGET: 'GHOSTNET', - NEXT_PUBLIC_BATCHER_URI: 'https://ghostnet.batcher.staging.marigold.dev', - NEXT_PUBLIC_PATH_TO_BATCHER_LOGO: - 'https://storage.googleapis.com/marigold-public-bucket/batcher-logo.png', - NEXT_PUBLIC_TEZOS_NODE_URI: 'https://ghostnet.tezos.marigold.dev/', - NEXT_PUBLIC_TZKT_URI_API: 'https://api.ghostnet.tzkt.io', - NEXT_PUBLIC_BATCHER_CONTRACT_HASH: 'KT1UPMR3WkoFRJYmBBbvv4Z9bBhKYuhCx7Cq', + NEXT_PUBLIC_BATCHER_CONTRACT_HASH: 'KT1WYcNPEcd33zGVAQcn8x2MLgDUmDesx3nF', NEXT_PUBLIC_LOCAL_STORAGE_KEY_STATE: 'batcher-state', NEXT_PUBLIC_GA_TRACKING_ID: 'G-2K59PEELC8', },