1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-07-18 20:59:44 +02:00
planka/Dockerfile
2020-04-29 04:50:32 +05:00

47 lines
1,002 B
Docker

FROM node:12-alpine AS server-builder
WORKDIR /app
RUN apk add vips-dev fftw-dev build-base python --no-cache \
--repository https://alpine.global.ssl.fastly.net/alpine/v3.10/community/ \
--repository https://alpine.global.ssl.fastly.net/alpine/v3.10/main/
COPY server/package.json server/package-lock.json ./
RUN npm i --prod --silent
FROM node:12-alpine AS client-builder
WORKDIR /app
COPY client/package.json client/package-lock.json ./
RUN npm i --silent
COPY client .
RUN npm run build
FROM node:12-alpine
RUN apk add bash vips --no-cache \
--repository https://alpine.global.ssl.fastly.net/alpine/v3.10/community/
WORKDIR /app
COPY --from=server-builder /app/node_modules node_modules
COPY server .
COPY --from=client-builder /app/build public
COPY --from=client-builder /app/build/index.html views
COPY docker-start.sh start.sh
RUN chmod +x start.sh
ENV BASE_URL DATABASE_URL
VOLUME /app/public/user-avatars
VOLUME /app/public/attachments
EXPOSE 1337
CMD ["./start.sh"]