* pipeline

* pipeline

* slack channel

* slack channel
This commit is contained in:
Rafi Greenberg
2021-01-08 10:55:17 -08:00
committed by GitHub
parent c51199111f
commit 26e25a5b23
9 changed files with 217 additions and 25 deletions

View File

@@ -1,31 +1,11 @@
# ================================
# Create image to build project
FROM node:12-alpine as builder
WORKDIR /ota-admin-portal
COPY . .
COPY .env.template ./.env
# Install the dependencies
COPY package*.json ./
RUN npm install
# Build the project
COPY . .
COPY .env.template .env
RUN npm run build
# ================================
# Create image to serve react app
FROM nginx:latest
FROM nginx:alpine
#!/bin/sh
COPY ./nginx.conf /etc/nginx/nginx.conf
## Remove default nginx index page
RUN rm -rf /usr/share/nginx/html/*
# Copy from the stahg 1
COPY --from=builder /ota-admin-portal/build /usr/share/nginx/html
EXPOSE 80 443 8080
ENTRYPOINT ["nginx", "-g", "daemon off;"]
COPY --from=builder build /usr/share/nginx/html