mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Prepare for Docker publishing (#1771)
* prepare for docker publishing * fix links * remove that * update README * test publish worklofw * build and push on master * include gtag by default
This commit is contained in:
parent
046c0818c5
commit
f1ceeab8d9
6 changed files with 63 additions and 10 deletions
25
Dockerfile
25
Dockerfile
|
@ -1,16 +1,31 @@
|
|||
FROM node:14-alpine AS build
|
||||
FROM node:14-alpine AS deps
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
ARG REACT_APP_INCLUDE_GTAG=false
|
||||
|
||||
RUN mkdir /opt/node_app && chown node:node /opt/node_app
|
||||
WORKDIR /opt/node_app
|
||||
|
||||
USER node
|
||||
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm install
|
||||
RUN npm install --no-optional && npm cache clean --force
|
||||
ENV PATH /opt/node_app/node_modules/.bin:$PATH
|
||||
|
||||
WORKDIR /opt/node_app
|
||||
COPY . .
|
||||
ENV NODE_ENV=production
|
||||
|
||||
FROM node:14-alpine AS build
|
||||
|
||||
ARG NODE_ENV=production
|
||||
ARG REACT_APP_INCLUDE_GTAG=false
|
||||
|
||||
WORKDIR /opt/node_app
|
||||
COPY --from=deps /opt/node_app .
|
||||
RUN ls
|
||||
RUN npm run build:app
|
||||
|
||||
FROM nginx:1.17-alpine
|
||||
|
||||
COPY --from=build /usr/src/app/build /usr/share/nginx/html
|
||||
COPY --from=build /opt/node_app/build /usr/share/nginx/html
|
||||
|
||||
HEALTHCHECK CMD wget -q -O /dev/null http://localhost || exit 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue