react-frontend #2
5
Makefile
5
Makefile
|
@ -10,6 +10,11 @@ test:
|
|||
build:
|
||||
go build ${LDFLAGS}
|
||||
|
||||
build-frontend:
|
||||
cd build/react-frontend && npm run build
|
||||
rm -rf web/react-frontend ; mkdir -p web/react-frontend
|
||||
cp -r build/react-frontend/build/* web/react-frontend/
|
||||
|
||||
deps:
|
||||
go get
|
||||
|
||||
|
|
|
@ -59,6 +59,11 @@ steps:
|
|||
- make test
|
||||
- make
|
||||
|
||||
- name: build-frontend
|
||||
image: node
|
||||
commands:
|
||||
- make frontend
|
||||
|
||||
trigger:
|
||||
ref:
|
||||
- refs/heads/main
|
||||
|
|
|
@ -5,9 +5,14 @@ COPY internal/ /go/src/git.martyn.berlin/martyn/twitchsingstools/internal/
|
|||
COPY Makefile /go/src/git.martyn.berlin/martyn/twitchsingstools/
|
||||
RUN cd /go/src/git.martyn.berlin/martyn/twitchsingstools/; make deps ; make static
|
||||
|
||||
FROM scratch
|
||||
FROM library/node:14.7.0-stretch AS frontend
|
||||
COPY build/react-frontend /frontend
|
||||
RUN cd /frontend; npm run build
|
||||
|
||||
FROM debian
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
COPY --from=builder /go/src/git.martyn.berlin/martyn/twitchsingstools /app/
|
||||
COPY web/ /app/web/
|
||||
COPY --from=frontend /frontend/build /app/web/react-frontend
|
||||
WORKDIR /app
|
||||
CMD ["/app/twitchsingstools"]
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 5d2ed3c5be7d050e48b6bedbd2591543d732bf52
|
Loading…
Reference in New Issue