forked from oussamatn/radio-player
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (25 loc) · 749 Bytes
/
Dockerfile
File metadata and controls
45 lines (25 loc) · 749 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
33
34
35
36
37
38
39
40
41
42
43
44
45
#JoujmaFM Player Build APP
# build environment
FROM node:12.2.0-alpine as build
USER root
RUN rm -rf /home/node/joujmafm
RUN mkdir -p /home/node/joujmafm/node_modules && chown -R node:node /home/node/joujmafm
RUN apk update && apk add git
WORKDIR /home/node/joujmafm
ENV PATH /home/node/joujmafm/node_modules/.bin:$PATH
COPY package.json .
USER node
RUN npm i --production --silent
RUN npm install @vue/[email protected]
COPY --chown=node:node . .
RUN npm run build
RUN rm -rf ./node_modules
FROM node:12.2.0-alpine as PROD
RUN npm install -g serve
WORKDIR /home/node/joujmafm
USER node
COPY --from=build --chown=node:node /home/node/joujmafm/dist ./dist
CMD serve -s dist -l 8080
# production environment
# TO be add
# RUN npm run prod