You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
798 B

  1. FROM node:10-alpine as build
  2. # args
  3. ARG version="0.1.0"
  4. ARG repo="github.com/productionwentdown/dri"
  5. ENV VUE_APP_VERSION=${version}
  6. ENV VUE_APP_SOURCE_LINK="https://${repo}"
  7. # dependencies
  8. RUN apk add --no-cache git
  9. # source
  10. WORKDIR /app
  11. COPY . .
  12. # build
  13. RUN yarn install
  14. RUN yarn build
  15. FROM productionwentdown/caddy:0.11.0 as caddy
  16. FROM alpine:3.8
  17. ARG version
  18. # labels
  19. LABEL org.label-schema.vcs-url="https://github.com/productionwentdown/dri"
  20. LABEL org.label-schema.version=${version}
  21. LABEL org.label-schema.schema-version="1.0"
  22. # copy build output
  23. COPY --from=build /app/dist /srv
  24. # copy caddy
  25. COPY --from=caddy /bin/caddy /usr/local/bin/caddy
  26. # copy entrypoint.sh
  27. COPY entrypoint.sh /usr/local/bin/entrypoint.sh
  28. ENTRYPOINT ["entrypoint.sh"]
  29. CMD ["caddy", "-conf", "/etc/Caddyfile"]