Skip to content

Instantly share code, notes, and snippets.

@metr1ckzu
Created May 17, 2019 06:13
Show Gist options
  • Save metr1ckzu/c7067616b9dc31e41e4e4508ba288a68 to your computer and use it in GitHub Desktop.
Save metr1ckzu/c7067616b9dc31e41e4e4508ba288a68 to your computer and use it in GitHub Desktop.
# Stage 1 - the build process
FROM node:10.13.0-slim as build-deps
WORKDIR /usr/src/app
COPY . /usr/src/app
ARG API_URL
ARG KYC_API_URL
RUN npm install
RUN REACT_APP_API_URL=${API_URL} REACT_APP_KYC_API_URL=${KYC_API_URL} npm run build
# Stage 2 - the production environment
FROM nginx:1.15-alpine
COPY --from=build-deps /usr/src/app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment