Skip to content

Instantly share code, notes, and snippets.

@rijdz
Last active September 15, 2019 16:03
Show Gist options
  • Save rijdz/69733b6bc9045d0b83fc5f36e02c037f to your computer and use it in GitHub Desktop.
Save rijdz/69733b6bc9045d0b83fc5f36e02c037f to your computer and use it in GitHub Desktop.
#Check Memory and CPU usage
docker ps -q | xargs docker stats --no-stream
# CRA + Nginx Template
# Stage 1 - the build process
FROM node:8 as build-deps
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn
COPY . ./
RUN yarn build
# Stage 2 - the production environment
FROM nginx:1.17-alpine
COPY --from=build-deps /usr/src/app/build /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
firewall-cmd --permanent --zone=trusted --add-interface=docker0
firewall-cmd --permanent --zone=trusted --add-port=4243/tcp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment