File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ RUN npm ci
1818FROM node:18-alpine AS builder
1919WORKDIR /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
2226COPY --from=deps /app/node_modules ./node_modules
2327
@@ -27,7 +31,7 @@ COPY . .
2731# Create public directory if it doesn't exist
2832RUN mkdir -p public
2933
30- # Build the application
34+ # Build the application with the provided API URL
3135RUN npm run build
3236
3337# --------------------------------------------------
You can’t perform that action at this time.
0 commit comments