-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
1,662 additions
and
1,990 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,33 @@ | ||
FROM --platform=amd64 node:16 as build-frontend | ||
# Cannot use alpine because we need a distro that uses glibgc instead of musl for node-canvas | ||
# eg: https://github.com/nodejs/build/issues/1140 | ||
# canvas prebuilds to target https://github.com/Automattic/node-canvas/releases | ||
FROM --platform=amd64 node:18-slim | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
|
||
# Add the source code to app | ||
COPY ./frontend /app/bpni | ||
COPY ./lib /app/lib | ||
|
||
# Generate the lib packages | ||
WORKDIR /app/lib | ||
RUN npm install | ||
|
||
WORKDIR /app/bpni | ||
|
||
# Install all the backend dependencies | ||
RUN npm install | ||
|
||
# Generate the build of the application | ||
RUN npm run build | ||
|
||
# Copy the build output to replace the default nginx contents. | ||
|
||
# Stage 1: Compile and Build angular codebase | ||
|
||
# Use official node image as the base image | ||
FROM --platform=amd64 node:14 as build | ||
|
||
# Set the working directory | ||
WORKDIR /app | ||
RUN npm install -g [email protected] | ||
|
||
# Add the source code to app | ||
COPY ./ /app/bpni | ||
|
||
# Set the new working dir | ||
WORKDIR /app/bpni | ||
|
||
# Generate the lib packages | ||
WORKDIR /app/bpni/lib | ||
RUN npm install | ||
RUN npm ci --verbose | ||
|
||
# Install all the backend dependencies | ||
WORKDIR /app/bpni | ||
RUN npm install | ||
# build the frontend | ||
WORKDIR /app/bpni/frontend | ||
RUN npm ci --verbose | ||
ENV NG_CLI_ANALYTICS=false | ||
RUN npm run build | ||
|
||
# Generate the build of the application | ||
# build the backend | ||
WORKDIR /app/bpni | ||
RUN npm ci --verbose | ||
RUN npm run tsc | ||
|
||
# Copy over frontend | ||
COPY --from=build-frontend /app/bpni/dist/blueprintnotincluded /app/bpni/app/public | ||
# # Copy over frontend | ||
# COPY /app/bpni/frontend/dist/blueprintnotincluded /app/bpni/app/public | ||
|
||
# Expose port 3000 | ||
EXPOSE 3000 | ||
# # Expose port 3000 | ||
# EXPOSE 3000 | ||
|
||
#RUN npm run dev | ||
ENTRYPOINT npm run dev | ||
# #RUN npm run dev | ||
# ENTRYPOINT npm run dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.