Skip to content

Instantly share code, notes, and snippets.

@julianwachholz
Created July 3, 2020 13:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save julianwachholz/18b372b21df762c755822dab120b8adb to your computer and use it in GitHub Desktop.
Save julianwachholz/18b372b21df762c755822dab120b8adb to your computer and use it in GitHub Desktop.
CapRover Simple React SPA Example
{
"schemaVersion": 2,
"dockerfilePath": "./Dockerfile"
}
FROM node:12-alpine AS build
WORKDIR /app
RUN apk --no-cache add git
ARG REACT_APP_SENTRY_DSN
COPY web/package.json web/package-lock.json /app/web/
RUN cd /app/web && npm install
COPY . /app
RUN export REACT_APP_RELEASE=$(git rev-parse HEAD) \
&& cd /app/web \
&& npm run build
FROM socialengine/nginx-spa:latest
COPY --from=build /app/web/build /app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment