Skip to content

Commit

Permalink
[Activity Monitor] Switch from Nginx to Node.js serve (#252)
Browse files Browse the repository at this point in the history
In the Dockerfile, the base image has been changed from Nginx to
Node.js. The configuration files specific to Nginx have been removed and
replaced with 'serve', a simple Node.js static file server. This removes
the overhead of having to configure Nginx for a simple static file
serving scenario.
  • Loading branch information
AlexGodbehere authored Apr 19, 2024
2 parents 04e3637 + 5586b15 commit 399aa96
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions acs-activity-monitor/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ RUN bun run build
RUN rm -rf node_modules

# production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html

# Echo listen 8080 to a new file /etc/nginx/templates/default.conf.template
RUN mkdir -p /etc/nginx/templates
RUN echo "listen 8080;" > /etc/nginx/templates/default.conf.template

FROM node:alpine as production-stage
WORKDIR /app
COPY --from=build-stage /app/dist /app
RUN npm install -g serve
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]
CMD ["serve", "-s", ".", "-l", "8080"]

0 comments on commit 399aa96

Please sign in to comment.