File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 11FROM node:13-alpine as ui-build
22COPY web /tmp/web
33WORKDIR /tmp/web
4- RUN yarn install --silent && yarn build
4+ ARG APP_VERSION="1.0.0"
5+ ARG GITHUB_URL="https://github.com/x1unix/go-playground"
6+ RUN REACT_APP_VERSION=${APP_VERSION} REACT_APP_GITHUB_URL=${GITHUB_URL} yarn install --silent && yarn build
57
68FROM golang:1.13-alpine as build
79WORKDIR /tmp/playground
@@ -14,8 +16,9 @@ RUN go build -o server ./cmd/playground
1416FROM golang:1.13-alpine as production
1517WORKDIR /opt/playground
1618ENV GOROOT /usr/local/go
19+ ENV APP_CLEAN_INTERVAL=10m
1720COPY data ./data
1821COPY --from=ui-build /tmp/web/build ./public
1922COPY --from=build /tmp/playground/server .
2023EXPOSE 8000
21- ENTRYPOINT [ " /opt/playground/server" , " -f=/opt/playground/data/packages.json" , " -addr=:8000" ]
24+ ENTRYPOINT /opt/playground/server -f=/opt/playground/data/packages.json -addr=:8000 -clean-interval=${APP_CLEAN_INTERVAL}
Original file line number Diff line number Diff line change @@ -23,4 +23,4 @@ docker-make-image:
2323 echo " required parameter TAG is undefined" && exit 1; \
2424 fi ;
2525 @echo " - Building '$( IMG_NAME) :latest' $( TAG) ..."
26- docker image build -t $(IMG_NAME ) :latest -t $(IMG_NAME ) :$(TAG ) -f $(DOCKERFILE ) .
26+ docker image build -t $(IMG_NAME ) :latest -t $(IMG_NAME ) :$(TAG ) -f $(DOCKERFILE ) --build-arg APP_VERSION= $( TAG ) .
You can’t perform that action at this time.
0 commit comments