changed docker #15
16
.drone.yml
16
.drone.yml
|
|
@ -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
|
|
||||||
|
|
|
||||||
24
Dockerfile
24
Dockerfile
|
|
@ -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. don’t 404)
|
||||||
|
# COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
# EXPOSE 80
|
||||||
|
# CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue