docker build
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
#Front
|
||||
FROM node:18-slim
|
||||
WORKDIR /usr/local/app
|
||||
COPY notes-app/package*.json ./
|
||||
RUN npm i && npm cache clean --force
|
||||
COPY notes-app/ .
|
||||
RUN npm run build
|
||||
#Backend
|
||||
FROM node:18-slim
|
||||
WORKDIR /usr/local/app
|
||||
COPY notes-backend/package*.json ./
|
||||
RUN npm i && npm cache clean --force
|
||||
COPY notes-backend/ .
|
||||
RUN npm run build
|
||||
#nginx
|
||||
FROM nginx:alpine
|
||||
COPY nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build-react /app/build /usr/share/nginx/html
|
||||
COPY --from=build-node /app/dist /usr/share/nginx/html/api
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
Reference in New Issue
Block a user