forked from frain-dev/convoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 757 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 757 Bytes
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
# syntax=docker/dockerfile:1
FROM node:14 as node-env
WORKDIR /app
COPY ./web/ui/dashboard .
RUN npm install
RUN npm run build
FROM golang:1.16 as build-env
WORKDIR /go/src/frain-dev/convoy
COPY ./go.mod /go/src/frain-dev/convoy
COPY ./go.sum /go/src/frain-dev/convoy
COPY --from=node-env /app/dist /go/src/frain-dev/convoy/server/ui/build
# Get dependancies - will also be cached if we don't change mod/sum
RUN go mod download
RUN go mod verify
# COPY the source code as the last step
COPY . .
RUN CGO_ENABLED=0
RUN go install ./cmd
FROM gcr.io/distroless/base
COPY --from=build-env /go/bin/cmd /
COPY --from=build-env /go/src/frain-dev/convoy/smtp/endpoint.update.html /
ENTRYPOINT ["/cmd"]
CMD [ "server", "--config", "convoy.json" ]
EXPOSE 8080