mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
This commit is contained in:
+14
-25
@@ -1,26 +1,15 @@
|
|||||||
# ---------- Build Stage ----------
|
FROM node:14 as build
|
||||||
FROM node:16-alpine AS build
|
WORKDIR /app
|
||||||
|
COPY ./package*.json /app/
|
||||||
|
RUN npm config set unsafe-perm true
|
||||||
|
RUN npm install -g ionic
|
||||||
|
RUN npm config set legacy-peer-deps true
|
||||||
|
RUN npm i -D typescript@4.3.5
|
||||||
|
RUN npm install --save --legacy-peer-deps
|
||||||
|
COPY ./ /app/
|
||||||
|
RUN ionic build --prod
|
||||||
|
|
||||||
WORKDIR /app
|
FROM nginx:latest
|
||||||
|
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||||
# Install Ionic CLI (optional but safe)
|
RUN rm -rf /usr/share/nginx/html/*
|
||||||
RUN npm install -g @ionic/cli@6 @angular/cli@12
|
COPY /www/ /usr/share/nginx/html/
|
||||||
|
|
||||||
COPY package*.json ./
|
|
||||||
RUN npm install
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
# Build production app
|
|
||||||
RUN ionic build --prod
|
|
||||||
|
|
||||||
# ---------- Run Stage ----------
|
|
||||||
FROM nginx:alpine
|
|
||||||
|
|
||||||
# Copy build output to nginx
|
|
||||||
COPY --from=build /app/www /usr/share/nginx/html
|
|
||||||
|
|
||||||
# Expose port
|
|
||||||
EXPOSE 80
|
|
||||||
|
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
|
||||||
Reference in New Issue
Block a user