@ -1,7 +0,0 @@
FROM node:lts-alpine
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
CMD [ "/app/docker-entrypoint.sh" ]
@ -16,13 +16,18 @@ tasks:
cmds:
- task: lint
- task: test
- task: build
test:
cmds: [ go test ./... ]
lint:
desc: lint app
desc: lint
cmds: [ third_party/golangci-lint/golangci-lint run ]
build:
desc: build
cmds: [ docker image build -t jaedle/mirror-to-gitea:development -f build/Dockerfile . ]
default:
cmds: [ task: world ]
@ -0,0 +1,15 @@
FROM golang:1.16-alpine as builder
ADD . ./
RUN ls -al && go build -o main main.go
FROM scratch as runtime
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /app/main main
CMD [ "/app/main" ]
@ -6,4 +6,4 @@ node_modules/
.gitignore
run-local.sh