File tree Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Expand file tree Collapse file tree 2 files changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Items that don't need to be in a Docker image.
2
+ # Anything not used by the build system should go here.
3
+ Dockerfile
4
+ .dockerignore
5
+ .gitignore
6
+ README.md
7
+
8
+ # Artifacts that will be built during image creation.
9
+ # This should contain all files created during `npm run build`.
10
+ build
11
+ node_modules
Original file line number Diff line number Diff line change
1
+ FROM node:18-alpine AS vite-app
2
+ # ENV NODE_ENV production
3
+ WORKDIR /frontend
4
+
5
+
6
+ COPY . .
7
+ # COPY package*.json ./
8
+ # COPY tsconfig*.json ./
9
+ # COPY index.html ./
10
+ # COPY vite.config.ts ./
11
+
12
+ RUN npm install -g pnpm
13
+
14
+ RUN pnpm install
15
+ COPY . .
16
+
17
+
18
+ RUN pnpm run build
19
+
20
+ FROM nginx:alpine
21
+
22
+ # COPY /nginx ./etc/nginx
23
+ # ADD nginx /etc/nginx
24
+ # WORKDIR /frontend/dist
25
+
26
+ WORKDIR /usr/share/nginx/
27
+ RUN rm -rf html
28
+ RUN mkdir html
29
+ WORKDIR /
30
+
31
+ # RUN rm -rf *
32
+
33
+
34
+ # COPY --from=builder /frontend/dist .
35
+ # COPY --from=builder /frontend/dist /etc/nginx/html
36
+ COPY nginx/nginx.conf /etc/nginx
37
+ COPY --from=vite-app /frontend/dist /usr/share/nginx/html
38
+ # STOPSIGNAL SIGTERM
39
+ # EXPOSE 3000
40
+
41
+ ENTRYPOINT ["nginx" , "-g" , "daemon off;" ]
42
+
You can’t perform that action at this time.
0 commit comments