File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-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- ARG APP_VERSION=" 1.0.0"
5- ARG GITHUB_URL=" https://github.com/x1unix/go-playground"
4+ ARG APP_VERSION=1.0.0
5+ ARG GITHUB_URL=https://github.com/x1unix/go-playground
66RUN yarn install --silent && REACT_APP_VERSION=$APP_VERSION REACT_APP_GITHUB_URL=$GITHUB_URL yarn build
77
88FROM golang:1.13-alpine as build
@@ -11,7 +11,9 @@ COPY cmd ./cmd
1111COPY pkg ./pkg
1212COPY go.mod .
1313COPY go.sum .
14- RUN go build -o server ./cmd/playground
14+ RUN go build -o server ./cmd/playground && \
15+ GOOS=js GOARCH=wasm go build -o ./worker.wasm ./cmd/webworker && \
16+ cp $(go env GOROOT)/misc/wasm/wasm_exec.js .
1517
1618FROM golang:1.13-alpine as production
1719WORKDIR /opt/playground
@@ -21,5 +23,7 @@ ENV APP_DEBUG=false
2123COPY data ./data
2224COPY --from=ui-build /tmp/web/build ./public
2325COPY --from=build /tmp/playground/server .
26+ COPY --from=build /tmp/playground/worker.wasm ./public
27+ COPY --from=build /tmp/playground/wasm_exec.js ./public
2428EXPOSE 8000
2529ENTRYPOINT /opt/playground/server -f=/opt/playground/data/packages.json -addr=:8000 -clean-interval=${APP_CLEAN_INTERVAL} -debug=${APP_DEBUG}
You can’t perform that action at this time.
0 commit comments