forked from carrydela/Rs_blog_front
fix: dockerfile
This commit is contained in:
@@ -13,7 +13,7 @@ COPY --from=deps /app/node_modules ./node_modules
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Pass API URL during build time (Next.js inlines this)
|
# Pass API URL during build time (Next.js inlines this)
|
||||||
ARG NEXT_PUBLIC_API_URL
|
ARG NEXT_PUBLIC_API_URL=0.0.0.0:8765
|
||||||
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
|
ENV NEXT_PUBLIC_API_URL=${NEXT_PUBLIC_API_URL}
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ services:
|
|||||||
args:
|
args:
|
||||||
# REPLACE THIS with your actual backend URL (e.g., https://api.yourdomain.com)
|
# REPLACE THIS with your actual backend URL (e.g., https://api.yourdomain.com)
|
||||||
# Since this is a client-side var, it cannot be "localhost" if accessed from outside the server.
|
# Since this is a client-side var, it cannot be "localhost" if accessed from outside the server.
|
||||||
NEXT_PUBLIC_API_URL: http://127.0.0.1:8765
|
NEXT_PUBLIC_API_URL: 0.0.0.0:8765
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
|
|||||||
Reference in New Issue
Block a user