Fix build
This commit is contained in:
parent
291438b325
commit
0ae00d96dc
1 changed files with 2 additions and 10 deletions
12
Dockerfile
12
Dockerfile
|
@ -9,18 +9,10 @@ COPY tsconfig.json ./
|
||||||
COPY public ./public
|
COPY public ./public
|
||||||
COPY src ./src
|
COPY src ./src
|
||||||
|
|
||||||
|
RUN export REACT_APP_VERSION=$(git describe --always)
|
||||||
|
RUN export REACT_APP_DATE=$(date +"%Y-%m-%d %H:%M:%S")
|
||||||
ARG REACT_APP_TCL_AUTH
|
ARG REACT_APP_TCL_AUTH
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
FROM alpine/git AS git
|
|
||||||
WORKDIR /app
|
|
||||||
COPY .git ./
|
|
||||||
RUN git describe --always > /version
|
|
||||||
RUN date +"%Y-%m-%d %H:%M:%S" > /date
|
|
||||||
|
|
||||||
FROM nginx AS prod
|
FROM nginx AS prod
|
||||||
COPY --from=git /version /app/.version
|
|
||||||
COPY --from=git /date /app/.date
|
|
||||||
RUN export REACT_APP_VERSION=$(cat /app/.version)
|
|
||||||
RUN export REACT_APP_DATE=$(cat /app/.date)
|
|
||||||
COPY --from=build /app/build /usr/share/nginx/html
|
COPY --from=build /app/build /usr/share/nginx/html
|
||||||
|
|
Loading…
Reference in a new issue