File tree Expand file tree Collapse file tree 6 files changed +201
-0
lines changed
Expand file tree Collapse file tree 6 files changed +201
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build & Push Container
2+
3+ on :
4+ push :
5+ branches : [ main ]
6+ workflow_dispatch :
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+
12+ permissions :
13+ contents : read
14+ packages : write
15+
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+
20+ - uses : docker/setup-qemu-action@v3
21+ - uses : docker/setup-buildx-action@v3
22+
23+ - name : Login to registry
24+ uses : docker/login-action@v3
25+ with :
26+ username : ${{ secrets.DOCKERHUB_USERNAME }}
27+ password : ${{ secrets.DOCKERHUB_TOKEN }}
28+
29+ - name : Build & push mainnet
30+ uses : docker/build-push-action@v5
31+ with :
32+ context : .
33+ file : ./Dockerfile_mainnet
34+ push : true
35+ platforms : linux/amd64
36+ build-args : |
37+ MORALIS_API_KEY=${{ secrets.MORALIS_API_KEY }}
38+ ALCHEMY_API_KEY=${{ secrets.ALCHEMY_API_KEY }}
39+ tags : |
40+ ratio1/explorer:mainnet
41+
42+
Original file line number Diff line number Diff line change 1+ name : Build & Push Container
2+
3+ on :
4+ push :
5+ branches : [ development ]
6+ workflow_dispatch :
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+
12+ permissions :
13+ contents : read
14+ packages : write
15+
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+
20+ - uses : docker/setup-qemu-action@v3
21+ - uses : docker/setup-buildx-action@v3
22+
23+ - name : Login to registry
24+ uses : docker/login-action@v3
25+ with :
26+ username : ${{ secrets.DOCKERHUB_USERNAME }}
27+ password : ${{ secrets.DOCKERHUB_TOKEN }}
28+
29+ - name : Build & push devnet
30+ uses : docker/build-push-action@v5
31+ with :
32+ context : .
33+ file : ./Dockerfile_devnet
34+ push : true
35+ platforms : linux/amd64
36+ build-args : |
37+ MORALIS_API_KEY=${{ secrets.MORALIS_API_KEY }}
38+ ALCHEMY_API_KEY=${{ secrets.ALCHEMY_API_KEY }}
39+ tags : |
40+ ratio1/explorer:devnet
41+
42+ - name : Build & push testnet
43+ uses : docker/build-push-action@v5
44+ with :
45+ context : .
46+ file : ./Dockerfile_testnet
47+ push : true
48+ platforms : linux/amd64
49+ build-args : |
50+ MORALIS_API_KEY=${{ secrets.MORALIS_API_KEY }}
51+ ALCHEMY_API_KEY=${{ secrets.ALCHEMY_API_KEY }}
52+ tags : |
53+ ratio1/explorer:testnet
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ yarn-error.log*
3232
3333# local env files
3434.env * .local
35+ .env
3536
3637# vercel
3738.vercel
Original file line number Diff line number Diff line change 1+ ## -------- Build stage ----------------------------------------------------
2+ FROM node:18-alpine AS builder
3+ WORKDIR /app
4+
5+ ARG MORALIS_API_KEY
6+ ARG ALCHEMY_API_KEY
7+
8+ COPY package*.json ./
9+ RUN npm ci
10+
11+ COPY . .
12+
13+ ENV NODE_ENV=production \
14+ NEXT_TELEMETRY_DISABLED=1 \
15+ MORALIS_API_KEY=$MORALIS_API_KEY \
16+ ALCHEMY_API_KEY=$ALCHEMY_API_KEY
17+
18+ RUN npm run build:devnet
19+
20+ ##
21+ ## -------- Runtime stage --------------------------------------------------
22+ ##
23+ FROM node:18-slim AS runtime
24+ WORKDIR /app
25+
26+
27+ ENV NODE_ENV=production \
28+ PORT=32101
29+
30+ COPY --from=builder /app/.next/standalone ./
31+ COPY --from=builder /app/.next/static ./.next/static
32+ COPY --from=builder /app/public ./public
33+
34+ EXPOSE 32101
35+ CMD ["node", "server.js"]
Original file line number Diff line number Diff line change 1+ ## -------- Build stage ----------------------------------------------------
2+ FROM node:18-alpine AS builder
3+ WORKDIR /app
4+
5+ ARG MORALIS_API_KEY
6+ ARG ALCHEMY_API_KEY
7+
8+ COPY package*.json ./
9+ RUN npm ci
10+
11+ COPY . .
12+
13+ ENV NODE_ENV=production \
14+ NEXT_TELEMETRY_DISABLED=1 \
15+ MORALIS_API_KEY=$MORALIS_API_KEY \
16+ ALCHEMY_API_KEY=$ALCHEMY_API_KEY
17+
18+ RUN npm run build:mainnet
19+
20+ ##
21+ ## -------- Runtime stage --------------------------------------------------
22+ ##
23+ FROM node:18-slim AS runtime
24+ WORKDIR /app
25+
26+
27+ ENV NODE_ENV=production \
28+ PORT=32101
29+
30+ COPY --from=builder /app/.next/standalone ./
31+ COPY --from=builder /app/.next/static ./.next/static
32+ COPY --from=builder /app/public ./public
33+
34+ EXPOSE 32101
35+ CMD ["node", "server.js"]
Original file line number Diff line number Diff line change 1+ ## -------- Build stage ----------------------------------------------------
2+ FROM node:18-alpine AS builder
3+ WORKDIR /app
4+
5+ ARG MORALIS_API_KEY
6+ ARG ALCHEMY_API_KEY
7+
8+ COPY package*.json ./
9+ RUN npm ci
10+
11+ COPY . .
12+
13+ ENV NODE_ENV=production \
14+ NEXT_TELEMETRY_DISABLED=1 \
15+ MORALIS_API_KEY=$MORALIS_API_KEY \
16+ ALCHEMY_API_KEY=$ALCHEMY_API_KEY
17+
18+ RUN npm run build:testnet
19+
20+ ##
21+ ## -------- Runtime stage --------------------------------------------------
22+ ##
23+ FROM node:18-slim AS runtime
24+ WORKDIR /app
25+
26+
27+ ENV NODE_ENV=production \
28+ PORT=32101
29+
30+ COPY --from=builder /app/.next/standalone ./
31+ COPY --from=builder /app/.next/static ./.next/static
32+ COPY --from=builder /app/public ./public
33+
34+ EXPOSE 32101
35+ CMD ["node", "server.js"]
You can’t perform that action at this time.
0 commit comments