All checks were successful
Build and Push Docker Image / Build-And-Push-Docker-Image (push) Successful in 1m2s
33 lines
1.2 KiB
Docker
33 lines
1.2 KiB
Docker
FROM golang:1.23.4@sha256:9820aca42262f58451f006de3213055974b36f24b31508c1baa73c967fcecb99 AS builder_go
|
|
WORKDIR /web-app-template
|
|
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.62.2
|
|
RUN go install github.com/a-h/templ/cmd/templ@latest
|
|
RUN go install github.com/vektra/mockery/v2@latest
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . ./
|
|
RUN templ generate
|
|
RUN mockery --log-level warn
|
|
RUN go test ./...
|
|
RUN golangci-lint run ./...
|
|
RUN go build -o /web-app-template/web-app-template .
|
|
|
|
|
|
FROM node:22.13.0@sha256:fa54405993eaa6bab6b6e460f5f3e945a2e2f07942ba31c0e297a7d9c2041f62 AS builder_node
|
|
WORKDIR /web-app-template
|
|
COPY package.json package-lock.json ./
|
|
RUN npm clean-install
|
|
COPY . ./
|
|
RUN npm run build
|
|
|
|
|
|
FROM debian:12.8@sha256:b877a1a3fdf02469440f1768cf69c9771338a875b7add5e80c45b756c92ac20a
|
|
WORKDIR /web-app-template
|
|
RUN apt-get update && apt-get install -y ca-certificates && echo "" > .env
|
|
COPY migration ./migration
|
|
COPY --from=builder_go /web-app-template/web-app-template ./web-app-template
|
|
COPY --from=builder_node /web-app-template/static ./static
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["/web-app-template/web-app-template"]
|
|
|