mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-22 20:57:09 +00:00
chore: optimized docs image
This commit is contained in:
@@ -108,7 +108,7 @@ http {
|
||||
}
|
||||
|
||||
location /docs {
|
||||
proxy_pass http://docs:3000;
|
||||
proxy_pass http://docs:80;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Stage 1: Base image
|
||||
FROM node:lts AS base
|
||||
FROM node:lts-alpine AS base
|
||||
|
||||
ENV FORCE_COLOR=0
|
||||
|
||||
@@ -14,13 +14,15 @@ WORKDIR /opt/docusaurus
|
||||
|
||||
COPY . /opt/docusaurus/
|
||||
|
||||
RUN npm ci
|
||||
RUN npm ci --omit=dev
|
||||
|
||||
RUN npm run build
|
||||
|
||||
# Stage 3: Serve with docusaurus serve
|
||||
FROM prod AS serve
|
||||
# Stage 3: Serve with nginx
|
||||
FROM nginx:stable-alpine AS serve
|
||||
|
||||
EXPOSE 3000
|
||||
COPY --from=builder /opt/docusaurus/build /usr/share/nginx/html
|
||||
|
||||
CMD ["npm", "run", "serve", "--", "--host", "0.0.0.0", "--no-open"]
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
Reference in New Issue
Block a user