-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
65 lines (45 loc) · 1.28 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM --platform=amd64 node:16 as build-frontend
# 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
# 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
# Install all the backend dependencies
WORKDIR /app/bpni
RUN npm install
# Generate the build of the application
RUN npm run tsc
# Copy over frontend
COPY --from=build-frontend /app/bpni/dist/blueprintnotincluded /app/bpni/app/public
# Expose port 3000
EXPOSE 3000
#RUN npm run dev
ENTRYPOINT npm run dev
ENV SITE_URL=http://localhost:3000
ENV ENV_NAME=development
ENV SMTP_HOST=localhost
ENV SMTP_PORT=25
ENV SMTP_USER=
ENV SMTP_PASS=