File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -7,20 +7,31 @@ COPY tsconfig.json ./
7
7
COPY scripts/setup.sh ./scripts/
8
8
9
9
RUN chmod +x ./scripts/setup.sh && \
10
+ echo "INFO: Installing OS build dependencies" && \
10
11
./scripts/setup.sh && \
12
+ echo "INFO: Running npm ci" && \
11
13
npm ci && \
14
+ echo "INFO: Removing OS build dependencies and cleaning up apt" && \
15
+ apt-get purge -y --auto-remove python3 pkg-config build-essential libcairo2-dev libpango1.0-dev && \
16
+ apt-get clean && \
17
+ rm -rf /var/lib/apt/lists/* && \
18
+ echo "INFO: Cleaning npm cache" && \
12
19
npm cache clean --force
13
20
14
- COPY . .
21
+ COPY index.html index.html
22
+ COPY vite.config.ts vite.config.ts
23
+ COPY src src
24
+ COPY public public
25
+
15
26
16
27
RUN npm run build && npm prune --production
17
28
18
- FROM nginx:stable-alpine
29
+ FROM nginx:stable-alpine AS production
19
30
ARG NGINX_CONFIG="nginx.conf"
20
31
21
32
COPY --from=build /usr/src/app/build /usr/share/nginx/html
22
33
COPY configs/${NGINX_CONFIG} /etc/nginx/conf.d/default.conf
23
34
24
- EXPOSE 443
35
+ EXPOSE 80 443
25
36
26
37
CMD ["nginx" , "-g" , "daemon off;" ]
You can’t perform that action at this time.
0 commit comments