Update Dockerfile and vite.config.ts
This commit is contained in:
parent
771b8a0a9f
commit
d4bdb8cf7b
30
Dockerfile
30
Dockerfile
@ -1,18 +1,18 @@
|
||||
FROM node:lts-alpine as build-stage
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
# FROM node:lts-alpine as build-stage
|
||||
# WORKDIR /app
|
||||
# COPY package*.json ./
|
||||
# RUN npm install
|
||||
# COPY . .
|
||||
# RUN npm run build
|
||||
|
||||
FROM nginx:stable-alpine as production-stage
|
||||
COPY --from=build-stage /app/build /usr/share/nginx/html
|
||||
COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf
|
||||
# FROM nginx:stable-alpine as production-stage
|
||||
# COPY --from=build-stage /app/build /usr/share/nginx/html
|
||||
# COPY --from=build-stage /app/nginx.conf /etc/nginx/nginx.conf
|
||||
# EXPOSE 32166
|
||||
# CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
FROM nginx:stable-alpine
|
||||
COPY /build /usr/share/nginx/html
|
||||
COPY /nginx.conf /etc/nginx/nginx.conf
|
||||
EXPOSE 32166
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
# FROM nginx:stable-alpine
|
||||
# COPY /dist /usr/share/nginx/html
|
||||
# COPY /nginx.conf /etc/nginx/nginx.conf
|
||||
# EXPOSE 32166
|
||||
# CMD ["nginx", "-g", "daemon off;"]
|
@ -25,7 +25,7 @@ export default defineConfig({
|
||||
outDir: 'build',
|
||||
emptyOutDir: true,
|
||||
chunkSizeWarningLimit: 4096,
|
||||
cssCodeSplit: true,
|
||||
cssMinify: true,
|
||||
// cssCodeSplit: true,
|
||||
// cssMinify: true,
|
||||
}
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user