changed docker
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/pr Build is passing Details

This commit is contained in:
hardik 2025-09-29 15:14:47 +05:30
parent 81ccf38bf9
commit 6c08b7705f
2 changed files with 23 additions and 17 deletions

View File

@ -1,17 +1,13 @@
kind: pipeline kind: pipeline
type: docker
name: Build Image name: Build Image
steps: steps:
# - name: Lint Check
# image: node:21-alpine
# commands:
# - yarn install
# # - yarn lint
- name: Build Docker Image - name: Build Docker Image
image: plugins/docker image: plugins/docker
settings: settings:
build_args: "API_BASE_URL=https://www.sangwaritaxi.com/" build_args:
- API_BASE_URL=https://www.sangwaritaxi.com/
username: username:
from_secret: docker_username from_secret: docker_username
password: password:
@ -42,9 +38,3 @@ steps:
- main - main
event: event:
- push - push
# trigger:
# branch:
# - main
# - feature/env_api_url
# event:
# - push

View File

@ -10,14 +10,30 @@ WORKDIR /app
# Copy package.json and package-lock.json # Copy package.json and package-lock.json
COPY package*.json ./ COPY package*.json ./
# Install ALL dependencies (including devDependencies) # Install dependencies
RUN npm install RUN npm install
# Copy source files # Copy all source files
COPY . . COPY . .
# Pass API URL to Vite # Pass API URL to Vite
ENV VITE_API_BASE_URL=$API_BASE_URL ENV VITE_API_BASE_URL=$API_BASE_URL
# Build the app # Build the React app
# RUN npm run build 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. dont 404)
# COPY nginx.conf /etc/nginx/conf.d/default.conf
# EXPOSE 80
# CMD ["nginx", "-g", "daemon off;"]