1
0
Fork 0

Fix Dockerfile, clean up *ignore

upload-progress
Ambrose Chua 2021-05-24 01:20:49 +08:00
parent b593556a9a
commit 0919c6b832
5 changed files with 16 additions and 7 deletions

7
.dockerignore Normal file
View File

@ -0,0 +1,7 @@
.git
.github
upl
web/node_modules
web/assets

View File

@ -48,7 +48,7 @@ jobs:
uses: actions/checkout@v2
- name: Vet code
run: go vet ./...
run: make vet
format:
name: Format

5
.gitignore vendored
View File

@ -1,5 +1,4 @@
node_modules
web/assets
upl
.env
web/node_modules
web/assets

View File

@ -12,7 +12,7 @@ FROM golang:1.16-alpine3.13 as build
RUN apk add \
make
WORKDIR /src
COPY --from=build-web . .
COPY --from=build-web /src .
ARG CGO_ENABLED=0
RUN make TAGS=production
@ -20,6 +20,6 @@ RUN make TAGS=production
FROM scratch
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=build upl /upl
COPY --from=build /src/upl /upl
RUN ["/upl"]
CMD ["/upl"]

View File

@ -18,6 +18,9 @@ upl: *.go web/*.tmpl web
.PHONY: test
test: web
$(GO) test -cover -bench=. -v ./...
.PHONY: vet
vet: web
$(GO) vet ./...
.PHONY: web