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 . .
|
||||
|
||||
# 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}
|
||||
|
||||
RUN npm run build
|
||||
|
||||
@@ -9,7 +9,7 @@ services:
|
||||
args:
|
||||
# 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.
|
||||
NEXT_PUBLIC_API_URL: http://127.0.0.1:8765
|
||||
NEXT_PUBLIC_API_URL: 0.0.0.0:8765
|
||||
restart: always
|
||||
ports:
|
||||
- "3000:3000"
|
||||
|
||||
Reference in New Issue
Block a user