-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
45 lines (30 loc) · 627 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
38
39
40
41
42
43
44
45
#
# svelte-builder
#
FROM node:alpine as app-builder
WORKDIR /app
COPY . /app
RUN yarn install --frozen-lockfile
RUN yarn check
RUN yarn vite build
#
# server-builder (CGO is required)
#
FROM golang:alpine as server-builder
ENV CGO_ENABLED=1
RUN apk add build-base
WORKDIR /app
COPY backend /app/backend
COPY go.* /app
COPY *.go /app
RUN go build -buildvcs=false -mod=readonly -v
#
# deploy
#
FROM alpine as deployment
WORKDIR /app
COPY db /app/db
COPY --from=app-builder /app/build /app/build
COPY --from=server-builder /app/main /app
EXPOSE 8080
CMD ./main -docker