move frontend Dockerfile to outer folder to meet the requirement of docker compose
This commit is contained in:
parent
28735f4126
commit
e448f4d76e
@ -7,20 +7,20 @@ RUN npm config set "//npm.fontawesome.com/:_authToken" 58624E90-2685-43C6-BF0F-0
|
|||||||
RUN npm install -g http-server
|
RUN npm install -g http-server
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY package*.json ./
|
COPY frontend/package*.json ./
|
||||||
|
|
||||||
RUN npm install
|
RUN npm install
|
||||||
|
|
||||||
COPY *.js ./
|
COPY frontend/*.js ./
|
||||||
COPY *.html ./
|
COPY frontend/*.html ./
|
||||||
COPY src ./src
|
COPY frontend/src ./src
|
||||||
COPY public ./public
|
COPY frontend/public ./public
|
||||||
|
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# production stage
|
# production stage
|
||||||
FROM nginx:1.25.2 as production-stage
|
FROM nginx:1.25.2 as production-stage
|
||||||
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
COPY --from=build-stage /app/dist /usr/share/nginx/html
|
||||||
COPY nginx_docker.conf /etc/nginx/conf.d/default.conf
|
COPY frontend/nginx_docker.conf /etc/nginx/conf.d/default.conf
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
CMD ["nginx", "-g", "daemon off;"]
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
Loading…
Reference in New Issue
Block a user