DONE: cicd pipeline for frontend that uses ip first
Build Docker Image / build-backend (push) Successful in 16s
Build Docker Image / build-admin (push) Failing after 29s
Build Docker Image / build-teller (push) Successful in 30s

This commit is contained in:
ISMAIL MASSERAN
2026-07-23 12:25:11 +08:00
parent cdb1eb0902
commit c55736ee86
14 changed files with 339 additions and 49 deletions
+8
View File
@@ -0,0 +1,8 @@
node_modules
dist
.git
.gitignore
*.md
.env
.env.*
.DS_Store
+17 -6
View File
@@ -1,10 +1,21 @@
FROM node:21-alpine AS build
WORKDIR /teller-app
COPY package*.json .
RUN npm install
# Build stage
FROM node:20-bookworm AS build
WORKDIR /app
ARG VITE_API_URL=http://localhost:8080
ARG VITE_GOLD_PRICE_URL
ENV VITE_API_URL=$VITE_API_URL
ENV VITE_GOLD_PRICE_URL=$VITE_GOLD_PRICE_URL
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["npm", "run", "preview"]
# Runtime stage — static SPA
FROM nginx:alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
+10
View File
@@ -0,0 +1,10 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
+2 -1
View File
@@ -1,4 +1,5 @@
export const SERVER_URL = 'http://localhost:8080';
export const SERVER_URL =
import.meta.env.VITE_API_URL ?? 'http://localhost:8080';
export const GOLD_PRICE_URL =
import.meta.env.VITE_GOLD_PRICE_URL ??