-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
84 lines (73 loc) · 1.9 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
FROM node:current-alpine AS build-frontend
LABEL maintainer Ascensio System SIA <[email protected]>
ARG BACKEND_GATEWAY
ARG PIPEDRIVE_CREATE_MODAL_ID
ARG PIPEDRIVE_EDITOR_MODAL_ID
ENV BACKEND_GATEWAY=$BACKEND_GATEWAY \
PIPEDRIVE_CREATE_MODAL_ID=$PIPEDRIVE_CREATE_MODAL_ID \
PIPEDRIVE_EDITOR_MODAL_ID=$PIPEDRIVE_EDITOR_MODAL_ID
WORKDIR /usr/src/app
COPY ./frontend/package*.json ./
RUN npm install
COPY frontend .
RUN npm run build
FROM golang:alpine AS build-gateway
WORKDIR /usr/src/app
COPY backend .
RUN go build services/gateway/main.go
FROM golang:alpine AS build-auth
WORKDIR /usr/src/app
COPY backend .
RUN go build services/auth/main.go
FROM golang:alpine AS build-builder
WORKDIR /usr/src/app
COPY backend .
RUN go build services/builder/main.go
FROM golang:alpine AS build-callback
WORKDIR /usr/src/app
COPY backend .
RUN go build services/callback/main.go
FROM golang:alpine AS build-settings
WORKDIR /usr/src/app
COPY backend .
RUN go build services/settings/main.go
FROM golang:alpine AS gateway
WORKDIR /usr/src/app
COPY --from=build-gateway \
/usr/src/app/main \
/usr/src/app/main
EXPOSE 4044
CMD ["./main", "server"]
FROM golang:alpine AS auth
WORKDIR /usr/src/app
COPY --from=build-auth \
/usr/src/app/main \
/usr/src/app/main
EXPOSE 5052
CMD ["./main", "server"]
FROM golang:alpine AS builder
WORKDIR /usr/src/app
COPY --from=build-builder \
/usr/src/app/main \
/usr/src/app/main
EXPOSE 6260
CMD ["./main", "server"]
FROM golang:alpine AS callback
WORKDIR /usr/src/app
COPY --from=build-callback \
/usr/src/app/main \
/usr/src/app/main
EXPOSE 5044
CMD ["./main", "server"]
FROM golang:alpine AS settings
WORKDIR /usr/src/app
COPY --from=build-settings \
/usr/src/app/main \
/usr/src/app/main
EXPOSE 5150
CMD ["./main", "server"]
FROM nginx:alpine AS frontend
COPY --from=build-frontend \
/usr/src/app/build \
/usr/share/nginx/html
EXPOSE 80