diff --git a/.drone.yml b/.drone.yml index 376df575..51924d94 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,17 +1,13 @@ kind: pipeline +type: docker name: Build Image steps: - # - name: Lint Check - # image: node:21-alpine - # commands: - # - yarn install - # # - yarn lint - - name: Build Docker Image image: plugins/docker settings: - build_args: "API_BASE_URL=https://www.sangwaritaxi.com/" + build_args: + - API_BASE_URL=https://www.sangwaritaxi.com/ username: from_secret: docker_username password: @@ -42,9 +38,3 @@ steps: - main event: - push -# trigger: -# branch: -# - main -# - feature/env_api_url -# event: -# - push diff --git a/Dockerfile b/Dockerfile index dcd3067b..0313bef7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,14 +10,30 @@ WORKDIR /app # Copy package.json and package-lock.json COPY package*.json ./ -# Install ALL dependencies (including devDependencies) +# Install dependencies RUN npm install -# Copy source files +# Copy all source files COPY . . # Pass API URL to Vite ENV VITE_API_BASE_URL=$API_BASE_URL -# Build the app -# RUN npm run build +# Build the React app +RUN npm run build + + +# # ------------------------ +# # Production stage +# # ------------------------ +# FROM nginx:stable-alpine + +# # Copy React build output to Nginx html folder +# COPY --from=builder /app/build /usr/share/nginx/html + +# # Optional: custom nginx config for React Router +# # (so /about, /contact etc. don’t 404) +# COPY nginx.conf /etc/nginx/conf.d/default.conf + +# EXPOSE 80 +# CMD ["nginx", "-g", "daemon off;"]