Skip to content

Commit

Permalink
🚀 prepare to deploy batcher on Mainnet 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin Burg authored and quentin-burg committed Sep 21, 2023
1 parent a895470 commit e55982b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 52 deletions.
3 changes: 0 additions & 3 deletions batcher-ui/Dockerfile.ghostnet
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ FROM node:latest as builder

WORKDIR /app

# ENV ENV=ghostnet

COPY ./package.json ./

RUN npm install
Expand All @@ -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
Expand Down
13 changes: 8 additions & 5 deletions batcher-ui/Dockerfile.mainnet
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@ COPY ./package.json ./
RUN npm install

COPY ./tsconfig.json ./jsconfig.json ./
COPY ./pages ./pages
COPY ./styles ./styles
COPY ./src ./src
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"]
26 changes: 0 additions & 26 deletions batcher-ui/Dockerfile.staging

This file was deleted.

4 changes: 2 additions & 2 deletions batcher-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions batcher-ui/src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ const Footer = () => (
<a
href={`https://${
process.env.NEXT_PUBLIC_NETWORK_TARGET === 'ghostnet'
? 'ghostnet.'
: ''
? ''
: 'ghostnet.'
}batcher.marigold.dev/`}
target="_blank"
rel="noreferrer">
{process.env.NEXT_PUBLIC_NETWORK_TARGET === 'ghostnet'
? 'Batcher Ghostnet'
: 'Batcher Mainnet'}
? 'Batcher Mainnet'
: 'Batcher Ghostnet'}
</a>
</div>
<div>
Expand Down
13 changes: 1 addition & 12 deletions batcher-ui/src/config/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down

0 comments on commit e55982b

Please sign in to comment.