forked from frain-dev/convoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
35 lines (26 loc) · 869 Bytes
/
Dockerfile.dev
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
# syntax=docker/dockerfile:1
FROM node:14 as node-env
WORKDIR /app
COPY ./web/ui/dashboard .
RUN git config --global url."https://".insteadOf git://
RUN npm install
RUN npm run build
FROM golang:1.21 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/api/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 alpine:3.16.2
COPY --from=build-env /go/bin/cmd /
COPY --from=build-env /go/src/frain-dev/convoy/internal/email/templates/* templates/
COPY --from=build-env /go/src/frain-dev/convoy/configs/local/start.sh /
RUN chmod +x /cmd
RUN apk add --no-cache gcompat
EXPOSE 8080