Migrate to version 2

This commit is contained in:
Victor Lacasse-Beaudoin 2023-05-29 17:58:23 -04:00
parent 4ac3625f45
commit 96f8dfa35e
21 changed files with 777 additions and 746 deletions

View file

@ -1,15 +1,25 @@
FROM docker.io/library/golang:1.18
FROM golang:1.20.2 as build
LABEL author="Victor Lacasse-Beaudoin <vlbeaudoin@agecem.org>"
LABEL repo="https://git.agecem.com/agecem/bottin-agenda"
LABEL author="vlbeaudoin"
WORKDIR /go/src/app
COPY . .
COPY go.mod go.sum main.go ./
ENV PATH=/go/src/app:$PATH
ADD cmd/ cmd/
ADD data/ data/
ADD handlers/ handlers/
ADD models/ models/
#ADD web/ web/
RUN go get -d -v . && \
go install -v .
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o bottin-agenda .
CMD bottin-agenda -h
# Alpine
FROM alpine:latest
WORKDIR /app
COPY --from=build /go/src/app/bottin-agenda /usr/bin/bottin-agenda
CMD ["bottin-agenda", "--help"]