Commit 474dab0f authored by Alex Pinto's avatar Alex Pinto

added docker files

parent 8f6b9676
FROM openjdk:11-jre-slim
COPY target/warehouse-0.0.1-SNAPSHOT.jar /usr/local/lib/warehouse.jar
EXPOSE 8080
ENTRYPOINT ["java","-jar","/usr/local/lib/warehouse.jar"]
# BELOW IS FOR LOCAL TESTING
# FROM maven:3.6.0-jdk-11-slim AS build
# COPY src /home/app/src
# COPY pom.xml /home/app
# RUN mvn -f /home/app/pom.xml clean package -DskipTests
#
# FROM openjdk:11-jre-slim
# COPY --from=build /home/app/target/warehouse-0.0.1-SNAPSHOT.jar /usr/local/lib/warehouse.jar
# EXPOSE 8080
# ENTRYPOINT ["java","-jar","/usr/local/lib/warehouse.jar"]
FROM node:13.12.0-alpine as build
WORKDIR /app
ENV PATH /app/node_modules/.bin:$PATH
COPY package.json ./
COPY package-lock.json ./
RUN npm ci
RUN npm install react-scripts@3.4.1 -g
COPY . ./
RUN npm run build
FROM nginx:stable-alpine
COPY --from=build /app/build /usr/share/nginx/html
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment