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
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json ./
|
||||
COPY frontend/package*.json ./
|
||||
|
||||
RUN npm install
|
||||
|
||||
COPY *.js ./
|
||||
COPY *.html ./
|
||||
COPY src ./src
|
||||
COPY public ./public
|
||||
COPY frontend/*.js ./
|
||||
COPY frontend/*.html ./
|
||||
COPY frontend/src ./src
|
||||
COPY frontend/public ./public
|
||||
|
||||
RUN npm run build
|
||||
|
||||
# production stage
|
||||
FROM nginx:1.25.2 as production-stage
|
||||
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
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
Loading…
Reference in New Issue
Block a user