mirror of
https://github.com/louislam/uptime-kuma.git
synced 2024-11-24 07:14:04 +00:00
clean, multistage Dockerfile
This commit is contained in:
parent
c4bc95927f
commit
010302395f
1 changed files with 11 additions and 4 deletions
15
Dockerfile
15
Dockerfile
|
@ -1,10 +1,17 @@
|
||||||
FROM node:16.4.2-alpine3.14
|
FROM node:16.4.2-alpine3.14
|
||||||
#
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN yarn
|
RUN yarn --frozen-lockfile
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
#
|
#
|
||||||
EXPOSE 50013
|
FROM node:16.4.2-alpine3.14
|
||||||
|
WORKDIR /app
|
||||||
VOLUME ["/app/data"]
|
VOLUME ["/app/data"]
|
||||||
CMD ["npm", "run", "start-server"]
|
EXPOSE 50013
|
||||||
|
COPY package.json yarn.lock ./
|
||||||
|
COPY ./db /app/db
|
||||||
|
COPY ./server /app/server
|
||||||
|
RUN yarn --frozen-lockfile --prod
|
||||||
|
RUN yarn cache clean
|
||||||
|
COPY --from=0 /app/dist /app/dist
|
||||||
|
ENTRYPOINT ["node", "server/server.js"]
|
||||||
|
|
Loading…
Reference in a new issue