Skip to content

Commit e70df14

Browse files
committed
chore: update the docker file to streamline build
1 parent 51d4a08 commit e70df14

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

vis.dockerfile

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,31 @@ COPY tsconfig.json ./
77
COPY scripts/setup.sh ./scripts/
88

99
RUN chmod +x ./scripts/setup.sh && \
10+
echo "INFO: Installing OS build dependencies" && \
1011
./scripts/setup.sh && \
12+
echo "INFO: Running npm ci" && \
1113
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" && \
1219
npm cache clean --force
1320

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+
1526

1627
RUN npm run build && npm prune --production
1728

18-
FROM nginx:stable-alpine
29+
FROM nginx:stable-alpine AS production
1930
ARG NGINX_CONFIG="nginx.conf"
2031

2132
COPY --from=build /usr/src/app/build /usr/share/nginx/html
2233
COPY configs/${NGINX_CONFIG} /etc/nginx/conf.d/default.conf
2334

24-
EXPOSE 443
35+
EXPOSE 80 443
2536

2637
CMD ["nginx", "-g", "daemon off;"]

0 commit comments

Comments
 (0)