Skip to content

Commit 6954fe3

Browse files
committed
Revert back frontend docker files
1 parent 3f11ea9 commit 6954fe3

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

frontend/.dockerignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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

frontend/Dockerfile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+

0 commit comments

Comments
 (0)