-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathDockerfile
57 lines (35 loc) · 986 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
46
47
48
49
50
51
52
53
54
55
56
57
FROM node:10.15.1-alpine AS base
######
# spotify-ripper-docker
######
FROM base AS srd
WORKDIR /spotify-ripper-docker
COPY ./spotify-ripper-docker ./
######
# spotify-ripper-web-frontend
######
FROM base AS srwf
WORKDIR /spotify-ripper-web-frontend
COPY ./spotify-ripper-web-frontend/package.json ./
COPY ./spotify-ripper-web-frontend/yarn.lock ./
RUN yarn install
COPY ./spotify-ripper-web-frontend .
RUN yarn run build
######
# spotify-ripper-web-backend
######
FROM base AS srwb
WORKDIR /spotify-ripper-web-backend
COPY ./spotify-ripper-web-backend/package*.json ./
RUN npm install
COPY ./spotify-ripper-web-backend ./
######
# composed
######
FROM base AS release
COPY --from=srd /spotify-ripper-docker /spotify-ripper-docker
COPY --from=srwf /spotify-ripper-web-frontend /spotify-ripper-web-frontend
COPY --from=srwb /spotify-ripper-web-backend /spotify-ripper-web-backend
EXPOSE 3000
COPY ./entrypoint.sh /entrypoint.sh
ENTRYPOINT [ "sh", "entrypoint.sh" ]