changed docker #15

Merged
hardik merged 1 commits from fix/ssh_issue into main 2025-09-29 15:17:06 +05:30
2 changed files with 23 additions and 17 deletions
Showing only changes of commit 6c08b7705f - Show all commits

View File

@ -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

View File

@ -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. dont 404)
# COPY nginx.conf /etc/nginx/conf.d/default.conf
# EXPOSE 80
# CMD ["nginx", "-g", "daemon off;"]