Skip to content

Commit 553b69b

Browse files
committed
Fix image repo: amar pathagar frontend image build
1 parent 35aa14f commit 553b69b

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.github/workflows/build-and-push.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ jobs:
5050
push: true
5151
tags: ${{ steps.meta.outputs.tags }}
5252
labels: ${{ steps.meta.outputs.labels }}
53+
build-args: |
54+
NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL || 'https://api.amarpathagar.nesohq.org' }}
5355
cache-from: type=gha
5456
cache-to: type=gha,mode=max
5557
platforms: linux/amd64,linux/arm64

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ RUN npm ci
1818
FROM node:18-alpine AS builder
1919
WORKDIR /app
2020

21+
# Build argument for API URL
22+
ARG NEXT_PUBLIC_API_URL=http://localhost:8080
23+
ENV NEXT_PUBLIC_API_URL=$NEXT_PUBLIC_API_URL
24+
2125
# Copy dependencies
2226
COPY --from=deps /app/node_modules ./node_modules
2327

@@ -27,7 +31,7 @@ COPY . .
2731
# Create public directory if it doesn't exist
2832
RUN mkdir -p public
2933

30-
# Build the application
34+
# Build the application with the provided API URL
3135
RUN npm run build
3236

3337
# --------------------------------------------------

0 commit comments

Comments
 (0)