forked from VaiTon/unibocalendar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (26 loc) · 787 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
FROM node:current-alpine as nodebuild
WORKDIR /app
RUN corepack enable
COPY package.json pnpm-lock.yaml tailwind.config.js ./
RUN pnpm install --frozen-lockfile
COPY templates ./templates
RUN pnpm run css:build
FROM golang:alpine as gobuild
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o unibocalendar
FROM alpine
WORKDIR /app
COPY --from=nodebuild /app/static ./static
COPY --from=gobuild /app/unibocalendar .
COPY templates/*.gohtml ./templates/
ENV PORT=8080
EXPOSE 8080
ENV GIN_MODE=release
VOLUME /app/data
LABEL org.opencontainers.image.source="https://github.com/VaiTon/unibocalendar"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.description="Calendario per i corsi Unibo V2"
CMD ["./unibocalendar"]