mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 12:37:53 +00:00
68 lines
864 B
Docker
68 lines
864 B
Docker
# # Stage 1: Compile and Build angular codebase
|
|
|
|
|
|
|
|
# # Use official node image as the base image
|
|
|
|
FROM node:14.15.0 as build
|
|
|
|
# # Set up ENV
|
|
|
|
ENV NODE_ENV=production
|
|
|
|
Set the working directory
|
|
|
|
WORKDIR /usr/local/app
|
|
|
|
|
|
|
|
# # Add the source code to app
|
|
|
|
COPY ./www /usr/local/app/
|
|
|
|
|
|
|
|
# # Install all the dependencies
|
|
|
|
RUN npm config set unsafe-perm true
|
|
|
|
RUN npm ci
|
|
|
|
RUN npm audit fix
|
|
|
|
RUN npm install -g @ionic/cli
|
|
|
|
RUN npm install -g @angular/cli
|
|
|
|
RUN npm install -g cordova
|
|
|
|
RUN npm install -g cordova-res
|
|
|
|
# # # Generate the build of the application
|
|
|
|
RUN ionic build --prod
|
|
|
|
|
|
|
|
|
|
# # Stage 2: Serve app with nginx server
|
|
|
|
|
|
|
|
# # Use official nginx image as the base image
|
|
|
|
# FROM nginx:latest
|
|
|
|
|
|
|
|
# Copy the build output to replace the default nginx contents.
|
|
|
|
#COPY ./www/ /usr/share/nginx/html/
|
|
|
|
|
|
|
|
# Expose port 80
|
|
|
|
# EXPOSE 80
|
|
|
|
#CMD ["nginx", "-g", "daemon off;"] |