react-frontend #2

Merged
martyn merged 2 commits from react-frontend into main 2020-08-01 09:40:06 +00:00
4 changed files with 17 additions and 1 deletions
Showing only changes of commit 4c27138497 - Show all commits

View File

@ -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

View File

@ -59,6 +59,11 @@ steps:
- make test
- make
- name: build-frontend
image: node
commands:
- make frontend
trigger:
ref:
- refs/heads/main

View File

@ -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"]

1
build/react-frontend Submodule

@ -0,0 +1 @@
Subproject commit 5d2ed3c5be7d050e48b6bedbd2591543d732bf52