diff --git a/Dockerfile b/Dockerfile index 3562df41..31f9f4fc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,14 @@ +# Use lightweight Nginx image +FROM nginx:alpine -FROM node:21-alpine as builder +# Remove default nginx static files +RUN rm -rf /usr/share/nginx/html/* -ARG API_BASE_URL="https://www.sangwaritaxi.com/" +# Copy your HTML/CSS/JS files into nginx's web root +COPY . /usr/share/nginx/html -ENV REACT_APP_API_BASE_URL $API_BASE_URL +# Expose port 80 for the web server +EXPOSE 80 -WORKDIR /app - -COPY package.json package.json -COPY yarn.lock yarn.lock - -RUN yarn install --frozen-lockfile - -COPY . . - -RUN yarn build - - -FROM scratch - -WORKDIR /app - -COPY --from=builder /app/build ./build - -CMD ["sh"] -# new +# Start nginx +CMD ["nginx", "-g", "daemon off;"]